forked from 1b-agent/opencadstudio-upstream
Phase 3.1 (partial — pan). The Model-tile wire cache keyed on the exact camera hash, so every pan re-tessellated the whole tile even though pan changes neither the curve tol nor the culled set (beyond a shift). Re-key on (geometry_epoch, pan_invariant_hash, tessellated_region): - pan_invariant_hash covers rotation + wpp (tol) but excludes the pan target, so a pure pan keeps it stable; - the wires were culled to a 1.25x-margin region, recorded with the entry; - a hit now also requires the tile's current visible rect to still fit inside that region, guaranteeing every on-screen wire is present. Result: panning within the existing margin reuses the tessellation (tess ms -> ~0 on the PERF HUD) with no missing geometry. Zoom, orbit and edits change the signature/epoch and rebuild as before; the cull margin is unchanged so miss cost — and zoom behaviour — is identical. GPU still re-uploads per camera_generation (diff upload is Phase 3.2). Co-Authored-By: Claude Opus 4.8 <[email protected]>