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.

51 lines
2.0 KiB
C#

1 month ago
//using DQ.Construction.Util;
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace Construction.BatchCreateMap
{
public class StructureAnalyze3
{
public bool Calculate(string inputFile, string outputFile, string statisticFile, AnylizeCalculateParameter par
, string faultLayerName = "断层", string contourLayerName = "等值线")
{
// 执行计算
try
{
string strFault = faultLayerName;
if (string.IsNullOrEmpty(strFault))
{
strFault = "断层";
}
string strCurve = contourLayerName;
if (string.IsNullOrEmpty(strCurve))
{
strCurve = "等值线";
}
StructAnylizeParameter structPara = par.ToStruct();
CreateMicroStructure(inputFile, outputFile, statisticFile, ref structPara, strFault, strCurve);
}
catch (Exception ex)
{
Trace.WriteLine(ex.Message);
}
return true;
}
#if DEBUG
//const string DLL_FILE = @"C:\GeoIntelligent\Code\dirgdf\bin\Debug\WellCalibrate.dll";
const string DLL_FILE = "MicroStructurePP.dll";
#else
const string DLL_FILE = "MicroStructurePP.dll";
#endif
[DllImport(DLL_FILE, EntryPoint = "CreateMicroStructureOld", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
public static extern void CreateMicroStructureOld(string curveFile, string faultFile, string gridFile, string ResultFile, ref StructAnylizeParameter par);
[DllImport(DLL_FILE, EntryPoint = "CreateMicroStructure", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)]
public static extern void CreateMicroStructure(string intputFile, string resultFile, string statisticFile, ref StructAnylizeParameter par
, string faultLayerName, string contourLayerName);
}
}