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.
62 lines
1.7 KiB
C++
62 lines
1.7 KiB
C++
#pragma once
|
|
|
|
#include "DrawModel\BaseLib.h"
|
|
#include "DrawOperator\DrawLib.h"
|
|
|
|
#include "DrawOperator\XyIO.h"
|
|
#include "afx.h"
|
|
#include "CallBack.h"
|
|
using namespace std;
|
|
|
|
|
|
|
|
//typedef POSITION(IDWHelper::*FUNC) (CCurve* pCurve, CString strLayer);
|
|
//
|
|
//FUNC FUNCCurve;
|
|
|
|
class IDWHelper
|
|
{
|
|
public:
|
|
IDWHelper();
|
|
~IDWHelper();
|
|
void Calculate(LPCTSTR layerFile, LPCTSTR wellFile, LPCTSTR outFile, double factor = 2.0,
|
|
LPCTSTR faultLayer="", double contourStep = 5.0, int contourMarkStep = 5
|
|
,int times=0, int gridM=0, int smooth=0, BOOL withName = FALSE);
|
|
bool Calculate(CMesh* pMesh, vector<array<double, 3>> wellData
|
|
, CMesh* pMeshNew, LPCTSTR outFile, double factor = 2, LPCTSTR faultLayer= ""
|
|
,int times=0, int gridM=0, int smooth=0);
|
|
|
|
void CalculateAdjustData(LPCTSTR layerFile, LPCTSTR wellFile, LPCTSTR outFile);
|
|
|
|
void SetProgressEvent(CPPCallback callback) {
|
|
DoProgress = callback;
|
|
// DoProgress("", 11);
|
|
}//staticCXy* pxy,
|
|
void AddContourCurve(std::vector<CCurve*>* curves, std::vector<CString*>* layer, POSITION newMeshPosition);
|
|
typedef POSITION(IDWHelper::*pmfn1)(CCurve* pCurve, CString strLayer);
|
|
private:
|
|
void ReadInToMatrix(string FilePath, vector<array<double, 3>>& data, vector<CString>& name);
|
|
BOOL OpenFile(LPCTSTR lpszFileName);
|
|
void Serialize(CArchive& ar, CXy* pXy);
|
|
|
|
CString MakeExtFileName(LPCTSTR oldFile, LPCTSTR ext);
|
|
CString MakeExtFileName(LPCTSTR oldFile, LPCTSTR nameSuffix, LPCTSTR newExt);
|
|
|
|
CMesh* IDWHelper::ReadFileMesh(LPCTSTR lpszFileName);
|
|
|
|
inline BOOL IsPointInFault(double x, double y, CString faultLayer);
|
|
|
|
private:
|
|
CXy* m_pXy;
|
|
CXy* m_pXyTmp;
|
|
//CMesh* m_pMesh;
|
|
double InvalidZ = 1e301;
|
|
CPPCallback DoProgress = nullptr;
|
|
|
|
BOOL m_bWithName = FALSE;
|
|
|
|
vector<CString> m_names;
|
|
|
|
};
|
|
|