// 获取地形TIN缓存位置 var tinSctPath = "E:\\原TIN地形\\DEM@anqing.sct"; if (datasource != null) { // 获取三维面数据集 DatasetVector dataset2 = (DatasetVector)datasource.Datasets["slope"]; dataset2.Open(); // 将 DatasetVector 转换为 Recordset Recordset rdRegion = dataset2.GetRecordset(false, CursorType.Dynamic); // 获取要素的几何对象 Geometry geometry = rdRegion.GetGeometry(); // 创建一个 List 来存储 Geometry 对象 List geometryList = new List(); geometryList.Add(geometry); // 尝试进行挖洞(镂空) if (CacheProcessor3D.HollowTIN(tinSctPath, geometryList, ClippingType.KeepOutside, ConstraintType.SoftConstraint)) { Console.WriteLine($"===================,隧道挖洞成功!!!"); } } else { Console.WriteLine("Datasource is null!"); }