Quantize a position to ~1μm grid for vertex welding.
(pos: [f32; 3])
| 524 | } |
| 525 | |
| 526 | /// Recursively walk a ScadNode tree, splitting at Union, Color, and Material |
| 527 | /// boundaries, collecting `(color, material, leaf_node)` tuples where each |
| 528 | /// leaf is a non-splittable subtree wrapped in any ancestor transforms. |
| 529 | /// |
| 530 | /// Unions are split: each child is visited independently. |
| 531 | /// Colors and materials update the inherited shading state (see [`ShadeCtx`] |
| 532 | /// for the color precedence). |
| 533 | /// Transforms accumulate: leaf nodes are wrapped in all ancestor transforms. |
| 534 | /// Everything else (Difference, Intersection, primitives) is a leaf. |
| 535 | fn collect_colored_leaves( |