[OpenSCAD] avoiding assertion violation

Ronaldo Persiano rcmpersiano at gmail.com
Wed Jul 17 02:16:32 EDT 2019


Em qua, 17 de jul de 2019 às 03:07, MichaelAtOz <oz.at.michael at gmail.com>
escreveu:

> What Ronaldo says is if there is a bug it would be that OpenSCAD might be
> able to detect such attempts and produce a better error message.
>

The only situation the rotate_extrude() of a simple polygon is clearly a
manifold is when the polygon does not have any intersection with the Y axis
and it rests entirely at left or at right of the Y axis. Then the
rotate_extrude() will be a torus like object.

When the intersection of a simple polygon and the Y axis is a full polygon
edge, I would expect a non-manifold result because that particular edge
would be in the interior of the object. But CGAL does produce a valid
polyhedron which means, I suppose, that OpenSCAD smartly removes that
offending edge before calling CGAL. Then, the rotate_extrude() will not be
the union of torus like objects - it will not have a genus.

In the limit case, when just a simple polygon vertex is on the Y axis,
there is no smartness to avoid non-manifoldness and an error might be
issued.

However, when, the polygon is not simple, like in the example bellow, it is
harder to detect beforehand a non-manifoldness of rotate_extrude():

rotate_extrude(){
  polygon([ [2,2],[3,3], [2,4] ]);
  translate([1,0]) square(2);
}
cube();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20190717/45d85d72/attachment.html>


More information about the Discuss mailing list