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.
59 lines
1.9 KiB
C++
59 lines
1.9 KiB
C++
#include "pch.h"
|
|
#include "IDWHelper.h"
|
|
#include <array>
|
|
|
|
extern "C" __declspec(dllexport)
|
|
int Test(int layerFile)
|
|
{
|
|
int nTest = layerFile;
|
|
return nTest++;
|
|
}
|
|
|
|
/************************************************************************/
|
|
/* 对文件数据进行井位校正 */
|
|
/************************************************************************/
|
|
extern "C" __declspec(dllexport)
|
|
int CalculateByFile(LPCTSTR layerFile, LPCTSTR wellFile, LPCTSTR outFile
|
|
, CPPCallback callBack, double factor, LPCTSTR faultLayer
|
|
, double contourStep, int contourMark
|
|
,int times, int gridM, int smooth, bool withName)
|
|
{
|
|
IDWHelper idw;
|
|
idw.SetProgressEvent(callBack);
|
|
idw.Calculate(layerFile, wellFile, outFile, factor
|
|
, faultLayer, contourStep, contourMark
|
|
, times, gridM, smooth, withName);
|
|
return 1;
|
|
}
|
|
/************************************************************************/
|
|
/* 计算误差数据 */
|
|
/************************************************************************/
|
|
extern "C" __declspec(dllexport)
|
|
int CalculateAdjustData(LPCTSTR layerFile, LPCTSTR wellFile, LPCTSTR outFile, CPPCallback callBack)
|
|
{
|
|
IDWHelper idw;
|
|
idw.SetProgressEvent(callBack);
|
|
idw.CalculateAdjustData(layerFile, wellFile, outFile);
|
|
return 1;
|
|
}
|
|
/************************************************************************/
|
|
/* 对网格进行数据校正 */
|
|
/************************************************************************/
|
|
extern "C" __declspec(dllexport)
|
|
int CalculateByMesh(CMesh* pMesh, double* wellDataX, double* wellDataY, double* wellDataZ
|
|
,int wellCount, LPCTSTR outFile, CPPCallback callBack, double factor = 2)
|
|
{
|
|
vector<array<double, 3>> wellData;
|
|
for (int i=0;i<wellCount;i++)
|
|
{
|
|
array<double, 3> xyz = { 0 };
|
|
wellData.push_back(xyz);
|
|
}
|
|
IDWHelper idw;
|
|
idw.SetProgressEvent(callBack);
|
|
// idw.Calculate(pMesh, wellData, outFile, factor,"断层");
|
|
return 1;
|
|
}
|
|
|
|
|