Problem: Find the intersection points of a coplanar circle and triangle
Use the intersect2d - methods to intersect the perimeters of planar objects beeing coplanar to each other. In contrast, use the intersect3d methods to find the intersection of planar objects beeing non-coplanar to each other.
Solution using V#
- public static void CoplanarCircleTriangleIntersection()
- {
- // Create a triangle
- // Create a circle
- // Compute the intersection
- PointSet intersectionPoints = t.Intersect2d(c);
- // Visualize: ----------------------------------------------------------
- // Make a scene
- // Set the point display style
- sc.PointDisplayMode = 2;
- sc.PointSize = 0.05;
- // Make some layers
- // Add all to the scene
- sc.Add(c, cLayer);
- sc.Add(t, tLayer);
- sc.Add(intersectionPoints, pLayer);
- // output the scene as dxf
- sc.WriteDxf(@"c:\triangle_circle_coplanar.dxf");
- }

