[OpenSCAD] When modules are cached?

MichaelAtOz oz.at.michael at gmail.com
Wed Oct 30 23:27:17 EDT 2019


Congratulations, you discovered a  crash
<https://github.com/openscad/openscad/issues/3112>  . So do not do
Display_CSG_Products...

In the console B(); A() C(); F5 has:

Parsing design (AST generation)...
Compiling design (CSG Tree generation)...
Compiling design (CSG Products generation)...
Geometries in cache: 8
Geometry cache size in bytes: 2704
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
Normalized CSG tree has 50001 elements
Compile and preview finished.
Total rendering time: 0 hours, 0 minutes, 3 seconds

Then do Design/Display_CSG_Tree. Don't close the Window.

Then change to C(); A() B(); Clear_Cache/F5 which shows:

Compiling design (CSG Tree generation)...
Compiling design (CSG Products generation)...
Geometries in cache: 8
Geometry cache size in bytes: 2704
CGAL Polyhedrons in cache: 0
CGAL cache size in bytes: 0
Compiling design (CSG Products normalization)...
Normalized CSG tree has 50001 elements
Compile and preview finished.
Total rendering time: 0 hours, 0 minutes, 21 seconds

Then do Design/Display_CSG_Tree. Compare the two trees, (if your's is the
same, the scroll bars behave strangely until you scroll a bit). 

Note the 50001 elements. 
The first has a few more complex elements and 50,000 odd simpler elements.
The second 50,000 odd complex elements.

The tree needs to be parsed to display the image.
I don't think it is cache related.
There are --debug <something> command line options that could show cache
activity, I'd have to guess the right values...



-----
Admin - email* me if you need anything, or if I've done something stupid...

* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”   Fight it! http://www.ourfairdeal.org/   time is running out!
--
Sent from: http://forum.openscad.org/



More information about the Discuss mailing list