众所周知,Multipatch是ArcGIS独创的数据结构,叫“面片”。可以根据点集按照一定的顺序连成。那么反过来我们也可以根据面片生成点集。
IGeometryCollection GeoCollection = new MultiPatchClass(); IPointCollection TriStripPoints = new TriangleStripClass(); object Missing = Type.Missing; for (int i = 0; i < division; i++) { VectorCross.Rotate(Angle, VectorPipe);//旋转底面上的向量 IPoint PntA = ConstructPnt3D(FromPnt.X + VectorCross.XComponent, FromPnt.Y + VectorCross.YComponent, FromPnt.Z + VectorCross.ZComponent, sr); IPoint PntB = ConstructPnt3D(ToPnt.X + VectorCross.XComponent, ToPnt.Y + VectorCross.YComponent, ToPnt.Z + VectorCross.ZComponent, sr); TriStripPoints.AddPoint(PntA, ref Missing, ref Missing); TriStripPoints.AddPoint(PntB, ref Missing, ref Missing); //MessageBox.Show(PntA.X + "," + PntA.Y + "," + PntA.Z + ";" + PntB.X + "," + PntB.Y + "," + PntB.Z); } TriStripPoints.AddPoint(TriStripPoints.get_Point(0), ref Missing, ref Missing); TriStripPoints.AddPoint(TriStripPoints.get_Point(1), ref Missing, ref Missing); GeoCollection.AddGeometry(TriStripPoints as IGeometry, ref Missing, ref Missing); IGeometry GeoPipe3D = GeoCollection as IGeometry; GeoPipe3D.SpatialReference = sr; return GeoPipe3D;
巷道+管道-ArcScene
我博客里这段代码就是想遍历shapefile里的每一条线,然后设置一个宽度,创建一个管道
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
2019-01-28 清华大学开源软件镜像站