Welcome! Log In Create A New Profile


Rendering error

Posted by Replace 
Rendering error
August 10, 2017 12:14PM
I have a complex structure that will display ok after F5,
however, after F6 I get this error:

Saved backup file: /Users/Laura/Documents/OpenSCAD/backups/Mockup-backup-xJL50578.scad
Compiling design (CSG Tree generation)...
Rendering Polygon Mesh using CGAL...
ERROR: CGAL error in CGALUtils::applyBinaryOperator union: CGAL ERROR: assertion violation! Expr: itl != it->second.end() File: /Users/kintel/code/OpenSCAD/openscad-2015.03/../libraries/install/include/CGAL/Nef_3/SNC_external_structure.h Line: 1102
Geometries in cache: 66
Geometry cache size in bytes: 19817184
CGAL Polyhedrons in cache: 11
CGAL cache size in bytes: 81062360
Total rendering time: 0 hours, 0 minutes, 45 seconds
Rendering finished.

Anybody any clue of what is wrong ?



Orca V4.4 rebuild to Ramps with Mk8 and E3D, as well as a Rostock Delta Mini and an OLO in backorder :-)
Re: Rendering error
August 30, 2017 10:24PM

Hard to tell just from the error message, could you provide a snippet of the code where this is happening?
Are you using the union operation with an imported STL or a polyhedron you've created? I used to have similar issues when I attempted to make a complex polyhedron.

If you're having this problem using union on an STL (I can't tell, can't see your code), running it through a STL fixing service like netfab and trying again may fix the issue. If you're using union on a polyhedron you've creates I can only wish you the best of luck in debugging which face is inside out or missing.

I believe the error is due to a non manifold polyhedron or STL. In laymans terms (I believe, correct me if I'm wrong) this means that one of the faces/triangles making up your object is inside out (facing the wrong way). The triangles in STLs have an 'inside' and 'outside' face, and sometimes these can get flipped for whatever reason which causes problems like these. Either that or there is a hole in your object/shell, which is exactly what it sounds like.

Hope that helps. If you could show us the snippet of code where this occurred.

Also, a quick google suggests the error could be due to trying to union two objects which do not touch. This seems to be something CGAL has trouble with apparently. A last suggestion is to update OpenSCAD, you're using a 2015 version, a newer version may work better.
Re: Rendering error
September 05, 2017 04:15AM
I usually find such issues by intelligently chopping out large sections of code until the problem goes away, then putting smaller sections back in until it re-appears, slowly isolating the issue to a single block of code or operation.

However if you are modifying imported STL's, you may find that you cannot get it to work - I find OpenScad cannot handle certain modifications to some STLs (even if they have no errors), especially if you are cutting sections out of the STL (difference function). I then resort to reproducing the shape of the STL in Openscad (you can import the STL to use as a template).

Sorry, only registered users may post in this forum.

Click here to login