[OpenSCAD] Discuss manifoldness, co-incident faces edges etc

Ronaldo Persiano rcmpersiano at gmail.com
Sat Nov 16 23:06:11 EST 2019

 nop head <nop.head at gmail.com> wrote:

> Yes but they seem to have chosen the wrong interpretation of self
> intersections. I.e. exclusive oring overlapping solids instead of unioning
> them. So at least slicers will be consistent, i.e. consistently wrong, so
> forcing people to fix their models if they slice it with a compliant slicer
> before publishing.

That is not right. According to the positive fill rule of the 3MF
specification the filling of two overlapping squares both with
counter-clockwise winding will be their union. If just one has
clockwise winding,
the result will be their difference; and if both have clockwise winding
everything vanishes.

The "exclusive or" of the areas is what OpenSCAD does independent of the

polygon([ [0,0],[2,0],[2,2],[0,2],[1,1],[3,1],[3,3],[1,3] ],
        [ [0,1,2,3], [4,5,6,7] ]);

This is consistent with the OpenSCAD  filling  of polygons with a hole,
even when the hole is clockwise:

polygon([ [0,0],[2,0],[2,2],[0,2],[0.5,0.5],[1.5,0.5],[1.5,1.5],[0.5,1.5] ],
        [ [0,1,2,3], [4,5,6,7] ]);

For a self-intersecting polygon of the figure-8, the positive rule will
keep one ring (the one with  counter-clockwise winding) and discard the

To the contrary both are preserved by OpenSCAD:

polygon( [ [-1,-1],[1,1],[2,0],[1,-1],[-1,1],[-2,0] ],
         [ [0,1,2,3,4,5] ]);

 The filling by the positive rule of polygons with many self-intersections
is hard to anticipate.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20191117/db29858f/attachment.html>

More information about the Discuss mailing list