<p>Reading between the lines on other forums, I found that the GCAL renderer will render a malformed object, but it will fail when a binary operator, such as union or intersection, is applied to that object.</p>
<p>There was a discussion about degenerate points (two points in a polygon list that were the (nearly) the same values.  I had this situation, but fixing it did not solve the problem.</p>
<p>I rederived the face lists, and found that for one face the vertices were listed in the opposite order from the others.  Rather then using right-hand-rule, I had used left-hand-rule.</p>
<p>Reordering the vertices for the one face fixed the problem.  There was no way to see the problem from the preview.</p>
<p>A more useful diagnostic message would have been helpful, or a tool for checking polyhedra for being manifolds could have saved me hours of experimenting and failing.</p>

CC BY-SA 4.0
2021-03-01T15:42:07.717Z
2021-03-02T03:06:55.107Z
2021-03-02T03:06:55.107Z
cmm
<p>I built a model and it previewed correctly.  When rendering for STL export (F6), I got an assertion error:</p>
<blockquote>
<p>ERROR: CGAL error in CGAL_Nef_polyhedron3(): CGAL ERROR: assertion
violation! Expr: e-&gt;incident_sface() != SFace_const_handle() File:
/mxe/usr/x86_64-w64-mingw32.static.posix/include/CGAL/Nef_S2/SM_const_decorator.h
Line: 329</p>
</blockquote>
<p>Most of the model rendered correctly, but one component disappeared.</p>
<p>Moving the object didn't change the problem, but isolating just the disappearing part gave me a correct render of that part.</p>

CC BY-SA 4.0
2021-03-03T09:12:07.950Z
I had the exact same error yesterday! I assumed it was a bug in the library I was using, but maybe there's more to it?
Opifex
<3d-models><3d-design><cad><openscad>
OpenSCAD render (F6) fails with "ERROR: CGAL error in CGAL_Nef_polyhedron3()"
cmm
# OpenSCAD render (F6) fails with "ERROR: CGAL error in CGAL_Nef_polyhedron3()"

(Asked by: username_0 on 2021-03-01)

I built a model and it previewed correctly. When rendering for STL export (F6), I got an assertion error:

> ERROR: CGAL error in CGAL\_Nef\_polyhedron3(): CGAL ERROR: assertion
> violation! Expr: e->incident\_sface() != SFace\_const\_handle() File:
> /mxe/usr/x86\_64-w64-mingw32.static.posix/include/CGAL/Nef\_S2/SM\_const\_decorator.h
> Line: 329

Most of the model rendered correctly, but one component disappeared.

Moving the object didn't change the problem, but isolating just the disappearing part gave me a correct render of that part.

**Tags:** 3d-models, 3d-design, cad, openscad
> **Comments:**
> **username_1**: I had the exact same error yesterday! I assumed it was a bug in the library I was using, but maybe there's more to it?  

---

## 1 answers

### Answer by username_0 on 2021-03-01. Score: 3

Reading between the lines on other forums, I found that the GCAL renderer will render a malformed object, but it will fail when a binary operator, such as union or intersection, is applied to that object.

There was a discussion about degenerate points (two points in a polygon list that were the (nearly) the same values. I had this situation, but fixing it did not solve the problem.

I rederived the face lists, and found that for one face the vertices were listed in the opposite order from the others. Rather then using right-hand-rule, I had used left-hand-rule.

Reordering the vertices for the one face fixed the problem. There was no way to see the problem from the preview.

A more useful diagnostic message would have been helpful, or a tool for checking polyhedra for being manifolds could have saved me hours of experimenting and failing.


---

