[OpenSCAD] Improve rendering speed

Parkinbot rudolf at parkinbot.com
Thu Jun 9 08:01:52 EDT 2016

Sorry about the 'typos' (English is not my first language). Of course I
meant „queried” and „ensure/guarantee“. 

I perfectly agree with you: If you know what you do (self-restriction),
avoiding superfluous tests is a perfect way to get fast results. 
But I can assure you: Self-intersection *is* a problem with CGAL - and
dealing formally with it is the main reason why CGAL is slow.
A general scheme or a language feature cannot rely on self-restriction (e.g.
pointers in C language follow this way, and we all know, what was the result
in the history of computing). 
About "simple polygons" and "convexity" you can find good articles in the
net, e.g. Wikipedia. We also had some discussion on it in this forum. 

wolf wrote
> I am now in a position to quantify my claims about improved rendering
> speed. Parkinbot 
> published <http://www.thingiverse.com/thing:648813>  
> has  published a routine to generate a coil. When set to 200 slices per
> winding and 10 windings, this routine renders on my machine in 52 minutes.
> The equivalent coil, also having 2000 slices, renders in 11 seconds using
> my approach:

The slowness of the hull-approach is obvious and mainly comes from the large
number of union() operations being involved. But it is still the only way to
tackle things like that with OpenSCAD language means (and was discussed e.g. 
). Also my next step was to switch to polyhedron(), which means you are
programming the whole shape mostly from the scratch - and nobody will
understand your code anymore, unless you put it into a well-documented
library with a simple interface like  skin()
Have fun with the Klein bottle. Let me know, how you solve the
self-intersection part ;-) 


View this message in context: http://forum.openscad.org/Improve-rendering-speed-tp17580p17615.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

More information about the Discuss mailing list