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++

1 month ago
#include "pch.h"
#include "IDWHelper.h"
#include <array>
extern "C" __declspec(dllexport)
int Test(int layerFile)
{
int nTest = layerFile;
return nTest++;
}
/************************************************************************/
/* <20><><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ݽ<EFBFBD><DDBD>о<EFBFBD>λУ<CEBB><D0A3> */
/************************************************************************/
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;
}
/************************************************************************/
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
/************************************************************************/
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;
}
/************************************************************************/
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3> */
/************************************************************************/
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,"<22>ϲ<EFBFBD>");
return 1;
}