pyboxbuilder.compartments.element.build_element

pyboxbuilder.compartments.element.build_element(element: CompartmentElement, default_depth: float) → Bosl2Solid[source]

Build the cutout solid for one element, in the compartment’s local frame.

pybosl2 primitives are centre-anchored, so each branch below builds its shape around the origin, rotation spins it in place, and one final translate puts the element’s lower-left corner on its offset with its floor at z_offset. The result can be subtracted from a box body once the compartment has been moved into the interior frame.