Expand description
Generic DynamicObject dispatch shared by every CSG backend.
Backends implement DynamicBackend (parameterized primitive
constructors plus two 2D/3D bridge hooks); the tree walk itself —
booleans, transforms, extrusions, sketch loop handling — lives once in
dynamic_to_csg/dynamic_to_sketch. Blanket [ToCsg]/[ToSketch]
impls for DynamicObject route through the walkers, so backends must NOT
provide their own (the compiler rejects the overlap).
Conventions the constructors must honor (pinned by
tests/dynamic_dispatch.rs): cube/square corner-anchored at the
origin, cylinder/cone base on y=0 with +Y axis, sphere centered.
Backend-specific fixes (BSP’s centered-factory offsets, Manifold’s
z_to_y_up) belong inside the backend impls, never in the walkers.
Traits§
- Dynamic
Backend - A
CsgBackendthat can build everyDynamicObjectprimitive.
Functions§
- dynamic_
to_ csg - Evaluate a
DynamicObjecttree as a 3D solid. - dynamic_
to_ sketch - Evaluate a
DynamicObjecttree as a 2D sketch/cross-section.