老师好,我想问下,在软件中我发现创建地形的过程中,使用SurfaceFeatureType.Boundary这个类型可以控制地形的边界,但是在程序中使用发现却没有效果,希望经验丰富的老师给些意见,谢谢。
有以下可能:
1.检查您的Surface的边界点是否设置准确。2.是否添加点的时候设置了Feature。
肖老师我在构造三角网格的时候代码如下:
List<DPoint3d> points = new List<DPoint3d>(); DTM dtm = new DTM(); DTMFeatureType featureType = Helpers.ConvertFromSurfaceFeatureType(SurfaceFeatureType.Boundary); for (int i=0;i<point.Count;i++) { points.Add(GetUORPoint(point[i])); } dtm.AddLinearFeature(points, featureType); dtm.SetTriangulationParameters(0.001, 0.001, DTMEdgeOption.RemoveMaxSide, 200* uorPerMas); dtm.Triangulate();
你直接用DTMFeatureType的枚举值设置featureType,您看下DTMFeatureType.HullLine是否可以。
List<DPoint3d> points = new List<DPoint3d>(); DTM dtm = new DTM(); //DTMFeatureType featureType = Helpers.ConvertFromSurfaceFeatureType(SurfaceFeatureType.Boundary); for (int i=0;i<point.Count;i++) { points.Add(GetUORPoint(point[i])); } dtm.AddLinearFeature(points, DTMFeatureType.HoleLine); dtm.SetTriangulationParameters(0.001, 0.001, DTMEdgeOption.RemoveMaxSide, 200* uorPerMas); dtm.Triangulate();
DTMEdgeOption.RemoveSliver
---------------------------------------------------------------
中国市政工程西北设计研究院有限公司武汉分院