agausmann / vrml2scad

Translate VRML / WRL files to an OpenSCAD script
BSD 2-Clause "Simplified" License
3 stars 0 forks source link

Flatten transforms before generating OpenSCAD #1

Open agausmann opened 1 year ago

agausmann commented 1 year ago

The transform hierarchy is extra information that I don't care about when loading it in OpenSCAD, but it creates extra work every time OpenSCAD has to reload the model.

Calculating and applying the transform nodes ahead of time can potentially save a significant amount of time and space.

agausmann commented 1 year ago

This is only viable for shapes that are unique. For Shape nodes that are reused (with DEF and USE), duplicating them to precalculate the transform multiple times might save some computation but would increase vertex/face count and could increase disk and memory usage.