[Math] How to find the outline resulting from the intersection of a NURBS surface and a plane

3dgeometryspline

The context for this question is 3D printing. Currently the way it's done is:

  • Convert a 3D model to a mesh of triangles
  • Ensure it's manifold and that there are no degenerate triangles
  • 'Slice' this mesh into lots of little layers by working out the polygons resulting from the intersection of a plane.
  • 'Fill in' these polygons with offsets of the outer polygon
  • Turn all these polygons into simple straight line sections to control motors on the printer

This all works fine, and is pretty simple linear equations/geometry – except for curved surfaces. In order to avoid seeing lots of flat 'segments' instead of a curved surface, one has to massively increase the number of triangles. That in turn results in huge files describing all the curved surfaces as little line segments.

I'm just wondering about how one could 'slice' a NURBS surface mathematically, and keep the resulting flat sections in curve form for the motors to trace out instead?

The only result I could find on Google was this: Link

But I can't seem to get hold of the actual paper (only the list of contents). Note I'm not a mathematician, so in the first instance I'm looking for qualitative answers, although pointers to methods would be greatly appreciated too.

Best Answer

This is a fairly standard problem in CAD. One place to start would be this section from the on-line book by Patrikalakis-Maekawa-Cho. In addition, you can search their bibliography page for the word "intersection" or you could search this much larger bibliography.

The more general problem is intersecting two surfaces. Intersecting a surface and a plane is simpler, but still not easy.

There are several possible approaches. One of them is actually quite similar to the technique you mentioned -- dividing the surface into triangles, and intersecting these with the plane to form line segments. The data size problems you mentioned are avoidable. You only need to generate tiny triangles near the plane (not everywhere), and you can disgard a triangle after you've used it. The more common approach is to "march" along the intersection curve, as described in the reference. In either case, the result will be some sort of spline curve that approximates the intersection.

It's not too difficult to write an algorithm that works 80% of the time. But, occasionally, there will be cases where the plane is tangent (or nearly tangent) to the surface. Dealing with these cases reliably is pretty difficult.

If you don't know some mathematics (multivariate calculus, at least) it's going to be tough for you to read most of the literature on the subject.

Related Question