|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
|
//#include "nlohmann\json.hpp"
|
|
|
|
|
|
#include "WellObjectAttributesXml.h"
|
|
|
|
|
|
#include "DrawOperator/Encoding.h"
|
|
|
|
|
|
#include "DrawOperator/KXmlParse.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "MultiWellSectionLib/SectionWellObj.h"
|
|
|
|
|
|
#include "MultiWellSectionLib/BendObj.h"
|
|
|
|
|
|
#include "MultiWellSectionLib/FaultObj.h"
|
|
|
|
|
|
#include "MultiWellSectionLib/WellSection.h"
|
|
|
|
|
|
#include "WellPoleDoc.h"
|
|
|
|
|
|
#include "WellPoleView.h"
|
|
|
|
|
|
#include "./WellSection/MultiWellSectionDoc.h"
|
|
|
|
|
|
#include "./WellSection/MultiWellSectionlView.h"
|
|
|
|
|
|
#include "./WellPoleLib/WellMarkNamesList.h"
|
|
|
|
|
|
|
|
|
|
|
|
CString GetGdfFontStr( GDFLOGFONTEXT &gdffont)
|
|
|
|
|
|
{
|
|
|
|
|
|
CPublicFunction& pf = *AfxGetPublicFunction();
|
|
|
|
|
|
CString strW, strH, strSpace, strClr, str;
|
|
|
|
|
|
pf.FloatToString(strW, gdffont.m_dWidth);
|
|
|
|
|
|
pf.FloatToString(strH, gdffont.m_dHeight);
|
|
|
|
|
|
pf.FloatToString(strSpace, gdffont.m_dTextSpace);
|
|
|
|
|
|
strClr = pf.ColorRefToHex(gdffont.m_color);
|
|
|
|
|
|
|
|
|
|
|
|
str.Format("W=\"%s\" H=\"%s\" B=\"%d\" I=\"%d\" U=\"%d\" S=\"%d\" PF=\"%s\" FN=\"%s\" C=\"%s\" SP=\"%d\"",
|
|
|
|
|
|
strW, strH, gdffont.m_logFont.lfWeight, gdffont.m_logFont.lfItalic, gdffont.m_logFont.lfUnderline
|
|
|
|
|
|
, gdffont.m_logFont.lfStrikeOut, strSpace, gdffont.m_logFont.lfFaceName, strClr, gdffont.m_nScript);
|
|
|
|
|
|
return str;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CString GetGdfPenStr(GDFLOGPENEXT& pen)
|
|
|
|
|
|
{
|
|
|
|
|
|
CPublicFunction& pf = *AfxGetPublicFunction();
|
|
|
|
|
|
CString str,strClr,strbSolid;
|
|
|
|
|
|
if (pen.m_bSolid)
|
|
|
|
|
|
strbSolid = "TRUE";
|
|
|
|
|
|
else
|
|
|
|
|
|
strbSolid = "FALSE";
|
|
|
|
|
|
|
|
|
|
|
|
strClr = pf.ColorRefToHex(pen.m_color);
|
|
|
|
|
|
str.Format("Width=\"%lf\" Solid=\"%s\" Color=\"%s\" Style=\"%s\"",
|
|
|
|
|
|
TransformPixelToPound(pen.m_dWidth),strbSolid, strClr, pen.m_style);
|
|
|
|
|
|
|
|
|
|
|
|
return str;
|
|
|
|
|
|
}
|
|
|
|
|
|
//"<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>": "W=\"20\" H=\"20\" U=\"0\" I=\"0\" B=\"0\" S=\"0\" PF=\"\" FN=\"<22><><EFBFBD><EFBFBD>\" C=\"#FF0000\" SP=\"0\"",
|
|
|
|
|
|
void SetStrValueToGdfFont(CString strValue , GDFLOGFONTEXT &gdffont)
|
|
|
|
|
|
{
|
|
|
|
|
|
CPublicFunction& pf = *AfxGetPublicFunction();
|
|
|
|
|
|
CString str, strKey, val;
|
|
|
|
|
|
CStringArray strArr;
|
|
|
|
|
|
MakeStrToArr1(strValue, strArr, " ");
|
|
|
|
|
|
for (int ii = 0; ii < strArr.GetSize(); ii++)
|
|
|
|
|
|
{
|
|
|
|
|
|
str = strArr[ii];
|
|
|
|
|
|
int pos = str.Find("=");
|
|
|
|
|
|
if (pos <1)
|
|
|
|
|
|
{
|
|
|
|
|
|
continue;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
strKey = str.Left(pos + 1);
|
|
|
|
|
|
val = str.Right(str.GetLength() - (pos + 1));
|
|
|
|
|
|
if (strKey == "W")
|
|
|
|
|
|
{
|
|
|
|
|
|
gdffont.m_dWidth = atoi(val);
|
|
|
|
|
|
gdffont.m_logFont.lfWidth = long(gdffont.m_dWidth + 0.5);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (strKey == "H")
|
|
|
|
|
|
{
|
|
|
|
|
|
gdffont.m_dHeight = atoi(val);
|
|
|
|
|
|
gdffont.m_logFont.lfHeight = long(gdffont.m_dHeight + 0.5);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (strKey == "U")
|
|
|
|
|
|
gdffont.m_logFont.lfUnderline = atoi(val);
|
|
|
|
|
|
else if (strKey == "I")
|
|
|
|
|
|
gdffont.m_logFont.lfItalic = atoi(val);
|
|
|
|
|
|
else if (strKey == "B")
|
|
|
|
|
|
gdffont.m_logFont.lfWeight = atoi(val);
|
|
|
|
|
|
else if (strKey == "S")
|
|
|
|
|
|
gdffont.m_logFont.lfStrikeOut = atoi(val);
|
|
|
|
|
|
else if (strKey == "PF")
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (strKey == "FN")
|
|
|
|
|
|
strcpy(gdffont.m_logFont.lfFaceName, val.GetBuffer());
|
|
|
|
|
|
else if (strKey == "C")
|
|
|
|
|
|
{
|
|
|
|
|
|
gdffont.m_color = pf.HexToColorRef(val);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (strKey == "SP")
|
|
|
|
|
|
{
|
|
|
|
|
|
gdffont.m_nScript = atoi(val);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//"Color=\"#FF00FF\" Solid=\"FALSE\" Width=\"0.00\" Style=\"Single4\"",
|
|
|
|
|
|
void SetStrValueToGdfPen(CString strValue, GDFLOGPENEXT& gdfpen)
|
|
|
|
|
|
{
|
|
|
|
|
|
CPublicFunction& pf = *AfxGetPublicFunction();
|
|
|
|
|
|
|
|
|
|
|
|
CString str, strKey, val;
|
|
|
|
|
|
CStringArray strArr;
|
|
|
|
|
|
MakeStrToArr1(strValue, strArr, " ");
|
|
|
|
|
|
for (int ii = 0; ii < strArr.GetSize(); ii++)
|
|
|
|
|
|
{
|
|
|
|
|
|
str = strArr[ii];
|
|
|
|
|
|
int pos = str.Find("=");
|
|
|
|
|
|
if (pos < 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
continue;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
strKey = str.Left(pos + 1);
|
|
|
|
|
|
val = str.Right(str.GetLength() - (pos + 1));
|
|
|
|
|
|
if (strKey == "Width")
|
|
|
|
|
|
gdfpen.m_dWidth = atof(val);//<2F><>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>
|
|
|
|
|
|
else if (strKey == "Style")
|
|
|
|
|
|
gdfpen.m_style = val;
|
|
|
|
|
|
else if (strKey == "Color")
|
|
|
|
|
|
{
|
|
|
|
|
|
gdfpen.m_color = pf.HexToColorRef(val);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (strKey == "Solid")
|
|
|
|
|
|
{
|
|
|
|
|
|
val.MakeUpper();
|
|
|
|
|
|
if (val == "TRUE")
|
|
|
|
|
|
{
|
|
|
|
|
|
gdfpen.m_bSolid = TRUE;
|
|
|
|
|
|
if (gdfpen.m_pHowToViewCurve)
|
|
|
|
|
|
delete gdfpen.m_pHowToViewCurve;
|
|
|
|
|
|
gdfpen.m_pHowToViewCurve = NULL;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
gdfpen.m_bSolid = FALSE;
|
|
|
|
|
|
|
|
|
|
|
|
if (AfxGetGlobalWellXy())
|
|
|
|
|
|
{
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
CString cmd;
|
|
|
|
|
|
cmd.Format("%s\\%s", LIB_CURVE_TYPE, gdfpen.m_style);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
CLayer* pLayer = AfxGetGlobalWellXy()->FindLayer(cmd);
|
|
|
|
|
|
if (pLayer)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pLayer->HowToViewCurve)
|
|
|
|
|
|
{
|
|
|
|
|
|
gdfpen.m_pHowToViewCurve = new CHowToViewCurve();
|
|
|
|
|
|
*gdfpen.m_pHowToViewCurve = *(pLayer->HowToViewCurve);
|
|
|
|
|
|
gdfpen.m_pHowToViewCurve->SetColor(gdfpen.m_color);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CWellObjectAttributesXml::CWellObjectAttributesXml()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::GetWellObjectAttributes(ULONGLONG objHandle, int type, int ttype, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellBaseObj* pWellBase = (CWellBaseObj*)objHandle;
|
|
|
|
|
|
if (type == KEP_WELL)
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellPole* pWell = dynamic_cast<CWellPole*>(pWellBase);
|
|
|
|
|
|
b = CWellObjectAttributesXml::GetWellAttributes(pWell, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (type == KEP_TRACK)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (ttype == Track_Group)
|
|
|
|
|
|
{
|
|
|
|
|
|
CTrackGroup* pTrackGroup = dynamic_cast<CTrackGroup*>(pWellBase);
|
|
|
|
|
|
if (pTrackGroup == NULL) return b;
|
|
|
|
|
|
b = CWellObjectAttributesXml::GetGroupTrackAttributes(pTrackGroup, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
CTrackObj* pTrack = dynamic_cast<CTrackObj*>(pWellBase);
|
|
|
|
|
|
if (pTrack == NULL) return b;
|
|
|
|
|
|
b = CWellObjectAttributesXml::GetTrackAttributes(pTrack, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (type == KEP_TRACKINDATA)
|
|
|
|
|
|
{
|
|
|
|
|
|
b = CWellObjectAttributesXml::GetInTrackDataAttributes(pWellBase,ttype, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (type == KEP_SECTIONBEND)
|
|
|
|
|
|
{
|
|
|
|
|
|
CBendObj* pBend = dynamic_cast<CBendObj*>(pWellBase);
|
|
|
|
|
|
b = CWellObjectAttributesXml::GetSectionBendAttributes(pBend, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (type == KEP_SECTIONFAULT)
|
|
|
|
|
|
{
|
|
|
|
|
|
CFaultObj *pFault = dynamic_cast<CFaultObj*>(pWellBase);
|
|
|
|
|
|
b = CWellObjectAttributesXml::GetSectionFaultAttributes(pFault, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (type == KEP_WELLSECTION)
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellSection *pSection = dynamic_cast<CWellSection*>(pWellBase);
|
|
|
|
|
|
b = CWellObjectAttributesXml::GetWellSectionAttributes(pSection, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (b)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (std::exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
}
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CWellObjectAttributesXml::SaveUndoRedoAction(CSigmaView* pView)
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellPoleView *pWellView = dynamic_cast<CWellPoleView*>(pView);
|
|
|
|
|
|
CMultiWellSectionView *pSectionView = dynamic_cast<CMultiWellSectionView*>(pView);
|
|
|
|
|
|
if (pWellView)
|
|
|
|
|
|
{
|
|
|
|
|
|
pWellView->SaveUndoRedoAction();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (pSectionView)
|
|
|
|
|
|
{
|
|
|
|
|
|
pSectionView->SaveUndoRedoAction();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::SetWellObjectAttributes(CSigmaView* pView, ULONGLONG objHandle, int type, int ttype, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellBaseObj* pWellBase = (CWellBaseObj*)objHandle;
|
|
|
|
|
|
if (type == KEP_WELL)
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellPole* pWell = dynamic_cast<CWellPole*>(pWellBase);
|
|
|
|
|
|
b = CWellObjectAttributesXml::SetWellAttributes(pView,pWell, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (type == KEP_TRACK)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (ttype == Track_Group)
|
|
|
|
|
|
{
|
|
|
|
|
|
CTrackGroup* pTrackGroup = dynamic_cast<CTrackGroup*>(pWellBase);
|
|
|
|
|
|
if (pTrackGroup == NULL) return b;
|
|
|
|
|
|
b = CWellObjectAttributesXml::SetGroupTrackAttributes(pView,pTrackGroup, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
CTrackObj* pTrack = dynamic_cast<CTrackObj*>(pWellBase);
|
|
|
|
|
|
if (pTrack == NULL) return b;
|
|
|
|
|
|
b = CWellObjectAttributesXml::SetTrackAttributes(pView,pTrack, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (type == KEP_TRACKINDATA)
|
|
|
|
|
|
{
|
|
|
|
|
|
b = CWellObjectAttributesXml::SetInTrackDataAttributes(pView,pWellBase,ttype, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (type == KEP_SECTIONBEND)
|
|
|
|
|
|
{
|
|
|
|
|
|
CBendObj* pBend = dynamic_cast<CBendObj*>(pWellBase);
|
|
|
|
|
|
b = CWellObjectAttributesXml::SetSectionBendAttributes(pView,pBend, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (type == KEP_SECTIONFAULT)
|
|
|
|
|
|
{
|
|
|
|
|
|
CFaultObj *pFault = dynamic_cast<CFaultObj*>(pWellBase);
|
|
|
|
|
|
b = CWellObjectAttributesXml::SetSectionFaultAttributes(pView,pFault, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (type == KEP_WELLSECTION)
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellSection *pSection = dynamic_cast<CWellSection*>(pWellBase);
|
|
|
|
|
|
b = CWellObjectAttributesXml::SetWellSectionAttributes(pView,pSection, strXml);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (std::exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
}
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::GetWellAttributes(CWellPole* pWell, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
CPublicFunction& pf = *AfxGetPublicFunction();
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
if (pWell)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pWell->IsSectionWell())
|
|
|
|
|
|
{
|
|
|
|
|
|
CSectionWellObj* pSectionWell = (CSectionWellObj*)pWell;
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
CMemFile file;
|
|
|
|
|
|
pf.WritePCG_Head(file, ver);
|
|
|
|
|
|
|
|
|
|
|
|
int nBaseTabNum = 1;
|
|
|
|
|
|
pSectionWell->WritePCG_WellTraces(file, 1,FALSE);
|
|
|
|
|
|
|
|
|
|
|
|
//pf.WritePCG_Head(file, ver);
|
|
|
|
|
|
//int nBaseTabNum = 1;
|
|
|
|
|
|
|
|
|
|
|
|
//pWell->WritePCG_Head(file, nBaseTabNum); //pcg<63>ļ<EFBFBD><C4BC><EFBFBD> ͷ<><CDB7><EFBFBD><EFBFBD>
|
|
|
|
|
|
//pWell->WritePCG_PrintTemplate(file, nBaseTabNum); //pcg<63>ļ<EFBFBD><C4BC><EFBFBD> <20><>ӡģ<D3A1><C4A3>
|
|
|
|
|
|
////WritePCG_Symbols(fw,ver,nBaseTabNum); //pcg<63>ļ<EFBFBD><C4BC><EFBFBD> <20><><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>
|
|
|
|
|
|
//pWell->WritePCG_Styles(file, nBaseTabNum); //pcg<63>ļ<EFBFBD><C4BC><EFBFBD> <20><>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
pf.WritePCG_Tail(file, ver);
|
|
|
|
|
|
|
|
|
|
|
|
ULONG fl = file.GetLength();
|
|
|
|
|
|
file.SeekToBegin();
|
|
|
|
|
|
LPTSTR pbuf = strXml.GetBuffer(fl + 1);
|
|
|
|
|
|
file.Read(pbuf, fl);
|
|
|
|
|
|
strXml.ReleaseBuffer(fl);
|
|
|
|
|
|
|
|
|
|
|
|
file.Close();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
CMemFile file;
|
|
|
|
|
|
pf.WritePCG_Head(file, ver);
|
|
|
|
|
|
int nBaseTabNum = 1;
|
|
|
|
|
|
|
|
|
|
|
|
pWell->WritePCG_Head(file, nBaseTabNum); //pcg<63>ļ<EFBFBD><C4BC><EFBFBD> ͷ<><CDB7><EFBFBD><EFBFBD>
|
|
|
|
|
|
pWell->WritePCG_PrintTemplate(file, nBaseTabNum); //pcg<63>ļ<EFBFBD><C4BC><EFBFBD> <20><>ӡģ<D3A1><C4A3>
|
|
|
|
|
|
//WritePCG_Symbols(fw,ver,nBaseTabNum); //pcg<63>ļ<EFBFBD><C4BC><EFBFBD> <20><><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD>
|
|
|
|
|
|
pWell->WritePCG_Styles(file, nBaseTabNum); //pcg<63>ļ<EFBFBD><C4BC><EFBFBD> <20><>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
pf.WritePCG_Tail(file, ver);
|
|
|
|
|
|
|
|
|
|
|
|
ULONG fl = file.GetLength();
|
|
|
|
|
|
file.SeekToBegin();
|
|
|
|
|
|
LPTSTR pbuf = strXml.GetBuffer(fl + 1);
|
|
|
|
|
|
file.Read(pbuf, fl);
|
|
|
|
|
|
strXml.ReleaseBuffer(fl);
|
|
|
|
|
|
|
|
|
|
|
|
file.Close();
|
|
|
|
|
|
}
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
}
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::SetWellAttributes(CSigmaView* pView, CWellPole* pWell, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
if (pWell)
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellPoleView* pWellView = dynamic_cast<CWellPoleView*>(pView);
|
|
|
|
|
|
CMultiWellSectionView* pSectionView = dynamic_cast<CMultiWellSectionView*>(pView);
|
|
|
|
|
|
|
|
|
|
|
|
CKXmlParse xp;
|
|
|
|
|
|
if (xp.SetXmlFileBuffer(strXml.GetBuffer(), strXml.GetLength()))
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pWellView)
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellObjectAttributesXml::SaveUndoRedoAction(pView);
|
|
|
|
|
|
|
|
|
|
|
|
double oldSdep = pWell->m_dSdep;
|
|
|
|
|
|
double oldEdep = pWell->m_dEdep;
|
|
|
|
|
|
double oldRatio = pWell->m_fProportion;
|
|
|
|
|
|
|
|
|
|
|
|
int wellType = pWell->GetWellType();
|
|
|
|
|
|
|
|
|
|
|
|
pWell->ReadPCG(xp, 2);
|
|
|
|
|
|
|
|
|
|
|
|
pWell->SetSpace(pWell->m_fMajorSpace, pWell->m_fMinorSpace);
|
|
|
|
|
|
|
|
|
|
|
|
//pWell->SetFontTrack(pWell->m_fontTrack);
|
|
|
|
|
|
|
|
|
|
|
|
pWell->SetFontHeadMark(pWell->m_fontHeadMark); //<2F><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
pWell->SetPenTrack(pWell->m_penTrack); //<2F><><EFBFBD>߿<EFBFBD><DFBF><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
pWell->SetPenGrid(pWell->m_penGridMajor, pWell->m_penGridMinor);//<2F><><EFBFBD>ο̶<CEBF><CCB6><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
if (pWell->m_dEdep < pWell->m_dSdep)
|
|
|
|
|
|
{//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻָ<CDBB><D6B8><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
pWell->m_dSdep = oldSdep;
|
|
|
|
|
|
pWell->m_dEdep = oldEdep;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (fabs(oldSdep - pWell->m_dSdep) > 0.000001 || fabs(oldEdep - pWell->m_dEdep) > 0.000001)
|
|
|
|
|
|
{//<2F><><EFBFBD>þ<EFBFBD><C3BE><EFBFBD><EFBFBD>ȶβ<C8B6><CEB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
pWell->SetIntervalTop(0, pWell->m_dSdep);
|
|
|
|
|
|
pWell->SetIntervalBottom(pWell->GetIntervalVec()->size() - 1, pWell->m_dEdep);
|
|
|
|
|
|
pWell->ReadCurveData();
|
|
|
|
|
|
}
|
|
|
|
|
|
if (pWell->GetWellType() != wellType)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pWell->GetWellType() == Well_Straight)
|
|
|
|
|
|
{
|
|
|
|
|
|
if(!pWell->IsVerticalPole())
|
|
|
|
|
|
pWell->CalculateSize(pWell->GetAnchorPoint());
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
pWell->ComputeTrajectory();
|
|
|
|
|
|
pWell->CalculateSize(pWell->GetAnchorPoint());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else if(pWell->GetWellType() == Well_Incline)
|
|
|
|
|
|
{
|
|
|
|
|
|
pWell->ComputeTrajectory();
|
|
|
|
|
|
if (fabs(pWell->GetProjectionAngle()) < 0.00001)
|
|
|
|
|
|
{
|
|
|
|
|
|
double angle = pWell->ComputeProjectAngle(); // GetWellProjecttionAngle(pWell);
|
|
|
|
|
|
|
|
|
|
|
|
pWell->SetProjectionAngle(angle); //<2F><><EFBFBD><EFBFBD>ͶӰ<CDB6>Ƕ<EFBFBD>
|
|
|
|
|
|
pWell->SetLevelProportion(pWell->m_fProportion);
|
|
|
|
|
|
pWell->CalculateSize(pWell->GetAnchorPoint());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pWell->GetWellType() == Well_Incline)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (fabs(oldSdep - pWell->m_dSdep) > 0.000001 || fabs(oldEdep - pWell->m_dEdep) > 0.000001
|
|
|
|
|
|
|| fabs(oldRatio - pWell->m_fProportion) > 0.000001)
|
|
|
|
|
|
{
|
|
|
|
|
|
pWell->ComputeTrajectory();
|
|
|
|
|
|
double angle = pWell->ComputeProjectAngle(); //GetWellProjecttionAngle(pWell);
|
|
|
|
|
|
|
|
|
|
|
|
pWell->SetProjectionAngle(pWell->GetProjectionAngle()); //<2F><><EFBFBD><EFBFBD>ͶӰ<CDB6>Ƕ<EFBFBD>
|
|
|
|
|
|
pWell->SetLevelProportion(pWell->m_fProportion);
|
|
|
|
|
|
pWell->CalculateSize(pWell->GetAnchorPoint());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (fabs(oldSdep - pWell->m_dSdep) > 0.000001 || fabs(oldEdep - pWell->m_dEdep) > 0.000001
|
|
|
|
|
|
|| fabs(oldRatio - pWell->m_fProportion) > 0.000001)
|
|
|
|
|
|
{
|
|
|
|
|
|
double dDelDepth = pWell->m_dSdep - oldSdep;
|
|
|
|
|
|
pWell->ResetChildPosition(pWell->m_fProportion, pWell->m_fProportion, dDelDepth);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (pSectionView)
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellObjectAttributesXml::SaveUndoRedoAction(pView);
|
|
|
|
|
|
CSectionWellObj* pSectionWell = (CSectionWellObj*)pWell;
|
|
|
|
|
|
double sdep = pSectionWell->m_dSdep;
|
|
|
|
|
|
double edep = pSectionWell->m_dEdep;
|
|
|
|
|
|
double flevel = pSectionWell->m_fLevel;
|
|
|
|
|
|
|
|
|
|
|
|
while (xp.ReadBeginSection())
|
|
|
|
|
|
{
|
|
|
|
|
|
if (xp.IsKey("/Well"))
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
if (!xp.IsKey("Well"))
|
|
|
|
|
|
continue;
|
|
|
|
|
|
pSectionWell->ReadPCG_Well(xp, 2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pSectionWell->SetSpace(pWell->m_fMajorSpace, pWell->m_fMinorSpace);
|
|
|
|
|
|
|
|
|
|
|
|
//pWell->SetFontTrack(pWell->m_fontTrack);
|
|
|
|
|
|
|
|
|
|
|
|
pSectionWell->SetFontHeadMark(pWell->m_fontHeadMark); //<2F><><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
pSectionWell->SetPenTrack(pWell->m_penTrack); //<2F><><EFBFBD>߿<EFBFBD><DFBF><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
pSectionWell->SetPenGrid(pWell->m_penGridMajor, pWell->m_penGridMinor);//<2F><><EFBFBD>ο̶<CEBF><CCB6><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
CWellSection* pSection = (CWellSection*)pSectionWell->GetParent();
|
|
|
|
|
|
if (fabs(sdep - pSectionWell->m_dSdep) > 0.001)
|
|
|
|
|
|
{
|
|
|
|
|
|
if ( pWell->m_dEdep < pWell->m_dSdep)
|
|
|
|
|
|
{
|
|
|
|
|
|
pWell->m_dSdep = pWell->m_dEdep - 5;
|
|
|
|
|
|
}
|
|
|
|
|
|
pWell->SetIntervalTop(0, pWell->m_dSdep);
|
|
|
|
|
|
|
|
|
|
|
|
pWell->m_HeadRect.top -= pWell->HeightToScreenCY(pWell->GetIntervalTop(0) - sdep);
|
|
|
|
|
|
|
|
|
|
|
|
pSectionView->ReSetWell(pWell);
|
|
|
|
|
|
pSection->ComputeControls(pWell, 0);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (fabs(edep - pSectionWell->m_dEdep) > 0.001)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pWell->m_dEdep < pWell->m_dSdep)
|
|
|
|
|
|
{
|
|
|
|
|
|
pWell->m_dEdep = pWell->m_dSdep + 5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pWell->SetIntervalBottom(pWell->GetIntervalVec()->size() - 1, pWell->m_dEdep);
|
|
|
|
|
|
|
|
|
|
|
|
pSectionView->ReSetWell(pWell);
|
|
|
|
|
|
pSection->ComputeControls(pWell, 0);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (fabs(flevel - pSectionWell->m_fLevel) > 0.001)
|
|
|
|
|
|
{
|
|
|
|
|
|
double fdelta = pWell->m_fLevel - flevel;
|
|
|
|
|
|
fdelta = pSection->HeightToScreenCY(fdelta);
|
|
|
|
|
|
|
|
|
|
|
|
CRect8 oldRect = pWell->GetRect();
|
|
|
|
|
|
|
|
|
|
|
|
oldRect.OffsetRect(0, fdelta);
|
|
|
|
|
|
pWell->m_delta = CPoint2D(0, fdelta);
|
|
|
|
|
|
pWell->MoveTo(oldRect);
|
|
|
|
|
|
|
|
|
|
|
|
pSectionView->ReSetWell(pWell);
|
|
|
|
|
|
pSection->ComputeControls(pWell, 0);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::GetInTrackDataAttributes(CWellBaseObj* pDataBase, int inTrackType, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
CPublicFunction& pf = *AfxGetPublicFunction();
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
|
|
|
|
|
|
if (pDataBase->IsTrackChildTopEnd())
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
CInTrackDepthSegment *pInTrackSeg = (CInTrackDepthSegment*)pDataBase;
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
CMemFile file;
|
|
|
|
|
|
pf.WritePCG_Head(file, ver);
|
|
|
|
|
|
int nBaseTabNum = 1;
|
|
|
|
|
|
|
|
|
|
|
|
pInTrackSeg->WritePCG_SelfData(file, nBaseTabNum);
|
|
|
|
|
|
|
|
|
|
|
|
CString str;
|
|
|
|
|
|
CWellPole* pWell = pInTrackSeg->GetWell();
|
|
|
|
|
|
|
|
|
|
|
|
BOOL bv = FALSE;
|
|
|
|
|
|
if (pWell->m_InclinedWellList.size() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
bv = 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
double vtopdep = pWell->GetVDepth(pInTrackSeg->m_fSdep);
|
|
|
|
|
|
double vbottomdep = pWell->GetVDepth(pInTrackSeg->m_fEdep);
|
|
|
|
|
|
str.Format("<VerticalDepth IsVertical=\"%d\" vtop=\"%.2f\" vbottom=\"%.2f\" />",bv,vtopdep,vbottomdep); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һЩ<D2BB><D0A9><EFBFBD>ò<EFBFBD><C3B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƕ<EFBFBD><C7B6><EFBFBD><EFBFBD><EFBFBD>pcg<63><67><EFBFBD>岿<EFBFBD>֣<EFBFBD>ֻ<EFBFBD>ǽ<EFBFBD><C7BD>д<EFBFBD><D0B4><EFBFBD>һЩ<D2BB><D0A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶ<EFBFBD><DDB6><EFBFBD>
|
|
|
|
|
|
pf.WriteLine(file, str);
|
|
|
|
|
|
|
|
|
|
|
|
pf.WritePCG_Tail(file, ver);
|
|
|
|
|
|
|
|
|
|
|
|
ULONG fl = file.GetLength();
|
|
|
|
|
|
file.SeekToBegin();
|
|
|
|
|
|
LPTSTR pbuf = strXml.GetBuffer(fl + 1);
|
|
|
|
|
|
file.Read(pbuf, fl);
|
|
|
|
|
|
strXml.ReleaseBuffer(fl);
|
|
|
|
|
|
|
|
|
|
|
|
file.Close();
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
}
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::SetInTrackDataAttributes(CSigmaView* pView, CWellBaseObj* pDataBase, int inTrackType, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
CKXmlParse xp;
|
|
|
|
|
|
if (pDataBase->IsTrackChildTopEnd() && xp.SetXmlFileBuffer(strXml.GetBuffer(), strXml.GetLength()))
|
|
|
|
|
|
{
|
|
|
|
|
|
CInTrackDepthSegment *pInTrackSeg = (CInTrackDepthSegment*)pDataBase;
|
|
|
|
|
|
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
while (xp.ReadBeginSection() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (xp.IsKey("/Pcg") )
|
|
|
|
|
|
break;
|
|
|
|
|
|
if (xp.ReadBeginSection() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellObjectAttributesXml::SaveUndoRedoAction(pView);
|
|
|
|
|
|
|
|
|
|
|
|
CTrackObj* pTrack = (CTrackObj*)pDataBase->GetParent();
|
|
|
|
|
|
pInTrackSeg->ReadPCG_SelfData(xp, ver, pTrack);
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
|
|
|
|
|
|
CWellPole* pWell = (CWellPole*)pTrack->GetWell();
|
|
|
|
|
|
if (pWell->GetParent() != NULL)
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellBaseObj* pBase = (CWellBaseObj*)pWell->GetParent();
|
|
|
|
|
|
if (pBase->GetType() == KEP_WELLSECTION)
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellSection *pWellSection = (CWellSection*)pBase;
|
|
|
|
|
|
POSITION pos = pWellSection->m_BendList.GetHeadPosition();
|
|
|
|
|
|
while (pos)
|
|
|
|
|
|
{
|
|
|
|
|
|
CBendObj *pBend = (CBendObj*)pWellSection->m_BendList.GetNext(pos);
|
|
|
|
|
|
if (pBend->m_pLayerLeft == pInTrackSeg || pBend->m_pLayerRight == pInTrackSeg)
|
|
|
|
|
|
pBend->ComputeBend();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (pWell->GetWellType() == Well_Incline)
|
|
|
|
|
|
{
|
|
|
|
|
|
pInTrackSeg->CalcInclinedBorder();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::GetGroupTrackAttributes(CTrackGroup* pTrack, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
CPublicFunction& pf = *AfxGetPublicFunction();
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
CMemFile file;
|
|
|
|
|
|
pf.WritePCG_Head(file, ver);
|
|
|
|
|
|
int nBaseTabNum = 1;
|
|
|
|
|
|
|
|
|
|
|
|
CTrackGroup parentTrack; //TrackGroup<75><70>Ƕ<EFBFBD><C7B6>дpcg<63><67>ÿ<EFBFBD><C3BF>trackgroup<75><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD><D7B5>п<EFBFBD>ʼд
|
|
|
|
|
|
CXy* pPxy = pTrack->GetParentXY();
|
|
|
|
|
|
CWellBaseObj* pParent = pTrack->GetParent();
|
|
|
|
|
|
|
|
|
|
|
|
parentTrack.SetParent(pTrack->GetWell());
|
|
|
|
|
|
parentTrack.AddTrack(pTrack);
|
|
|
|
|
|
parentTrack.WritePCG_WellTemp(file, nBaseTabNum);
|
|
|
|
|
|
|
|
|
|
|
|
parentTrack.RemoveTrack(pTrack);
|
|
|
|
|
|
pTrack->SetParentXY(pPxy);
|
|
|
|
|
|
pTrack->SetParent(pParent);
|
|
|
|
|
|
|
|
|
|
|
|
pf.WritePCG_Tail(file, ver);
|
|
|
|
|
|
ULONG fl = file.GetLength();
|
|
|
|
|
|
file.SeekToBegin();
|
|
|
|
|
|
LPTSTR pbuf = strXml.GetBuffer(fl + 1);
|
|
|
|
|
|
file.Read(pbuf, fl);
|
|
|
|
|
|
strXml.ReleaseBuffer(fl);
|
|
|
|
|
|
|
|
|
|
|
|
file.Close();
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::SetGroupTrackAttributes(CSigmaView* pView, CTrackGroup* pTrack, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
|
|
|
|
|
|
CKXmlParse xp;
|
|
|
|
|
|
if (xp.SetXmlFileBuffer(strXml.GetBuffer(), strXml.GetLength()))
|
|
|
|
|
|
{
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
int traceTotalCount = 0;
|
|
|
|
|
|
CWellPole* pWell = pTrack->GetWell();
|
|
|
|
|
|
PCG_WELLTEMPCOL *pWellCol = new PCG_WELLTEMPCOL;
|
|
|
|
|
|
|
|
|
|
|
|
while (xp.ReadBeginSection() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (xp.IsKey("/Pcg") || xp.IsKey("/WellColumn"))
|
|
|
|
|
|
break;
|
|
|
|
|
|
if (xp.IsKey("WellColumn"))
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pWell->ReadPCG_WellColumn(xp, ver, pWellCol, traceTotalCount) == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
pTrack->m_strTitle = pWellCol->combName;
|
|
|
|
|
|
pTrack->m_font = pWellCol->logfont;
|
|
|
|
|
|
//pTrack->m_font = pWellCol->
|
|
|
|
|
|
delete pWellCol;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::GetTrackAttributes(CTrackObj* pTrack, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
CPublicFunction& pf = *AfxGetPublicFunction();
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
CMemFile file;
|
|
|
|
|
|
pf.WritePCG_Head(file, ver);
|
|
|
|
|
|
int nBaseTabNum = 1;
|
|
|
|
|
|
|
|
|
|
|
|
pTrack->WritePCG_Trace(file, nBaseTabNum);
|
|
|
|
|
|
|
|
|
|
|
|
CString str,strPara;
|
|
|
|
|
|
|
|
|
|
|
|
if (pTrack->GetTrackType() == Track_Result)
|
|
|
|
|
|
{
|
|
|
|
|
|
str.Format("<ExtendedData type=\"trackResult\" >"); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һЩ<D2BB><D0A9><EFBFBD>ò<EFBFBD><C3B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƕ<EFBFBD><C7B6><EFBFBD><EFBFBD><EFBFBD>pcg<63><67><EFBFBD>岿<EFBFBD>֣<EFBFBD>ֻ<EFBFBD>ǽ<EFBFBD><C7BD>д<EFBFBD><D0B4><EFBFBD>һЩ<D2BB><D0A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶ<EFBFBD><DDB6><EFBFBD>
|
|
|
|
|
|
pf.WriteLine(file, str);
|
|
|
|
|
|
|
|
|
|
|
|
str.Format("<Data SandRenderType=\"\" ShowMarkType=\"\" />");
|
|
|
|
|
|
pf.WriteLine(file, str);
|
|
|
|
|
|
|
|
|
|
|
|
str.Format("</ExtendedData>");
|
|
|
|
|
|
pf.WriteLine(file, str);
|
|
|
|
|
|
}
|
|
|
|
|
|
pf.WritePCG_Tail(file, ver);
|
|
|
|
|
|
ULONG fl = file.GetLength();
|
|
|
|
|
|
file.SeekToBegin();
|
|
|
|
|
|
LPTSTR pbuf = strXml.GetBuffer(fl + 1);
|
|
|
|
|
|
file.Read(pbuf, fl);
|
|
|
|
|
|
strXml.ReleaseBuffer(fl);
|
|
|
|
|
|
|
|
|
|
|
|
file.Close();
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::SetTrackAttributes(CSigmaView* pView, CTrackObj* pTrack, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
CPublicFunction& pf = *AfxGetPublicFunction();
|
|
|
|
|
|
CKXmlParse xp;
|
|
|
|
|
|
CWellPole* pWell = pTrack->GetWell();
|
|
|
|
|
|
PCG_TRACECOL traceCol;
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
|
|
|
|
|
|
if (xp.SetXmlFileBuffer(strXml.GetBuffer(), strXml.GetLength()))
|
|
|
|
|
|
{
|
|
|
|
|
|
CString strOldDataSource = pTrack->m_dataSourceID;
|
|
|
|
|
|
CString strOldCol = pTrack->m_dataColID;
|
|
|
|
|
|
|
|
|
|
|
|
GDFLOGPENEXT oldChildPen = pTrack->m_penChild;
|
|
|
|
|
|
GDFLOGFONTEXT oldChildFont = pTrack->m_fontChild;
|
|
|
|
|
|
|
|
|
|
|
|
while (xp.ReadBeginSection() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (xp.IsKey("/Pcg") || xp.IsKey("/WellTrack"))
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
//if (!xp.IsKey("WellTrack") && !xp.IsKey("WellTrace"))
|
|
|
|
|
|
// continue;
|
|
|
|
|
|
|
|
|
|
|
|
if (xp.IsKey("WellTrack") || xp.IsKey("WellTrace"))
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pWell->ReadPCG_Traces_GetTraceProps(xp, traceCol) == 0)
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
CWellObjectAttributesXml::SaveUndoRedoAction(pView);
|
|
|
|
|
|
|
|
|
|
|
|
pTrack->ReadPCG_Trace(xp, ver, traceCol);
|
|
|
|
|
|
pTrack->m_strTrackName = traceCol.name;
|
|
|
|
|
|
if (traceCol.width >= 0)
|
|
|
|
|
|
pTrack->m_dTrackWidth = pWell->ScreenCXToWidth(traceCol.width);
|
|
|
|
|
|
pTrack->SetFlagBrush(traceCol.backFill);
|
|
|
|
|
|
pTrack->m_brush.m_color = traceCol.backColor;
|
|
|
|
|
|
if (pTrack->GetTrackType() == Track_Curve)
|
|
|
|
|
|
{
|
|
|
|
|
|
CTrackCurve* pCurveTrack = (CTrackCurve*)pTrack;
|
|
|
|
|
|
pCurveTrack->CheckLogLeftRightValue();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pTrack->SetPenChild(pTrack->m_penChild);
|
|
|
|
|
|
pTrack->SetFontChild(pTrack->m_fontChild);
|
|
|
|
|
|
|
|
|
|
|
|
pTrack->afterCalculateSize(); //<2F><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD>ڼ<EFBFBD><DABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (xp.IsKey("ExtendedData"))
|
|
|
|
|
|
{
|
|
|
|
|
|
CString strType;
|
|
|
|
|
|
CString tkey, tval;
|
|
|
|
|
|
for (int i = 0; i < xp.m_valArray.size(); i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!xp.ParaseKeyValue(i, tkey, tval))
|
|
|
|
|
|
{
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (xp.IsKey(tkey, "type"))
|
|
|
|
|
|
{
|
|
|
|
|
|
strType = tval;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
while (xp.ReadBeginSection() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (xp.IsKey("/Pcg") || xp.IsKey("/ExtendedData"))
|
|
|
|
|
|
break;
|
|
|
|
|
|
if (xp.IsKey("Data"))
|
|
|
|
|
|
{
|
|
|
|
|
|
if (strType == "trackResult")
|
|
|
|
|
|
{
|
|
|
|
|
|
CTrackResult* pTrackResult = (CTrackResult*)pTrack;
|
|
|
|
|
|
for (int i = 0; i < xp.m_valArray.size(); i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!xp.ParaseKeyValue(i, tkey, tval))
|
|
|
|
|
|
{
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (xp.IsKey(tkey, "SandRenderType"))
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!tval.IsEmpty())
|
|
|
|
|
|
{
|
|
|
|
|
|
WELLOBJLIST::iterator it = pTrackResult->GetChildren().begin();
|
|
|
|
|
|
for (; it != pTrackResult->GetChildren().end(); it++)
|
|
|
|
|
|
{
|
|
|
|
|
|
if ((*it)->GetType() == KEP_RESULT)
|
|
|
|
|
|
{
|
|
|
|
|
|
CInTrackResult* pResult = (CInTrackResult*)(*it);
|
|
|
|
|
|
if (tval == "Standard")
|
|
|
|
|
|
{
|
|
|
|
|
|
pResult->SetShowRenderBrief(FALSE);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (tval == "Brief")
|
|
|
|
|
|
{
|
|
|
|
|
|
pResult->SetShowRenderBrief(TRUE);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (xp.IsKey(tkey, "ShowMarkType"))
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!tval.IsEmpty())
|
|
|
|
|
|
{
|
|
|
|
|
|
WELLOBJLIST::iterator it = pTrackResult->GetChildren().begin();
|
|
|
|
|
|
for (; it != pTrackResult->GetChildren().end(); it++)
|
|
|
|
|
|
{
|
|
|
|
|
|
if ((*it)->GetType() == KEP_RESULT)
|
|
|
|
|
|
{
|
|
|
|
|
|
CInTrackResult* pResult = (CInTrackResult*)(*it);
|
|
|
|
|
|
if (tval == "Name")
|
|
|
|
|
|
{
|
|
|
|
|
|
pResult->SetShowName(TRUE);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (tval == "PureThickness")
|
|
|
|
|
|
{
|
|
|
|
|
|
pResult->SetShowPureThickness(TRUE);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (tval == "Thickness")
|
|
|
|
|
|
{
|
|
|
|
|
|
pResult->SetShowThickness(TRUE);
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (tval == "ResultName")
|
|
|
|
|
|
{
|
|
|
|
|
|
pResult->SetShowResult(TRUE);
|
|
|
|
|
|
}
|
|
|
|
|
|
//else if (tval == "")
|
|
|
|
|
|
//{
|
|
|
|
|
|
// pResult->DisableShowMark();
|
|
|
|
|
|
//}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (b)
|
|
|
|
|
|
{
|
|
|
|
|
|
if(strOldDataSource != pTrack->m_dataSourceID || strOldCol != pTrack->m_dataColID)
|
|
|
|
|
|
pTrack->SetDataRefID(pTrack->m_dataSourceID, pTrack->m_dataColID);
|
|
|
|
|
|
|
|
|
|
|
|
pWell->CalculateSize(pWell->GetAnchorPoint());
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::GetSectionBendAttributes( CBendObj* pBend, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
CPublicFunction& pf = *AfxGetPublicFunction();
|
|
|
|
|
|
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
CMemFile file;
|
|
|
|
|
|
pf.WritePCG_Head(file, ver);
|
|
|
|
|
|
int nBaseTabNum = 1;
|
|
|
|
|
|
|
|
|
|
|
|
pBend->WriteDML_PCG(file, 2);
|
|
|
|
|
|
|
|
|
|
|
|
pf.WritePCG_Tail(file, ver);
|
|
|
|
|
|
|
|
|
|
|
|
ULONG fl = file.GetLength();
|
|
|
|
|
|
file.SeekToBegin();
|
|
|
|
|
|
LPTSTR pbuf = strXml.GetBuffer(fl + 1);
|
|
|
|
|
|
file.Read(pbuf, fl);
|
|
|
|
|
|
strXml.ReleaseBuffer(fl);
|
|
|
|
|
|
|
|
|
|
|
|
file.Close();
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::SetSectionBendAttributes(CSigmaView* pView, CBendObj* pBend, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
CKXmlParse xp;
|
|
|
|
|
|
if (xp.SetXmlFileBuffer(strXml.GetBuffer(), strXml.GetLength()))
|
|
|
|
|
|
{
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
|
|
|
|
|
|
CString strOldStyle = pBend->m_strLineBreakStyle;
|
|
|
|
|
|
|
|
|
|
|
|
CString key, val;
|
|
|
|
|
|
while (xp.ReadBeginSection() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (xp.IsKey("/Pcg"))
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
if (xp.ReadBeginSection() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < xp.m_valArray.size(); i++)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!xp.ParaseKeyValue(i, key, val))
|
|
|
|
|
|
{
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (xp.IsKey(key, "StyleName"))
|
|
|
|
|
|
{
|
|
|
|
|
|
pBend->m_strLineBreakStyle = val;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CWellObjectAttributesXml::SaveUndoRedoAction(pView);
|
|
|
|
|
|
|
|
|
|
|
|
pBend->ReadPCG_BendProperties(xp, 2);
|
|
|
|
|
|
|
|
|
|
|
|
if (pBend->m_strLineBreakStyle != strOldStyle)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pBend->m_strLineBreakStyle == "ȱʡ<EFBFBD><EFBFBD>ʽ")
|
|
|
|
|
|
{
|
|
|
|
|
|
pBend->SetBendStyle(pBend->m_strLineBreakStyle);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pBend->m_pLayerRight != NULL )
|
|
|
|
|
|
{
|
|
|
|
|
|
if (AfxGetGlobalWellMarkNamesList()->IsPinoutPattern(pBend->m_strLineBreakStyle) == FALSE)
|
|
|
|
|
|
pBend->SetBendStyle(pBend->m_strLineBreakStyle);
|
|
|
|
|
|
else
|
|
|
|
|
|
pBend->m_strLineBreakStyle = strOldStyle; //<2F>Ǽ<EFBFBD><C7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㣬<EFBFBD>ԷǼ<D4B7><C7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
if (AfxGetGlobalWellMarkNamesList()->IsPinoutPattern(pBend->m_strLineBreakStyle) == TRUE)
|
|
|
|
|
|
pBend->SetBendStyle(pBend->m_strLineBreakStyle);
|
|
|
|
|
|
else
|
|
|
|
|
|
pBend->m_strLineBreakStyle = strOldStyle; //<2F>Ǽ<EFBFBD><C7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㣬<EFBFBD>ԷǼ<D4B7><C7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pBend->ComputeBend();
|
|
|
|
|
|
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::GetSectionFaultAttributes(CFaultObj* pFault, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
|
|
|
|
|
|
CPublicFunction& pf = *AfxGetPublicFunction();
|
|
|
|
|
|
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
CMemFile file;
|
|
|
|
|
|
pf.WritePCG_Head(file, ver);
|
|
|
|
|
|
int nBaseTabNum = 1;
|
|
|
|
|
|
|
|
|
|
|
|
pFault->WritePCG(file, 2);
|
|
|
|
|
|
|
|
|
|
|
|
pf.WritePCG_Tail(file, ver);
|
|
|
|
|
|
|
|
|
|
|
|
ULONG fl = file.GetLength();
|
|
|
|
|
|
file.SeekToBegin();
|
|
|
|
|
|
LPTSTR pbuf = strXml.GetBuffer(fl + 1);
|
|
|
|
|
|
file.Read(pbuf, fl);
|
|
|
|
|
|
strXml.ReleaseBuffer(fl);
|
|
|
|
|
|
|
|
|
|
|
|
file.Close();
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::SetSectionFaultAttributes(CSigmaView* pView, CFaultObj* pFault, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
|
|
|
|
|
|
CKXmlParse xp;
|
|
|
|
|
|
if (xp.SetXmlFileBuffer(strXml.GetBuffer(), strXml.GetLength()))
|
|
|
|
|
|
{
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
while (xp.ReadBeginSection() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (xp.IsKey("/Pcg"))
|
|
|
|
|
|
break;
|
|
|
|
|
|
if (xp.ReadBeginSection() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (xp.IsKey("Fault"))
|
|
|
|
|
|
{
|
|
|
|
|
|
//BOOL bsp = pFault->IsBSPline();
|
|
|
|
|
|
CWellObjectAttributesXml::SaveUndoRedoAction(pView);
|
|
|
|
|
|
|
|
|
|
|
|
CWellSection *pParent = (CWellSection*)pFault->GetParent();
|
|
|
|
|
|
pFault->ReadPCG_FaultProperties(xp, ver, pParent->GetRect());
|
|
|
|
|
|
|
|
|
|
|
|
if (pParent->m_bResForm)
|
|
|
|
|
|
{//<2F><><EFBFBD><EFBFBD><EFBFBD>۲죬<DBB2><ECA3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
pFault->m_fLeftThrow = pFault->m_fLeftThrow / 2;
|
|
|
|
|
|
pFault->m_fRightThrow = pFault->m_fRightThrow / 2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pFault->ComputedFaultCurvePoints(pFault->IsBSPline());
|
|
|
|
|
|
pParent->ReBuildBends(pFault);
|
|
|
|
|
|
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::GetWellSectionAttributes(CWellSection* pSection, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
|
|
|
|
|
|
CPublicFunction& pf = *AfxGetPublicFunction();
|
|
|
|
|
|
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
CMemFile file;
|
|
|
|
|
|
pf.WritePCG_Head(file, ver);
|
|
|
|
|
|
int nBaseTabNum = 1;
|
|
|
|
|
|
|
|
|
|
|
|
//pFault->WritePCG(file, 2);
|
|
|
|
|
|
pSection->WritePCG_Sections(file, 2);
|
|
|
|
|
|
|
|
|
|
|
|
pf.WritePCG_Tail(file, ver);
|
|
|
|
|
|
|
|
|
|
|
|
ULONG fl = file.GetLength();
|
|
|
|
|
|
file.SeekToBegin();
|
|
|
|
|
|
LPTSTR pbuf = strXml.GetBuffer(fl + 1);
|
|
|
|
|
|
file.Read(pbuf, fl);
|
|
|
|
|
|
strXml.ReleaseBuffer(fl);
|
|
|
|
|
|
|
|
|
|
|
|
file.Close();
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL CWellObjectAttributesXml::SetWellSectionAttributes(CSigmaView* pView, CWellSection* pSection, CString& strXml)
|
|
|
|
|
|
{
|
|
|
|
|
|
BOOL b = FALSE;
|
|
|
|
|
|
|
|
|
|
|
|
CKXmlParse xp;
|
|
|
|
|
|
if (xp.SetXmlFileBuffer(strXml.GetBuffer(), strXml.GetLength()))
|
|
|
|
|
|
{
|
|
|
|
|
|
int ver = 2;
|
|
|
|
|
|
while (xp.ReadBeginSection() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (xp.IsKey("/Pcg"))
|
|
|
|
|
|
break;
|
|
|
|
|
|
if (xp.ReadBeginSection() > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
CWellObjectAttributesXml::SaveUndoRedoAction(pView);
|
|
|
|
|
|
|
|
|
|
|
|
double level = pSection->m_fLevelScale;
|
|
|
|
|
|
double depth = pSection->m_fDepthScale;
|
|
|
|
|
|
double horz = pSection->m_fHorzScale;
|
|
|
|
|
|
CWellSection* pTmpSection = new CWellSection(); //ֻ<><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD>ʹ<EFBFBD><CAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>(ֱ<><D6B1>ʹ<EFBFBD><CAB9>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡӰ<C8A1><D3B0>̫<EFBFBD><CCAB><EFBFBD><EFBFBD>)
|
|
|
|
|
|
pTmpSection->m_fLevelScale = pSection->m_fLevelScale;
|
|
|
|
|
|
pTmpSection->m_fDepthScale = pSection->m_fDepthScale;
|
|
|
|
|
|
pTmpSection->m_fHorzScale = pSection->m_fHorzScale;
|
|
|
|
|
|
|
|
|
|
|
|
pTmpSection->ReadPCG_Section(xp, ver, TRUE);
|
|
|
|
|
|
|
|
|
|
|
|
if (fabs(level - pTmpSection->m_fLevelScale) > 1)
|
|
|
|
|
|
pSection->ReSetScaleVer(pTmpSection->m_fLevelScale);
|
|
|
|
|
|
|
|
|
|
|
|
if (fabs(depth - pTmpSection->m_fDepthScale) > 1)
|
|
|
|
|
|
pSection->SetDepthScale(pTmpSection->m_fDepthScale);
|
|
|
|
|
|
|
|
|
|
|
|
if (fabs(horz - pTmpSection->m_fHorzScale) > 1)
|
|
|
|
|
|
pSection->ReSetScaleHor(pTmpSection->m_fHorzScale);
|
|
|
|
|
|
|
|
|
|
|
|
if (pSection->GetDisplayMode() != pTmpSection->GetDisplayMode())
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pTmpSection->IsDisplayModeNormal())
|
|
|
|
|
|
{
|
|
|
|
|
|
pSection->SetDisplayModeNormal(TRUE);
|
|
|
|
|
|
pSection->SetWellPoleDisplayMode(0);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (pTmpSection->IsDisplayMoedVertical())
|
|
|
|
|
|
{
|
|
|
|
|
|
pSection->SetDisplayModeVertical(TRUE);
|
|
|
|
|
|
pSection->SetWellPoleDisplayMode(2);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
delete pTmpSection;
|
|
|
|
|
|
|
|
|
|
|
|
b = TRUE;
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
|
}
|