-
Notifications
You must be signed in to change notification settings - Fork 1
OEP2: Implicit Unions
aka. Lazy Unions
Issue: https://github.com/openscad/openscad/issues/350
Today, when performing a for loop, all the children of the for loop is unioned, independent on how they are being used further up in the tree. A typical example is hull() for(...)
, which could be significantly optimized if we could avoid performing the union.
Since we suggest that it's allowed to have multiple top-level objects, we could export these as different parts (for file formats supporting that; e.g. OBJ and AMF). We could even retain color/material information attached to these top-level objects.
Sometimes, the final union of top-level objects causes the result to not be manifold according to CGAL's pretty strict definition of manifoldness. By deferring this union to an external component (e.g. slicer) which has more knowledge of the manufacturing process, such cases could be handled in a more sensible way.
By passing a for loop directly to a CSG node, we can finally deprecate intersection_for
.
Suggested changes: http://piratepad.net/GtV1YXrakz
Cases 5-8 in the piratepad.net link above break backward compatibility. OEP4: Unwrap Operator suggests an alternative, for these specific cases, that preserves backwards compatibility.