You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kev/Drawer/SSBase/WellPoleLib/InTrackDepthSegment.h

91 lines
3.3 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
class CWellBaseObj;
class AFX_EXT_CLASS CInTrackDepthSegment : public CWellBaseObj
{
public:
CInTrackDepthSegment();
CInTrackDepthSegment(const CRect8& position);
virtual ~CInTrackDepthSegment();
public:
double m_fSdep; //顶深
double m_fEdep; //底深
double m_fLeftSpace; //左边空
double m_fRightSpace; //右边空
CString m_strType; //类型
WELLOBJLIST m_BendLeftList; //地层的左侧bend链表
WELLOBJLIST m_BendRightList;//地层的右侧bend链表
public:
virtual int HitTest(CPoint2D point, double dHandleSize, BOOL bSelected);
virtual void MoveHandleTo(int nHandle, CPoint2D point);
virtual void MoveTo(CRect8& position);
virtual void Serialize(CArchive& ar, const short &ver);
virtual BOOL Intersects(const CRect8& rect, double dHandleSize);
//获取斜井状态下岩性符号对应的左右井边界,供TrackLithObj computedata(),BuidChildObject()调用 2015-10-19
virtual bool CalcInclinedBorder();
virtual BOOL IsTrackChildTopEnd() { return TRUE; };
//void DrawSelectRange(CXyDC *pDC); //绘制选中的区域
virtual void GetSelectRange(std::vector<CPoint2D>& PtsVec);//斜井的道内对象需要得到一个多边形的选中区域
virtual void GetRange(CRect8& range);
void SetTop(double dep);
void SetBottom(double dep);
void SetDepth(double dep);
void SetRectInTrack(CRect8 TrackRect, LPVOID pWell);
void SetUnViewState();//在多井段情况下,设置是否显示
virtual void SetViewState(int state);
protected:
//计算左右边界 bEqualPoints为true表示左右边界点一一对应false则无此对应
bool CalcLeftAndRightBorders(bool bEqualPoints = false);
//由左右两条线生成范围多边形
void LinkPoints(CCurve& outline);
//由左右两条线生成范围多边形,最后一点不闭合
void LinkPoints(CCurve& newPoly, vector<dfPoint>& ptsLeft, vector<dfPoint>& ptsRight);
//根据根据左右井道散点m_borderLeftm_borderRight和左右点处的两个两个比例因子获取闭合多边形.前提是左右边界点相同并一一对应
bool CreatePolygon(CCurve& destCurve, double ratioL, double ratioR);
//根据左右井道散点m_borderLeftm_borderRight和比例因子获取响应比例处的曲线
bool CreatePolyline(CCurve& destCurve, double ratio);
//由深度段左右散点生成原始边界线
bool CreateBorderCurve(void);
void MoveShowRects(double x, double y);
//当前岩性符号对应的左右井道点
vector<dfPoint> m_borderLeft;
vector<dfPoint> m_borderRight;
//原始边界
CCurveEx m_curveLeft;
CCurveEx m_curveRight;
///////////////为了得到最大内部矩形//////////////////// 2015-12-1
//由左右两条边界线获取内部最大矩形
void GetMaxRectangle(void);
//由左右两条边界线获取内部最大矩形rect,并得到该矩形的旋转角度angle,矩形中心点ptC
void GetMaxRectangle(CCurve& curveLeft, CCurve& curveRight, CRect8& rect, dfPoint& ptC, double& angle);
//指定中心点和宽获取矩形rect
void CreateRectangle(CPoint2D& ptC, double w, double h, CRect8& rect);
dfPoint m_cPt; // 矩形中心点
CRect8 m_maxRect; // 最大矩形
double m_angle; // 矩形倾角
CCurveEx m_polyCurve; //在斜井状态下,本对象的范围多边形(首尾的点不重合)
std::vector<CRect8> m_ShowRectsVec; //在直井多井段的情况下,这个结构用来保存深度段数据对象的显示矩形,因为有时有的深度段数据会被井段分为多个不同部分.
void SetTopBottomDepth(CRect8 rect);
BOOL GetMaxShowRect(CRect8& showrect); //对于某些分为几段显示的数据对象,挑出一个最大的现实矩形
public:
virtual int ReadPCG_SelfData(CKXmlParse& xp, const short& ver , CTrackObj* pTrack) { return 0; };
virtual void WritePCG_SelfData(CFile &fw, int nBaseTabNum) {};
};