프로젝트

일반

사용자정보

개정판 3a4444b9

ID3a4444b978ef0e08758c86fbf20e0f84b4e73097
상위 089a9f5c
하위 94763b2e

조봉훈이(가) 일년 이상 전에 추가함

Fix 2dPolyline dump

Change-Id: Ibcf7efe55cf904742584b2c89cad9ad7c18298ff

차이점 보기:

DTI_PID/OdReadExMgd/OdReadExMgd.cs
769 769
            /********************************************************************/
770 770
            /* Dump the vertices                                                */
771 771
            /********************************************************************/
772
            List<Vertex2d> Vertices = new List<Vertex2d>();
773
            int i = 0;
774
            foreach (ObjectId obj in pPolyline)
772
            Point3dCollection points = new Point3dCollection();
773

  
774
            int count = (int)pPolyline.EndParam + (pPolyline.Closed ? 0 : 1);
775
            for (int i = 0; i < count; i++)
775 776
            {
776
                using (DBObject dbObj = (DBObject)obj.GetObject(OpenMode.ForRead))
777
                {
778
                    if (dbObj is Vertex2d)
779
                    {
780
                        Vertices.Add((Vertex2d)dbObj);
781
                        /// dump2dVertex(indent, (Vertex2d)dbObj, i++);
782
                    }
783
                }
777
                points.Add(pPolyline.GetPointAtParameter(i));
784 778
            }
785

  
779
            
786 780
            if (node != null)
787 781
            {
788 782
                XmlNode Polyline2dNode = Program.xml.CreateElement(pPolyline.GetRXClass().Name);
......
792 786
                Polyline2dNode.Attributes.SetNamedItem(HandleAttr);
793 787

  
794 788
                XmlAttribute CountAttr = Program.xml.CreateAttribute("Count");
795
                CountAttr.Value = Vertices.Count.ToString();
789
                CountAttr.Value = points.Count.ToString();
796 790
                Polyline2dNode.Attributes.SetNamedItem(CountAttr);
797 791

  
798 792
                XmlAttribute ElevationAttr = Program.xml.CreateAttribute("Elevation");
......
811 805
                ClosedAttr.Value = pPolyline.Closed.ToString();
812 806
                Polyline2dNode.Attributes.SetNamedItem(ClosedAttr);
813 807

  
814
                foreach (var vt in Vertices)
808
                foreach (Point3d pt in points)
815 809
                {
816 810
                    XmlNode VertexNode = Program.xml.CreateElement("Vertex");
817 811

  
818 812
                    XmlAttribute XAttr = Program.xml.CreateAttribute("X");
819
                    XAttr.Value = vt.Position.X.ToString();
813
                    XAttr.Value = pt.X.ToString();
820 814
                    VertexNode.Attributes.SetNamedItem(XAttr);
821 815

  
822 816
                    XmlAttribute YAttr = Program.xml.CreateAttribute("Y");
823
                    YAttr.Value = vt.Position.Y.ToString();
817
                    YAttr.Value = pt.Y.ToString();
824 818
                    VertexNode.Attributes.SetNamedItem(YAttr);
825 819

  
826 820
                    XmlAttribute ZAttr = Program.xml.CreateAttribute("Z");
827
                    ZAttr.Value = vt.Position.Z.ToString();
821
                    ZAttr.Value = pt.Z.ToString();
828 822
                    VertexNode.Attributes.SetNamedItem(ZAttr);
829 823

  
830 824
                    Polyline2dNode.AppendChild(VertexNode);
831 825
                }
832 826

  
833
                dumpCurveData(pPolyline, indent, node);
827
                dumpCurveData(pPolyline, indent, Polyline2dNode);
834 828

  
835 829
                node.AppendChild(Polyline2dNode);
836 830

  

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)