manifold
manifold copied to clipboard
Flesh out 2D subsystem
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
.