MCPcopy Create free account
hub / github.com/ad-si/LuaCAD / quantize

Function quantize

crates/luacad/src/render.rs:526–532  ·  view source on GitHub ↗

Quantize a position to ~1μm grid for vertex welding.

(pos: [f32; 3])

Source from the content-addressed store, hash-verified

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.
535fn collect_colored_leaves(

Callers 1

materialize_meshFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected