Exemple #1
0
        private bool BuildPolygon(Polyline polyline, Point2d startPoint, AcPolygonSegment currentSegment)
        {
            if (currentSegment.EndPoint.Id() == startPoint.Id())
            {
                return(true);
            }
            // Nie dodawaj ostatniego zdublowanego wertexu, bo potem przy zmianie początku polilini ID się nie zgadzają

            polyline.AddVertex(currentSegment.EndPoint);

            var endPointLines = GetEndPointLines(currentSegment);

            if (endPointLines.Count < 1)
            {
                return(false);
            }



            AcPolygonSegment nextLine = GetNextLine(endPointLines, currentSegment);

            return(BuildPolygon(polyline, startPoint, nextLine));
        }
Exemple #2
0
 public static string Id(this Point2d p)
 {
     return(p.Id(Ac.LinearPrecisionFormat));
 }
Exemple #3
0
 public static bool Equals(this Point2d thisPoint, Point2d anotherPoint)
 {
     return(thisPoint.Id() == anotherPoint.Id());
 }