zoukankan      html  css  js  c++  java
  • Multipatch转Geometry转PointCollection转TriangleFan

    众所周知,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

  • 相关阅读:
    Aseprite+Cocos:打包像素画图,导入到cocos里并动起来
    自定义博客园个人皮肤
    埃航和737MAX坠毁:软件优先级问题
    淘宝网——软件质量属性场景分析
    王概凯《架构漫谈》阅读笔记
    2965 -- The Pilots Brothers' refrigerator
    UVa10082 -- WERTYU
    1753 -- Flip Game
    1083 -- Moving Tables
    2159 -- Ancient Cipher
  • 原文地址:https://www.cnblogs.com/2008nmj/p/14341121.html
Copyright © 2011-2022 走看看