Skip to content

OEP2: Implicit Unions

Doug Moen edited this page Jul 20, 2014 · 5 revisions

aka. Lazy Unions

Issue: https://github.com/openscad/openscad/issues/350

Goals

Optimizations

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.

Multi-material exports

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.

Robustness in corner-case of manifoldness

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.

Syntax cleanup

By passing a for loop directly to a CSG node, we can finally deprecate intersection_for.

Changes

Suggested changes: http://piratepad.net/GtV1YXrakz

Counterproposal (OEP4)

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.

Clone this wiki locally