When I render I get this message;
ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: e->incident_sface() != SFace_const_handle() File:
/Users/kintel/code/OpenSCAD/libraries/install/include/CGAL/Nef_S2/SM_const_decorator.h
Line: 330
Line 330 is part of code I stole from elsewhere and don't really understand
it. I wanted a spiral type curve. Line 330 is the first, I included through
339 to finish it;
module polyline(points, width = 1) {
module polyline_inner(points, index) {
if(index < len(points)) {
line(points[index - 1], points[index], width);
polyline_inner(points, index + 1);
}
}
polyline_inner(points, 1);
}
It does seem to work because it shows up in the STL file. So is it OK even
with an error?
However another line, 78, does not render;
polyhedron( points = [ [-9.5,9,0], [-10,11,0], [-6,11,0], [-9.5,9,7],
[-10,11,7], [-6,11,7] ], faces=[ [0,1,2], [3,4,5], [0,1,4,3],[1,2,5,4],
[2,0,3,5] ], convexity = 1);
There is no error, it just doesn't appear in the rendered version but it is
in preview. If I put line 78 in a new project all by itself it works fine.
So is the error really about line 78 and not line 330.
Thanks
Lee
--
Sent from: http://forum.openscad.org/
On 1/26/2021 12:01 PM, Leea wrote:
When I render I get this message;
ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: e->incident_sface() != SFace_const_handle() File:
/Users/kintel/code/OpenSCAD/libraries/install/include/CGAL/Nef_S2/SM_const_decorator.h
Line: 330
This is an internal error; the CGAL library is unhappy with its internal
state. I think the 330 refers to which line in SM_const_decorator.h saw
the trouble, not to anything in your OpenSCAD program.
Looking at the source to SM_const_decorator.h, that seems plausible.
Line 321 is an assertion that matches this message. It's not 330, but
that could easily be because I'm looking at the current version and
you've got an older one embedded in your OpenSCAD.
However another line, 78, does not render;
polyhedron( points = [ [-9.5,9,0], [-10,11,0], [-6,11,0], [-9.5,9,7],
[-10,11,7], [-6,11,7] ], faces=[ [0,1,2], [3,4,5], [0,1,4,3],[1,2,5,4],
[2,0,3,5] ], convexity = 1);
There is no error, it just doesn't appear in the rendered version but it is
in preview. If I put line 78 in a new project all by itself it works fine.
So is the error really about line 78 and not line 330.
Generally CGAL errors seem to be related to winding errors (listing
points on a face in the wrong order), manifold errors (two shapes that
touch along one line), and the ilk.
In this case, extracting that one line and looking at it with
View/Thrown Together and F5, the bottom face is purple. That means it's
wound backwards, that it's inside-out. That's the [0,1,2] face.
Reversing it to [2,1,0] turns that face yellow.
See if that helps.
Yep, that fixed it. Thanks a lot. I had assumed that was an error on the
wrong line so I wasn't seeing my issue. I gotta remember that. I always get
one face backwards.
Lee
--
Sent from: http://forum.openscad.org/