Deterministic framing pose from a model center and bounding radius (both in printer
coordinates). Converts printer coords → scene coords through the root Z-up→Y-up rotation
(x, z, -y) and places the camera at the fixed 3/4 offset the renderers share.
The perspective offset magnitude is ≈2.69·radius at fov 50°, so the visible half-height at the
target plane is ≈2.69·radius·tan(25°) ≈ 1.25·radius; an orthographic frustum uses the same
half-height so toggling projection keeps the model the same apparent size (#150).
Lens-aware (DD-032): a perspective fov other than 50° scales the offset by framingLensScale, so
the sphere stays in view at any lens (the 32° Studio lens backs off ≈1.63×). At exactly 50 the offset is
the original one, byte-identical. viewHalfHeight (the ortho frustum) does not depend on the lens.
Throws RangeError for a fov outside [10, 120].
Extracted verbatim from ToolpathRenderer.frame() (DD-018 Phase 0) so ModelRenderer frames
identically. Pure — allocates and returns fresh vectors; mutates nothing.
Deterministic framing pose from a model center and bounding radius (both in printer coordinates). Converts printer coords → scene coords through the root Z-up→Y-up rotation (
x, z, -y) and places the camera at the fixed 3/4 offset the renderers share.The perspective offset magnitude is ≈2.69·radius at fov 50°, so the visible half-height at the target plane is ≈2.69·radius·tan(25°) ≈ 1.25·radius; an orthographic frustum uses the same half-height so toggling projection keeps the model the same apparent size (#150).
Lens-aware (DD-032): a perspective
fovother than 50° scales the offset by framingLensScale, so the sphere stays in view at any lens (the 32° Studio lens backs off ≈1.63×). At exactly 50 the offset is the original one, byte-identical.viewHalfHeight(the ortho frustum) does not depend on the lens. ThrowsRangeErrorfor afovoutside [10, 120].Extracted verbatim from
ToolpathRenderer.frame()(DD-018 Phase 0) soModelRendererframes identically. Pure — allocates and returns fresh vectors; mutates nothing.