I want to intersect a cylinder-like mesh (ON_Mesh) with an infinite plane (ON_Plane) and draw the contour (polyline) of the intersection around that mesh.
How can I do that while filtering the points to keep those segments that compose the contour of the intersection? I’ve used ON_Mesh::IntersectPlane() but I get line that connect in the area of the intersection (not just the circumference)
For contouring specifically, you might consider using MakeRhinoContours.
input.m_basept = basept;
input.m_endpt = endpt;
input.m_interval = fabs(interval);
input.m_limit_range = TRUE;
if (!MakeRhinoContours(input, pline_array, curve_array, point_array))
Otherwise, we’ll need to see some sample code and a test model.
Hello @dale , thank you for your answer.
Here’s how I’m computing the intersection:
and this is how I draw the circumference:
for (auto i = 0; i < ring.Count(); ++i)
What I need to have is just the closed “ring” or the outer surface of the intersection between the cylinder mesh and the plane. What I’m getting is this: