[OpenSCAD] CGAL error depends on order of unioning

Ronaldo Persiano rcmpersiano at gmail.com
Wed Jul 24 14:30:41 EDT 2019

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

> 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.

That is not precisely true. When we have just one polyhedron() primitive,
it can generate a STL file even if the polyhedron is not a manyfold.
For instance:

polyhedron([[0,0,0], [1,0,0],[0,1,0]],[[0,1,2]]);

is just a triangle and it renders fine and generate a STL file. Even
polyhedron() with self-intersection are accepted by CGAL when are alone.

 STL files can not represent non-manifold geometry and 3D printers can not
> print it. These things will never change.

That is not also true. The above example shows that OpenSCAD is able to
generate non-manifold STL files. After all, STL files are just a soup of

I don't agree either that non-manifold can't be 3D printed. The object
bellow is printable:

  translate([1,1,0]) cube(1);
  translate([0,0,0.9]) cube(2);
  translate([0,0,-1.9]) cube(2);

and it will be solid in the sense that it will not fall apart easily. It
can't be rendered by OpenSCAD (CGAL) as is but it could be represented in a
unique polyhedron and then a STL file could be generated by OpenSCAD.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20190724/c31dcc4c/attachment.html>

More information about the Discuss mailing list