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.

131 lines
3.9 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
#include "WellPole.h"
// 斜井柱
/*
绘制斜井柱道头时,是通过旋转DC来实现的,按照m_HeadLineAngle的角度旋转 ggff,(目前旋转的点是最左侧道的轨迹起始点)
*/
class AFX_EXT_CLASS ComputMiniCurvatureTrace //最小曲率法计算井轨迹
{
public:
ComputMiniCurvatureTrace();
virtual ~ComputMiniCurvatureTrace();
void ComputeMiniCurveture(CList<Struct_InclinedWell, Struct_InclinedWell> &wellTraceList);//计算出结果
void GetZbOffset(CList<Struct_InclinedWell, Struct_InclinedWell>& wellTraceList, double dep, double& x, double& y); //由深度根据井轨迹得出相应深度的坐标偏移
protected:
void ComputeProjection(double k,
double x3, double y3,
double &x4, double &y4); //计算投影数据
};
class CInclinedTrack;
class AFX_EXT_CLASS CInclinedWellPole : public CWellPole
{
protected:
//DECLARE_SERIAL(CInclinedWellPole);
public:
CInclinedWellPole();
CInclinedWellPole(const CRect8& position);
virtual ~CInclinedWellPole();
//克隆,虚函数
virtual void* CloneElement(void);
//选择操作响应函数
virtual void MoveTo(CRect8& position);
virtual void MoveHandleTo(int nHandle, CPoint2D point);
virtual void MoveChildren();//移动子对象的位置
virtual BOOL Intersects(const CRect8& rect, double dHandleSize);
virtual void Serialize(CArchive& ar, const short &ver);
//设置水平比例
void SetLevelProportion(double p) { m_level_proportion = p; }
//获得水平比例
double GetLevelProportion(void) { return m_level_proportion; }
virtual void ComputeTrajectory(void);
protected:
public:
//重写范围函数,加上底图表范围
//virtual void GetRange(CRect8& range);
// 绘制井头
virtual void DrawWellHead(CXyDC* pDC);
//绘制井体边框
virtual void DrawWellBodyLine(CXyDC* pDC);
virtual void DrawWellBody(CXyDC* pDC);
// 绘制井轨迹曲线
virtual void DrawTrajectory(CXyDC* pDC);
virtual void Draw(CXyDC* pDC);
//计算井对象及其包含的道对象大小
virtual void CalculateSize(CPoint2D point);
// 计算某个斜深对应的轨迹(得到垂深和水平位移)
void ComputeTrajectory(double dep, double &vdep, double &level);
//void ComputeTraceArrange(double dep, double &vdep, double &level);
//void ComputeTraceArrange(void);
void ComputePolyLeftandRight(CPoint2D pt1, CPoint2D pt2, CPoint2D& leftpt, CPoint2D& rightpt, double width, double precent);
//void SortTrack(CTrackObj* pTheMovingTrackObj);
//void SortTrack(CArray<Struct_TrackSort, Struct_TrackSort> &arrayTrackSort);
//计算起始深度和结束深度对应垂深和位移,即m_topDepV, m_topLevel;需在ComputeTrace之后调用 2015-9-16
void ComputeTopDepAndLevel(void);
//virtual BOOL RemoveSelection();
double LevelToScreenCX(double dLevel /* 水平宽度m */);
double ScreenCXToLevel(double dCX);
//设置投影角度,值介于0-360度
void SetProjectionAngle(double dDegree);
//获取当前投影角度
double GetProjectionAngle(void) { return m_dProjectionAngle; }
CCurveEx* GetTrajectoryDisplayCurve() { return &m_trajectoryCurve; }
virtual void GetFrameCurve(std::vector<CPoint2D>& curvePts);//ggff
virtual BOOL IsInRange(CRect8& range);//ggff
virtual CPoint2D ReCalculatePoint(CPoint2D point);
virtual void GetRange(CRect8& range);
void GetTracksFromOtherWell(CWellPole *pWellObj); //从一口井中获得所有的道,并根据本井的轨迹重新计算道及道内数据 (注意不是复制道,是从原井直接摘走数据道)
protected:
//给定任意斜深,插值计算处对应的垂深和时平移,超出范围则插值失败返回false 2015-9-16
bool InterpolateDepVandLevel(double dep, double& depV, double& level);
// 由井口深度,水平位移,显示比例等计算生成需要绘制的最终曲线
void ComputeDisplayTrajectory();
void GetInclinedWellRange(CRect8 &range, vector<CInclinedTrack*>& trackVec); //得到斜井的范围
double m_dProjectionAngle; //投影角度,[0,360)度
CCurveEx m_trajectoryCurve; //需绘制的井轨迹曲线
public:
GDFLOGPENEXT m_penTrajectory; //轨迹线笔
double m_topDepV; //井口对应的垂深
double m_topLevel; //离井口的水平位移
int m_nTraceTrackNum; //轨迹所属道号
ETrackType m_traceTrackType; //轨迹所属道类型
ETrackBorder m_traceTrackBorder; //轨迹所属道边界
};