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

  • 相关阅读:
    IIS7配置URL Rewrite链接重写
    wordpress导航菜单的链接支持弹出新页面
    c++绝对是拯救了世界,特别是程序员
    Linux 磁盘坏道检测和修复
    centos里mysql无法用localhost连接的解决方法
    php扩展开发
    IP多播
    因特网的路由选择协议
    ICMP协议
    ARP协议
  • 原文地址:https://www.cnblogs.com/2008nmj/p/14341121.html
Copyright © 2011-2022 走看看