private void curveIntersectionToolStripMenuItem_Click(object sender, EventArgs e) { TopoShape ellipseArc = GlobalInstance.BrepTools.MakeEllipseArc(Vector3.ZERO, 100, 50, 0, 90, Vector3.UNIT_Z); TopoShape circle = GlobalInstance.BrepTools.MakeCircle(Vector3.ZERO, 60, Vector3.UNIT_Z); IntersectionLineCurve intersector = new IntersectionLineCurve(); intersector.SetCurve(ellipseArc); if (intersector.Perform(circle)) { PointStyle ps = new PointStyle(); ps.SetMarker("plus"); ps.SetPointSize(10); int nCount = intersector.GetPointCount(); for (int ii = 1; ii <= nCount; ++ii) { if (intersector.GetSquareDistance(ii) < 0.001) { Vector3 pt = intersector.GetPoint(ii); PointNode pn = new PointNode(); pn.SetPoint(pt); pn.SetPointStyle(ps); renderView.ShowSceneNode(pn); } } } renderView.ShowGeometry(ellipseArc, ++shapeId); renderView.ShowGeometry(circle, ++shapeId); renderView.RequestDraw(); }
private void pointToolStripMenuItem_Click(object sender, EventArgs e) { PointNode pn = new PointNode(); pn.SetPoint(new Vector3(100, 100, 100)); PointStyle ps = new PointStyle(); ps.SetMarker("plus"); ps.SetPointSize(10); pn.SetPointStyle(ps); renderView.ShowSceneNode(pn); renderView.RequestDraw(); }