public void calcIntersection(TBPLine tbpline) { Point3dCollection result = new Point3dCollection(); acPline.IntersectWith(tbpline.acPline, Intersect.OnBothOperands, new Plane(new Point3d(0, 0, 0), new Vector3d(0, 0, 1)), result, (IntPtr)0, (IntPtr)0); for (int i = 0; i < result.Count; i++) { Point3d p = result[i]; TBPoint tbp = TBPoint.getNewTBPoint(p); this.addIntersectPoint(tbp); tbpline.addIntersectPoint(tbp); } }
public static Loop getClosedBoundary(TBPLine pl, object userData) { if (pl.acPline.Closed || pl.IsLooped) { Loop l = new Loop(); TBPLineSegment tbpl = new TBPLineSegment(pl.acPline); LoopSeg ls = new LoopSeg(tbpl, LineDirection.positive); l.segments.Add(ls); l.startPoint = tbpl.StartPoint; l.userData = userData; return(l); } return(null); }