manifold icon indicating copy to clipboard operation
manifold copied to clipboard

Flesh out 2D subsystem

Open elalish opened this issue 2 years ago • 0 comments

We currently use Polygons as input to several Manifold constructors, and they could easily be output as well (think Slice), but we have no way to operate on them in 2D. I would like to think of Polygon as the 2D equivalent to Mesh, and I'd like to create a CrossSection class that is the 2D equivalent to Manifold.

A CrossSection will always be geometrically-valid (non-overlapping), as any input Polygons will be automatically fixed up according to winding number. Clipper lib seems like a good candidate to support useful 2D operations. I propose we adopt the "strictly positive" fill rule; this will allow Boolean-style operations simply by adding Polygons with the proper winding direction. This class will be totally independent of the Manifold class; they can simply interact through exported Polygons.

elalish avatar Jun 04 '22 05:06 elalish