[OpenSCAD] F5 works, but F6 gives: ERROR: CGAL error in CGAL_Nef_polyhedron3():

arnholm at arnholm.org arnholm at arnholm.org
Thu Jan 18 07:25:56 EST 2018

On 2018-01-18 10:29, Parkinbot wrote:
> cacb wrote
>> Perhaps one could also say that a polyhedron with fewer than 4 faces 
>> is
>> always an error, perhaps with the exception of zero faces in the case 
>> of
>> using it within hull()?
> I am heavily using this feature
> - to preview 2D-polygons placed in 3D space,
> - to see, what sweep() will do with my code
> - to check for selfintersections
> Indeed I even don't see much sense in restricting STL output to 
> "proper"
> manifolds. Is it part of the format specification?

My comment was not referring to STL or other output formats, only the 
internal OpenSCAD definition of polyhedron. Ref. the OpenSCAD 
documentation of polyhedron I lniked to. Either the documentation should 
be changed to reflect the software, or the documented rule requiring 
planar faces should be enforced.

OpenSCAD should tell the user when it receives clearly illegal input 
according to documentation. Such illegal polyhedrons are usually a sign 
of user error. There are many examples of novice users that run into 
problems because they make mistakes in this area. My comment was 
motivated to help such users.

Experienced users like yourself may "abuse" it to achieve useful special 
effects like you describe. This is quite legitimate, but it sounds to me 
like a different feature. You could perhaps serve both groups of users 

a) Enforcing stricter rules on polyhedrons, and give good error messages 
instead of silently accepting everything that is clearly wrong given 
polyhedron definitions. This would help novice users.

b) Introduce a new feature to serve the more advanced needs you 
describe. For example you could introduce a new object type called 
"polygonsoup" (or whatever name you prefer) that has exactly the same 
input syntax as polyhedron, but with relaxed rules, allowing previews of 
polygons in 3d space.

Or, if you don't like a new type, then the default behaviour of 
polyhedron could be as in a), but an extra "relaxed_rules=true" 
parameter could relax the rules, so you get b).

Carsten Arnholm

More information about the Discuss mailing list