private void drawCloud(TSDrg.PointList pointList, ViewBase view, string attributesFile) { TSDrg.Cloud cloud = new TSDrg.Cloud(view, pointList, new Cloud.CloudAttributes(attributesFile)); cloud.Attributes.Line.Color = TSDrg.DrawingColors.Red; cloud.Insert(); view.GetDrawing().CommitChanges(); }
private static void createClouds(List <TSD.Cloud> input, List <TSD.Cloud> output, TSD.ViewBase inputView, TSD.ViewBase outputView) { foreach (TSD.Cloud inputPoly in input) { TSD.PointList pts = new TSD.PointList(); foreach (T3D.Point pt in inputPoly.Points) { T3D.Point temp = __GeometryOperations.applyGlobalOffset(pt); pts.Add(temp); } bool found = false; bool same = true; foreach (TSD.Cloud outputPoly in output) { if (outputPoly.Points.Count == pts.Count) { if (outputPoly.Points.Count != 0) { for (int i = 0; i < outputPoly.Points.Count; i++) { T3D.Point oldpt = outputPoly.Points[0]; T3D.Point newpt = pts[0]; if (__GeometryOperations.compare2Points(oldpt, newpt) == false) { same = false; break; } } if (same == true) { found = true; break; } for (int i = 0; i < outputPoly.Points.Count; i++) { T3D.Point oldpt = outputPoly.Points[0]; T3D.Point newpt = pts[pts.Count - i - 1]; if (__GeometryOperations.compare2Points(oldpt, newpt) == false) { same = false; break; } } if (same == true) { found = true; break; } } } } if (found == false) { TSD.Cloud outputLine = new TSD.Cloud(outputView, pts, inputPoly.Attributes); outputLine.Attributes = inputPoly.Attributes; outputLine.Insert(); } } }