using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Construction.BatchCreateMap
{
public class SurfaceCaculate
{
///
/// 计算两个面相减的结果
///
/// 顶界文件
/// 底界文件
/// 计算结果文件
/// 输出数据的格式。 0,dfg;1,xyz。
/// 计算方法,默认为相减
/// 网格模式,默认为底界区域
/// 1,成功;0,失败。
public static int Subtract(string topFile, string bottomFile, string resultFile, int resultFormat,
ref double x0, ref double y0, ref double dx, ref double dy, ref int numX, ref int numY,
int function = 2, int mode = 4)
{
return Caculate(topFile, bottomFile, resultFile, resultFormat,
ref x0, ref y0, ref dx, ref dy, ref numX, ref numY,
function, mode);
}
#if DEBUG
const string DLL_FILE = "ISurfaceProcess.dll";
#else
//const string DRAWLIB = "DrawLib.dll";
const string DLL_FILE = "ISurfaceProcess.dll";
#endif
[DllImport(DLL_FILE, EntryPoint = "Caculate", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
private static extern int Caculate(string fileA, string fileB, string fileOut,int outFormat,
ref double x0, ref double y0, ref double dx, ref double dy, ref int numX, ref int numY,
int functionMode, int gridMode);
}
}