|
|
#ifndef WELLSECTION_H
|
|
|
#define WELLSECTION_H
|
|
|
#pragma once
|
|
|
|
|
|
#include "TObjectList.h"
|
|
|
#include "WellPoleLib/MultiWellSectionBase.h"
|
|
|
#include "WellPoleLib/TreeBase.h"
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
//文件 WellSection.h
|
|
|
//主要功能:
|
|
|
// 剖面类
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
typedef struct MAPRANGE
|
|
|
{
|
|
|
int nID;
|
|
|
int nIndex;
|
|
|
int nType;
|
|
|
double fTop;
|
|
|
double fBottom;
|
|
|
double fLeft;
|
|
|
double fRight;
|
|
|
|
|
|
}Struct_MapRange;
|
|
|
|
|
|
typedef struct INTERVAL
|
|
|
{
|
|
|
public:
|
|
|
double fIntervalLength;
|
|
|
double fSpaceLength;
|
|
|
}Struct_Interval;
|
|
|
|
|
|
typedef struct INTERVALS
|
|
|
{
|
|
|
public:
|
|
|
double fBaseDepth;
|
|
|
double fTopDepth;
|
|
|
//typedef CArray <INTERVAL,INTERVAL>IntervalArr;
|
|
|
}Struct_Intervals;
|
|
|
|
|
|
typedef struct SECTIONWELL
|
|
|
{
|
|
|
public:
|
|
|
CString strWellName;
|
|
|
double fBaseDepth;
|
|
|
double fTopDepth;
|
|
|
double fLength;
|
|
|
double fHorzDistance;
|
|
|
Struct_Intervals Intervals;
|
|
|
}Struct_SectionWell;
|
|
|
|
|
|
typedef struct SECTIONOTHER
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
SECTIONOTHER() { nID = -1; }
|
|
|
void Reset() { nID = -1; name.Empty(); strID.Empty(); }
|
|
|
int nID;
|
|
|
CString strID;
|
|
|
CString name;
|
|
|
}Struct_SectionOther;
|
|
|
|
|
|
/*pcg中 WellSection 的范围m_position 计算,刚开始从pcg中 <sections>中 <section>节点中的 top , left ,bottom ,right中获得,
|
|
|
以top和left为左侧基准点计算井及断层的位置数据。后面在ComputeSectionRect()函数和ReSetPosition()函数中通过统计剖面对象重新计算一下m_position。
|
|
|
|
|
|
某点的实际海拔高程 = 井口海拔高程 − 该点的垂深(TVD)
|
|
|
但注意:测量深度(MD)≠ 垂深(TVD),除非是直井。
|
|
|
TVD(True Vertical Depth):从井口到该点的垂直深度(投影到垂直方向的距离)。
|
|
|
MD(Measured Depth):实际钻过的井眼长度(曲线长度)。
|
|
|
因此,完整关系为:
|
|
|
某点海拔高程=井口海拔(KB 高程)−TVD
|
|
|
*/
|
|
|
//typedef TObjectList<CDrawObj> CDrawObjList;
|
|
|
|
|
|
class CBendObj;
|
|
|
class CFaultObj;
|
|
|
typedef TObjectList<CWellBaseObj>CWellBaseObjList;
|
|
|
class AFX_EXT_CLASS CWellSection : public CMultiWellSectionBase
|
|
|
{
|
|
|
public:
|
|
|
CWellSection(void);
|
|
|
~CWellSection(void);
|
|
|
//G_CLONE_ELEMENT(CWellSection)
|
|
|
virtual CBaseExtend* CreateClone();
|
|
|
virtual void* CloneElement(void);
|
|
|
virtual void Clone(CWellBaseObj& object);
|
|
|
|
|
|
virtual CString GetXmlType() { return _T("CrossSection"); }
|
|
|
void operator=(const CWellSection& Object);
|
|
|
void CloneOtherParameter(const CWellSection& wellSection);
|
|
|
void Clear(void);
|
|
|
CLONE_WELLOBJECT(CWellSection)
|
|
|
|
|
|
public:
|
|
|
CString m_strTitleName; //标题
|
|
|
CString m_strName; //section中的title读取的字串,为了筛层一般为剖面-1
|
|
|
CString m_strWellStyle; //井绘制样式
|
|
|
|
|
|
CRect8 m_SectionRect; //剖面打印范围
|
|
|
CRect8 m_SectionSpaceRect;//距离顶、底、左、右的宽度
|
|
|
|
|
|
GDFLOGFONTEXT m_fontTitle; //标题字体
|
|
|
GDFLOGFONTEXT m_fontWell; //井标注字体
|
|
|
GDFLOGFONTEXT m_fontTrack; //道标注字体
|
|
|
GDFLOGFONTEXT m_fontDepth; //深度标注字体
|
|
|
|
|
|
GDFLOGPENEXT m_penMajor; //主刻度线型
|
|
|
GDFLOGPENEXT m_penMinor; //次刻度线型
|
|
|
GDFLOGPENEXT m_penTrack; //道边框线型
|
|
|
|
|
|
COLORREF m_BoundsColor; //边框颜色
|
|
|
|
|
|
double m_fDepthScale; //深度比例(从resform看深度比例尺只是计算井的长度)
|
|
|
double m_fLevelScale; //海拔比例(从resform看这个比例用来计算井口位置等)
|
|
|
double m_fHorzScale; //水平比例
|
|
|
double m_fDisplayScale;//显示比例
|
|
|
double m_fTop; //(旧版中)剖面的顶海拔
|
|
|
double m_fBottom; //(旧版中)剖面的底海拔
|
|
|
double m_WellDistance; //井间距
|
|
|
|
|
|
int m_nBoundsStyle; //边框样式1-单线1,2-单线2,3-单线3,4-单线4,5-单线5,6-单线6,289-双线1,290-双线2,291-双线3,546-双线4
|
|
|
int m_nPageVersion; //剖面版本
|
|
|
int m_nLayerFlatten;//层拉平方式 0真是位置,1层顶拉平,2层底拉平,3井顶拉平,4井底拉平
|
|
|
int m_nIndex; //剖面索引号
|
|
|
int m_nWellCount; //剖面井数
|
|
|
|
|
|
double m_dDepthRatio;
|
|
|
double m_dHorzRatio;
|
|
|
|
|
|
CWellBaseObjList m_WellList; //井链表 ,其中的井安装从左到右的顺序放置
|
|
|
CWellBaseObjList m_BendList; //层连接链表
|
|
|
CWellBaseObjList m_FaultList; //断层链表
|
|
|
CWellBaseObjList m_VirtualWellList; //虚拟井链表
|
|
|
|
|
|
//临时变量,读取PCG格式使用
|
|
|
CWellBaseObjList SectionExtraList; //多剖面链表
|
|
|
WELLOBJLIST ObjectExtraList; //表格、标注、线、标题等其他对象
|
|
|
CWellPole* PWellTemplate; //井模板指针
|
|
|
CString m_CopyrightName; //版权
|
|
|
|
|
|
CString m_VersionType;
|
|
|
CString m_BendLithoResult;
|
|
|
CXy* m_pBendLithoSymbol;
|
|
|
protected:
|
|
|
DWORD m_nWellSectionFlags;// 井剖面开关状态
|
|
|
// 井剖面类Flags
|
|
|
enum WellSectionFlags
|
|
|
{
|
|
|
WellSectionFlagBounds = 0x0001, // 显示剖面外框
|
|
|
WellSectionFixedDistance = 0x0002, // 固定井间距
|
|
|
WellSectionRealLevel = 0x0004, // 按真实的井位置拉平
|
|
|
WellSectionStratumSmooth = 0x0008, // 平滑剖面
|
|
|
WellSectionVisible = 0x0010, // 剖面可视
|
|
|
WellSectionActivate = 0x0020, // 是否为激活
|
|
|
WellSectionDrawTitleDefault = 0x0040, // 是否缺省绘制井标题
|
|
|
WellSectionShowLayoutGrid = 0x0080, // 是否显示布局风格
|
|
|
WellSectionWellsSameY = 0x0100, // 是否对齐井口(拉平时按剖面中海拔最高的井口进行拉平)
|
|
|
WellSectionDrawWellVertDepth= 0x0200, // 是否使用垂深绘制
|
|
|
};
|
|
|
|
|
|
DWORD m_nDisplayModeFlags;//显示模式
|
|
|
enum DisplayModeFlags
|
|
|
{
|
|
|
DisplayModeFlagsNormal = 0x0001, //直井模式
|
|
|
DisplayModeFlagsVerticalBevel = 0x0002, //斜井模式
|
|
|
DisplayModeFlagsVertical = 0x0004, //垂直井模式
|
|
|
};
|
|
|
|
|
|
DWORD m_nSandVerDict; //活动分层结论
|
|
|
enum SandVerDictFlags
|
|
|
{
|
|
|
SandVerDictSynthesis = 0x0000, //综合解释
|
|
|
SandVerDictModel = 0x0001, //模型解释
|
|
|
SandVerDictWellLogging = 0x0002, //测井解释
|
|
|
SandVerDictOilTestConlusion = 0x0004, //试油结论
|
|
|
SandVerDictWellRecord = SandVerDictModel|SandVerDictWellLogging, //录井解释
|
|
|
SandVerDictProduceTestConlusion = SandVerDictModel|SandVerDictOilTestConlusion, //试采结论
|
|
|
};
|
|
|
|
|
|
DWORD m_nSedimentaryFacies; //沉积相剖面
|
|
|
enum SedimentaryFaciesFlags
|
|
|
{
|
|
|
SedimentaryFaciesNone = 0x0000, //无
|
|
|
SedimentaryFaciesStratiUnit = 0x0001, //地质单元
|
|
|
SedimentaryFaciesReservesUnit = 0x0002, //储量单元
|
|
|
SedimentaryFaciesReservoirGroup = 0x0004, //油层组
|
|
|
SedimentaryFaciesSandSet = 0x0008, //砂层组
|
|
|
SedimentaryFaciesSand = 0x0010, //分层
|
|
|
|
|
|
SedimentaryFaciesBlend = 0x0100, //沉积相剖面混合填充
|
|
|
};
|
|
|
|
|
|
DWORD m_nLockEditFlags; //锁定编辑
|
|
|
enum LockEditFlags
|
|
|
{
|
|
|
LockEditWell = 0x0001, //井对象锁定
|
|
|
LockEditBend = 0x0002, //连层对象锁定
|
|
|
LockEditFault = 0x0004, //断层对象锁定
|
|
|
};
|
|
|
|
|
|
protected:
|
|
|
//临时变量,读取PCG格式使用
|
|
|
CArray <Struct_MapRange, Struct_MapRange>MapsRangeArr; //存放图范围信息
|
|
|
CArray <Struct_SectionWell,Struct_SectionWell>SectionWellArr;//存放剖面内井的信息
|
|
|
CArray <Struct_SectionOther,Struct_SectionOther>m_SectionStrataArr;//存放剖面内连层的信息
|
|
|
CArray <Struct_SectionOther,Struct_SectionOther>SectionFaultsArr;//存放剖面内断层的信息
|
|
|
CArray <Struct_SectionOther,Struct_SectionOther>SectionCalloutsArr;//存放剖面内辅助图元的信息
|
|
|
public:
|
|
|
virtual int Read(CFile& fr, const short& ver);
|
|
|
virtual void Write(CFile& fw, const short& ver);
|
|
|
|
|
|
virtual BOOL IsWriteDfd() { return FALSE; }
|
|
|
virtual void Serialize(CArchive& ar, const short &ver);
|
|
|
virtual void Draw(CXyDC* pDC);
|
|
|
virtual void DrawBounds(CXyDC* pDC);
|
|
|
|
|
|
|
|
|
virtual void MoveTo(CRect8& position);
|
|
|
virtual void MoveChildren();//移动子对象的位置
|
|
|
virtual CWellBaseObj* ObjectAt(const CRect8& rect, double dHandleSize, BOOL bNesting=FALSE);
|
|
|
|
|
|
virtual void SetPenGrid(GDFLOGPENEXT& penmajor, GDFLOGPENEXT& penminor);
|
|
|
virtual void SetTrackPen(GDFLOGPENEXT&pen);
|
|
|
virtual void SetWellfont(GDFLOGFONTEXT& font);
|
|
|
virtual void SetTrackfont(GDFLOGFONTEXT& font);
|
|
|
virtual void SetDepthfont(GDFLOGFONTEXT& font);
|
|
|
|
|
|
virtual void SetDepthScale(double scale);
|
|
|
virtual void ReSetScaleHor(double dScale);
|
|
|
virtual void ReSetScaleVer(double dScale);
|
|
|
virtual void ReSetWellDistanse(double dDis);
|
|
|
|
|
|
virtual CRect8 GetRect(void);
|
|
|
|
|
|
virtual CBendObj* CreateBendObj() { return new CBendObj; }
|
|
|
|
|
|
////计算新添加bend连层控制点所在直线的左右端点的y值以及左右层的高度 pBend 手动添加的连层
|
|
|
virtual void ComputeBendPosition(CBendObj* pBend,double &valueLeft,double &valueRight,double &heightLeft,double &heightRight);
|
|
|
//// 当连层按层位拉平是断层坐标的变化
|
|
|
virtual void ComputeFaultControl();
|
|
|
//// 删除连层或者改变层厚度是重新分配连层的厚度(多对一情况下)
|
|
|
virtual void ComputeBendControlsHeight(CInTrackDepthSegment* pLayer, BOOL bLeft);
|
|
|
///计算剖面位置
|
|
|
virtual void ComputeSectionPosition();
|
|
|
////计算井位置
|
|
|
virtual void ComputeWellPosition(double fTop);
|
|
|
/// 连层的左右层指针赋值
|
|
|
virtual void AssignBendLayer(CBendObj* pBend);
|
|
|
/// 层左右bend链表排序
|
|
|
virtual void RankLayerBendList();
|
|
|
// 计算井补心海拔改变后相关连层的控制点 断层的控制点 pWell变化的井 fdelta 井位置y方向的变化量
|
|
|
virtual void ComputeControls(CWellPole* pWell, double fdelta);
|
|
|
/////
|
|
|
/*
|
|
|
层拉平时是否按真是位置绘制,FALSE真是位置绘制,否则TRUE(井段和层拉平)。
|
|
|
BaseDepth = TopDepth 井段顶拉平
|
|
|
BaseDepth = TOpDepth + Length 井段底底拉平
|
|
|
BaseDepth = 某个层顶深 层顶拉平
|
|
|
BaseDepth = 某个层底深 层底拉平
|
|
|
*/
|
|
|
//根据FlatLeveBase换算剖面的拉平方式
|
|
|
virtual void Flat();
|
|
|
//// PCG读完井数据后调用,如果井属于当前剖面则不做处理;
|
|
|
///////如果井输入其他剖面(多剖面情况下)则放入其他剖面(如果同一口井属于多个剖面则拷贝井内容);若果井不属于任何剖面则删除;
|
|
|
virtual void AllotWellsAndBends();
|
|
|
/////连接方式交互时根据连接方式计算连层延伸时的延伸长度(x轴方向)
|
|
|
void ComputeExTendLengthOfX();
|
|
|
|
|
|
//层位拉平 TRUE层底拉平 FALSE 层顶拉平
|
|
|
virtual void FlatLayer(CBendObj* pBend, BOOL bBot);
|
|
|
//井段拉平 TRUE井段顶拉平 FALSE 井段底底拉平
|
|
|
virtual void FlatWell(BOOL bTop);
|
|
|
//井按照真实位置摆放
|
|
|
virtual void FlatRealPosition(void);
|
|
|
|
|
|
//构建连层与井、分层的关系
|
|
|
virtual void BuildBendsRelation(BOOL bFault=TRUE,BOOL bResetLinkStyle = TRUE);
|
|
|
//构建连层对象
|
|
|
virtual void BuildBends();
|
|
|
|
|
|
////删除某连层
|
|
|
virtual void DeleteBend(CBendObj* pBend);
|
|
|
// 层拉平后剖面中的所有连接层bend 的重新计算
|
|
|
void ReComputeBendsY();
|
|
|
//递归函数,依次按bend寻找
|
|
|
void RecursionBend(CBendObj* pBend, CWellBaseObjList &WellListTemp,double value,BOOL b);//b=0:按层顶拉平,b=1;按层底拉平
|
|
|
//井操作后重新计算相关的层位(包含拖动井 拖拽井 拖动道 拖拽道等操作)
|
|
|
virtual void ReComputeBends( CWellPole* pWell);
|
|
|
|
|
|
//断层操作后重新计算相关的层位
|
|
|
void ReBuildBends(CFaultObj* pFault);
|
|
|
//void ReBuildBends( CWellPole* pWell);
|
|
|
|
|
|
virtual void ReSetPosition();
|
|
|
|
|
|
//将对象添加到子对象链表
|
|
|
virtual void Add(CWellBaseObj* pObj);
|
|
|
|
|
|
//根据图元类型构建对象
|
|
|
static CWellBaseObj* CreateObj(int eType);
|
|
|
|
|
|
/* 实际坐标与屏幕坐标转换 */
|
|
|
virtual double DepthToScreenY(double dDepth /* 实际深度m */);
|
|
|
virtual double ScreenYToDepth(double dY);
|
|
|
virtual double HeightToScreenCY(double dHeight /* 高度m */); // 长度m转为逻辑长度
|
|
|
virtual double ScreenCYToHeight(double dCY); //逻辑长度转井的纵向长度米
|
|
|
virtual double WidthToScreenCX(double dWidth/* 实际宽度cm */);
|
|
|
virtual double ScreenCXToWidth(double dCX);
|
|
|
|
|
|
//开关变量值
|
|
|
virtual void SetWellSectionFlags(DWORD flags);
|
|
|
virtual DWORD GetWellSectionFlags();
|
|
|
virtual void SetShowBounds(BOOL bFlag);
|
|
|
virtual void SetFixedDistance(BOOL bFlag);
|
|
|
virtual void SetRealLevel(BOOL bFlag);
|
|
|
virtual void SetStratumSmooth(BOOL bFlag);
|
|
|
virtual void SetVisible(BOOL bFlag);
|
|
|
virtual void SetActivate(BOOL bFlag);
|
|
|
virtual void SetDrawTitleDefault(BOOL bFlag);
|
|
|
virtual void SetLayoutGrid(BOOL bFlag);
|
|
|
virtual void SetWellsSameY(BOOL bFlag);
|
|
|
virtual void SetDrawWellVertDepth(BOOL bFlag);
|
|
|
|
|
|
virtual BOOL IsShowBounds();
|
|
|
virtual BOOL IsFixedDistance();
|
|
|
virtual BOOL IsRealLevel();
|
|
|
virtual BOOL IsStratumSmooth();
|
|
|
virtual BOOL IsVisible();
|
|
|
virtual BOOL IsActivate();
|
|
|
virtual BOOL IsDrawTitleDefault();
|
|
|
virtual BOOL IsShowLayoutGrid();
|
|
|
virtual BOOL IsWellsSameY();
|
|
|
virtual BOOL IsDrawWellVertDepth();
|
|
|
|
|
|
void SetDisplayMode(DWORD flags);
|
|
|
void SetDisplayModeNormal(BOOL bFlag);
|
|
|
void SetDisplayModeVerticalBevel(BOOL bFlag);
|
|
|
void SetDisplayModeVertical(BOOL bFlag);
|
|
|
|
|
|
DWORD GetDisplayMode();
|
|
|
BOOL IsDisplayModeNormal();
|
|
|
BOOL IsDisplayModeVerticalBevel();
|
|
|
BOOL IsDisplayMoedVertical();
|
|
|
|
|
|
void SetSedimentaryFacies(DWORD flags);
|
|
|
void SetSedimentaryFaciesNone(BOOL bFlag);
|
|
|
void SetSedimentaryFaciesStratiUnit(BOOL bFlag);
|
|
|
void SetSedimentaryFaciesReservesUnit(BOOL bFlag);
|
|
|
void SetSedimentaryFaciesReservoirGroup(BOOL bFlag);
|
|
|
void SetSedimentaryFaciesSandSet(BOOL bFlag);
|
|
|
void SetSedimentaryFaciesSand(BOOL bFlag);
|
|
|
void SetSedimentaryFaciesBlend(BOOL bFlag);
|
|
|
|
|
|
DWORD GetSedimentaryFacies();
|
|
|
BOOL IsSedimentaryFaciesNone();
|
|
|
BOOL IsSedimentaryFaciesStratiUnit();
|
|
|
BOOL IsSedimentaryFaciesReservesUnit();
|
|
|
BOOL IsSedimentaryFaciesReservoirGroup();
|
|
|
BOOL IsSedimentaryFaciesSandSet();
|
|
|
BOOL IsSedimentaryFaciesSand();
|
|
|
BOOL IsSedimentaryFaciesBlend();
|
|
|
|
|
|
void SetSandVerDict(DWORD flags);
|
|
|
void SetSandVerDictSynthesis(BOOL bFlag);
|
|
|
void SetSandVerDictModel(BOOL bFlag);
|
|
|
void SetSandVerDictWellLogging(BOOL bFlag);
|
|
|
void SetSandVerDictOilTestConlusion(BOOL bFlag);
|
|
|
void SetSandVerDictWellRecord(BOOL bFlag);
|
|
|
void SetSandVerDictProduceTestConlusion(BOOL bFlag);
|
|
|
|
|
|
DWORD GetSandVerDict();
|
|
|
BOOL IsSandVerDictSynthesis();
|
|
|
BOOL IsSandVerDictModel();
|
|
|
BOOL IsSandVerDictWellLogging();
|
|
|
BOOL IsSandVerDictOilTestConlusion();
|
|
|
BOOL IsSandVerDictWellRecord();
|
|
|
BOOL IsSandVerDictProduceTestConlusion();
|
|
|
|
|
|
void SetLockEditWell(BOOL bFlag);
|
|
|
void SetLockEditBend(BOOL bFlag);
|
|
|
void SetLockEditFault(BOOL bFlag);
|
|
|
BOOL IsLockEditWell();
|
|
|
BOOL IsLockEditBend();
|
|
|
BOOL IsLockEditFault();
|
|
|
|
|
|
void MakeFaultFromFaultPoint();//由断点数据生成断层
|
|
|
void SetAllWellColumnLineShape(double dw);//设置所有的井都是一个宽度,内部道平均分配
|
|
|
void DeleteAllFaults();
|
|
|
void DeleteOneFault(CFaultObj *pFault);
|
|
|
|
|
|
CWellPole* FindWell(CString strWell);
|
|
|
|
|
|
//数据转移
|
|
|
virtual void SetActionNoSaveData(BOOL b);
|
|
|
virtual void TransferData(CWellBaseObj* pObj);
|
|
|
CBendObj* FindBend(CString leftWell, CString rightWell, int nleftLayerId, int nRightLayerId);
|
|
|
CFaultObj* FindFault(CString faultName);
|
|
|
|
|
|
virtual void Transform(CXyDC* pDC, float* matrix, BOOL bUndo);
|
|
|
//virtual void Transform(float* matrix, BOOL bUndo);
|
|
|
void SetScale(double xScale, double yScale);
|
|
|
|
|
|
protected:
|
|
|
void SetFaultsHorz(double oldRatio,double newRatio,void *pLeftWell,CRect8 lOldWellRect,void *pRigntWell,CRect8 rOldWellRect);
|
|
|
|
|
|
//// 旧版本保存PCG时,若果左右延伸则求出延伸长度以及延伸方式
|
|
|
void ComputeExtendModeAndLength();
|
|
|
///新版根据PCG连层控制点确定连层类型
|
|
|
void SetStratumLinkType();
|
|
|
//转换文本标注对象
|
|
|
void ConvertMarkToGroup();
|
|
|
//根据井名找到井对象
|
|
|
CWellPole* FindWell(int nId);
|
|
|
void SetStratumLinkType_ResForm();
|
|
|
public:
|
|
|
//DML读写(调PCG读写)
|
|
|
virtual int ReadDML(CFile &fr, const short &ver);
|
|
|
virtual void WriteDML(CFile &fw, const short& ver, int nBaseTabNum);
|
|
|
|
|
|
//PCG读写
|
|
|
virtual int ReadPCG(CFile &fr, const short &ver );
|
|
|
virtual void WritePCG(CFile &fw, const short& ver, int nBaseTabNum);
|
|
|
virtual void ReadPCGEnd();
|
|
|
|
|
|
virtual int ReadPCG_Head(CXmlParse &xp,const short& ver);
|
|
|
virtual int ReadPCG_Feature(CXmlParse &xp,const short& ver);
|
|
|
virtual int ReadPCG_Section(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_Wells(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_VirtualWells(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_Faults(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_Bends(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_Strata(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_Datas(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_Callouts(CFile &fr,const short& ver);
|
|
|
|
|
|
virtual int ReadPCG_DoucmentTextBox(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_StylesSection(CFile &fr,CXmlParse& xp,const short& ver);
|
|
|
virtual int ReadPCG_TitleSection(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_MarkSection(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_RangeSection(CXmlParse& xp,const short& ver);
|
|
|
virtual int ReadPCG_WellsSection(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_StrataSection(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_FaultsSection(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_CalloutsSection(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_Intervals(CFile &fr,const short& ver,Struct_SectionWell &SectionWellInfor);
|
|
|
virtual int PCG_ReadMapsRange(CFile &fr,const short& ver);
|
|
|
virtual int ReadPCG_Text(CFile &fr,CXmlParse& xp,const short &ver);
|
|
|
virtual int ReadPCG_Ruler(CFile &fr,CXmlParse& xp,const short &ver);
|
|
|
virtual int ReadPCG_Picture(CFile &fr,CXmlParse& xp,const short &ver);
|
|
|
virtual int ReadPCG_Figure(CFile &fr,CXmlParse& xp,const short &ver);
|
|
|
virtual int ReadPCG_Lines(CFile &fr,CXmlParse& xp,const short &ver);
|
|
|
virtual int ReadPCG_Legend(CFile &fr,CXmlParse& xp,const short &ver);
|
|
|
virtual int ReadPCG_ScaleBox(CFile &fr,CXmlParse& xp,const short &ver);
|
|
|
|
|
|
virtual void WritePCG_Head(CFile &fw,int nBaseTabNum); //pcg文件中 头部分
|
|
|
virtual void WritePCG_Tail(CFile &fw,int nBaseTabNum); //pcg文件中 尾部分
|
|
|
virtual void WritePCG_Feature(CFile &fw,int nBaseTabNum); //pcg文件中 特征
|
|
|
virtual void WritePCG_Sections(CFile &fw,int nBaseTabNum); //pcg文件中 剖面
|
|
|
virtual void WritePCG_Wells(CFile &fw,int nBaseTabNum); //pcg文件中 井
|
|
|
virtual void WritePCG_VirtualWells(CFile &fw,int nBaseTabNum); //pcg文件中 虚井
|
|
|
virtual void WritePCG_Faults(CFile &fw,int nBaseTabNum); //pcg文件中 断层
|
|
|
virtual void WritePCG_Bends(CFile &fw,int nBaseTabNum); //pcg文件中连层
|
|
|
virtual void WritePCG_Datas(CFile &fw,int nBaseTabNum); //pcg文件中 数据
|
|
|
virtual void WritePCG_Strata(CFile &fw,int nBaseTabNum); //pcg文件中连层
|
|
|
virtual void WritePCG_Callouts(CFile &fw, const short& ver,int nBaseTabNum); //pcg文件中文本框以及标注
|
|
|
|
|
|
virtual void WritePCG_Title(CFile &fw,int nBaseTabNum);
|
|
|
virtual void WritePCG_Styles(CFile &fw,int nBaseTabNum);
|
|
|
virtual void WritePCG_Marks(CFile &fw,int nBaseTabNum);
|
|
|
virtual void WritePCG_ShowRange(CFile &fw,int nBaseTabNum);
|
|
|
virtual void WritePCG_MapsRange(CFile &fw,int nBaseTabNum);
|
|
|
virtual void WritePCG_SectionWells(CFile &fw,int nBaseTabNum);
|
|
|
|
|
|
|
|
|
virtual void WriteDML_Head(CFile &fw,int nBaseTabNum); //pcg文件中 头部分
|
|
|
virtual void WriteDML_Tail(CFile &fw,int nBaseTabNum); //pcg文件中 尾部分
|
|
|
virtual void WriteDML_Feature(CFile &fw,int nBaseTabNum); //pcg文件中 特征
|
|
|
virtual void WriteDML_Sections(CFile &fw,int nBaseTabNum); //pcg文件中 剖面
|
|
|
virtual void WriteDML_Wells(CFile &fw,int nBaseTabNum); //pcg文件中 井
|
|
|
virtual void WriteDML_VirtualWells(CFile &fw,int nBaseTabNum); //pcg文件中 虚井
|
|
|
virtual void WriteDML_Faults(CFile &fw,int nBaseTabNum); //pcg文件中 断层
|
|
|
virtual void WriteDML_Datas(CFile &fw,int nBaseTabNum); //pcg文件中 数据
|
|
|
virtual void WriteDML_Strata(CFile &fw,int nBaseTabNum); //pcg文件中连层
|
|
|
virtual void WriteDML_Callouts(CFile &fw, const short& ver,int nBaseTabNum); //pcg文件中文本框以及标注
|
|
|
|
|
|
|
|
|
virtual int ReadDML_Feature(CXmlParse &xp,const short& ver);
|
|
|
|
|
|
protected:
|
|
|
void WriteXml_Strata(CFile &fw,int nBaseTabNum,int xmlId = 1); // xmlId = 1(dml), xmlId=2(pcg);
|
|
|
|
|
|
|
|
|
|
|
|
void PCG1_0_SetBend();
|
|
|
void SetWellForBend(CBendObj *pBend);
|
|
|
public:
|
|
|
DWORD ComputedBends(std::vector<CBendObj*>* pBendVcs);
|
|
|
void ComputeAllBendsTopBottomForResForm();
|
|
|
void ComputeAllBendsByThreads();
|
|
|
|
|
|
CBendObj* FindBend(CWellBaseObj* pLeftLayer, CWellBaseObj* pRightLayer, CWellPole* pLeftWell, CWellPole* pRightWell);
|
|
|
|
|
|
virtual void DeleteInTrackObj(CWellBaseObj* pBaseObj);
|
|
|
public :
|
|
|
virtual int ReadPCG(CKXmlParse& xp, const short &ver);
|
|
|
virtual int ReadDML_Feature(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_Head(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_Feature(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_Section(CKXmlParse &xp, const short& ver ,BOOL bOnlyProperties = FALSE);
|
|
|
virtual int ReadPCG_Wells(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_VirtualWells(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_Faults(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_Bends(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_Strata(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_Datas(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_Callouts(CKXmlParse &xp, const short& ver);
|
|
|
|
|
|
virtual int ReadPCG_DoucmentTextBox(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_StylesSection(CKXmlParse& xp, const short& ver);
|
|
|
virtual int ReadPCG_TitleSection(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_MarkSection(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_RangeSection(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_WellsSection(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_StrataSection(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_FaultsSection(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_CalloutsSection(CKXmlParse &xp, const short& ver);
|
|
|
|
|
|
virtual int ReadPCG_Intervals(CKXmlParse &xp, const short& ver, Struct_SectionWell &SectionWellInfor);
|
|
|
virtual int PCG_ReadMapsRange(CKXmlParse &xp, const short& ver);
|
|
|
virtual int ReadPCG_Text(CKXmlParse &xp, const short &ver);
|
|
|
virtual int ReadPCG_Ruler(CKXmlParse &xp, const short &ver);
|
|
|
virtual int ReadPCG_Picture(CKXmlParse &xp, const short &ver);
|
|
|
virtual int ReadPCG_Figure(CKXmlParse &xp, const short &ver);
|
|
|
virtual int ReadPCG_Lines(CKXmlParse &xp, const short &ver);
|
|
|
virtual int ReadPCG_Legend(CKXmlParse &xp, const short &ver);
|
|
|
virtual int ReadPCG_ScaleBox(CKXmlParse &xp, const short &ver);
|
|
|
|
|
|
//层中连层链表的重新排序;BendList连层链表; 按照连层nInt(1=左或者2=右)边的层由高到底排序
|
|
|
static void ReOrederBendList(WELLOBJLIST& BendList, int nInt);
|
|
|
|
|
|
void* CloneElementWithoutWells(void);//克隆一个不包含井的剖面,在undo/redo时用来保存变化的bend和fault,可以加快速度
|
|
|
void ExchangeBendsAndFaults(CWellSection* pOther);
|
|
|
protected:
|
|
|
void SerializeSelf(CArchive& ar, const short &ver, BOOL haveWells);
|
|
|
void SerializeWithoutWells(CArchive& ar, const short &ver);
|
|
|
void ReSetScaleHor_old(double dScale);
|
|
|
void ReSetScaleHor_Resform(double dScale);
|
|
|
void ReSetWellDistanse_old(double dDis);
|
|
|
|
|
|
int ReadPCG_Stratification(CKXmlParse& xp, const short& ver); //读取地层分层级别数据
|
|
|
void ReadPCG_WellLayerDivision(CKXmlParse& xp, const short& ver);
|
|
|
void ReadPCG_StratumDivision(CKXmlParse& xp, const short& ver);
|
|
|
void WritePCG_Stratification(CFile& fw, int nBaseTabNum); //写地层分层级别数据
|
|
|
virtual void WritePCG_WellDataTables(CFile& fw, const short& ver, int nBaseTabNum);
|
|
|
public:
|
|
|
CTreeBase m_WellStratiTree; //井分层树
|
|
|
CString m_WellStratificationJson;
|
|
|
|
|
|
CTreeBase m_StratumDivisionTree; //地质分层树
|
|
|
CString m_strStratumDivisionJson;
|
|
|
|
|
|
|
|
|
virtual BOOL SetWellStratification(CString& jsonStr);
|
|
|
virtual BOOL SetStratumDivision(CString& jsonStr);
|
|
|
|
|
|
public:
|
|
|
void ExchangeModifiedSizeWell(CWellPole* pOldWell, CWellPole* pNewWell); //当只有井或井内部对象数据发生变化时,可以使用备份井进行替换(如果发生删除,增加等操作,不要使用)。
|
|
|
virtual int ReadPCG_TableDatas(CKXmlParse& xp, const short& ver);
|
|
|
|
|
|
void ReSetWellRealDistance(BOOL bAvg, double AvgDis = 0); //是否平均距离,
|
|
|
int GetWellPosInList(CWellPole*);
|
|
|
CWellPole* GetWellFromiPos(int ipos);
|
|
|
|
|
|
virtual void ComputeSectionRect();
|
|
|
CString GetNewFaultName();
|
|
|
|
|
|
void SetWellPoleDisplayMode(int iMode); //imode=0直井模式、=1斜井模式、=2垂深模式
|
|
|
|
|
|
};
|
|
|
|
|
|
#endif |