[OpenSCAD] CGAL error depends on order of unioning

nop head nop.head at gmail.com
Wed Jul 24 09:22:32 EDT 2019


Basically everything that needs to be rendered to a solid has to be
manifold, including all the intermediate steps, because the library used,
CGAL, only handles manifold objects. It isn't a bug, it is designed that
way.

It won't change unless OpenSCAD stops using CGAL for its CSG operations.
Note that CSG operations over manifold geometry is not closed, so no matter
what library is used you can make non-manifold geometry with union,
difference and intersection. STL files can not represent non-manifold
geometry and 3D printers can not print it. These things will never change.

On Wed, 24 Jul 2019 at 14:00, Tim V. Shaporev <tim.shaporev at auriga.ru>
wrote:

> Let me put it different way: is it documented anywhere
> 1) that all intermediate results should be manifold and
> 2) exact order of operations (note that enclosing quarters in additional
> explicit - or implicit - union like in 'good1' resolves the issue).
> If these are documented then it is my fault that I did not read it
> (though I'd like to have the issue fixed as an enhancement).
>
> But as far as the final geometry is correct I see this as a bug
> (though I do understand that it could be too hard to fix).
>
> And, finally, thank you for the explanation - it is helpful.
>
> :-)
> Tim
>
> On 7/23/2019 12:36 PM, nop head wrote:
> > It probably isn't a bug. It is quite possible to have three objects such
> > that unioning two of them gives a non-manifold result but unioning them
> > in another order doesn't. For example consider two cubes sharing one
> > edge and a third that overlaps that edge. If you do the union one, two,
> > three you will get an error but one, three, two will work and so will
> > any other order because the intermediate results are all manifold.
> >
> > On Tue, 23 Jul 2019 at 10:08, Shaporev, Timur <tim at auriga.com
> > <mailto:tim at auriga.com>> wrote:
> >
> >     While working on https://www.thingiverse.com/thing:3762730 I faced
> >     strange effect: script produce
> >
> >     ERROR: CGAL error in CGALUtils::applyBinaryOperator union: CGAL
> >     ERROR: assertion violation! Expr: itl != it->second.end() File:
> >
>  /mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_3/SNC_external_structure.h
> >     Line: 1152
> >
> >     on F6 but some change in order of unioning yields expected result.
> >
> >     I am attaching an archive with both faulty and good versions of
> scripts.
> >
> >     (The scripts render long enough: more than 20 minutes to preview the
> >     first script on my PC and 6 more minutes to render, yet more for the
> >     second script.)
> >
> >
> >     If this is new issue I'd appreciate advice on how to (get a ticket
> >     number) register it.
> >
> >
> >     Thank you,
> >
> >     Tim
> >
> >
> >     _______________________________________________
> >     OpenSCAD mailing list
> >     Discuss at lists.openscad.org <mailto:Discuss at lists.openscad.org>
> >
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > Discuss at lists.openscad.org
> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >
>
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20190724/59d3ef2c/attachment.html>


More information about the Discuss mailing list