Hello,
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)
ON_3dPointArray points;
for (auto i = 0; i < ring.Count(); ++i)
{
points.Append(ring[i][0]);
points.Append(ring[i][1]);
}
ON_PolylineCurve poly(points);
ON_3dmObjectAttributes attrb;
RhinoApp().ActiveDoc()->AddCurveObject(poly, &attrb);
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: