forked from 1b-agent/opencadstudio-upstream
The orthographic depth half-range was frozen at fit time and measured along the fit-time eye direction. A 3-D drawing fitted straight-down (top view) got a shallow depth span; orbiting only rotated the camera, never resized the span, so the drawing's width loaded onto the eye axis and overran near/far — clipping the model the moment it was tilted off top (#473). Cache the model AABB on the camera and recompute the near/far depth from it for the live eye direction every frame. This tracks orbit, viewcube snaps, roll and restored views uniformly, and keeps the same tight, zoom-independent depth precision (coincident solids / meshes / wires keep their draw order). Falls back to the scalar half-range / distance-scaled span when no AABB is set. Closes #473 Co-Authored-By: Claude Opus 4.8 <[email protected]>