我的github
posts - 3243,  comments - 42,  views - 158万

众所周知,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里的每一条线,然后设置一个宽度,创建一个管道

参考:https://www.bilibili.com/video/BV1Yt4y167BC?spm_id_from=333.999.0.0&vd_source=906814cf963c4cb1b6192a4acde87b93

posted on   XiaoNiuFeiTian  阅读(251)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
历史上的今天:
2019-01-28 清华大学开源软件镜像站
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示