33c27106ff
* claim: #7919 * Pick by the body's own size, not the camera's distance (#7919) The occlusion test that decides whether an edge or vertex is hidden by the face in front allowed a slack of `scene_radius(app) * 0.02`, and `scene_radius` ends with `.max(app.cam.half_height() * 2.0)`: in an orthographic view that is `0.016 x camera distance`. Zooming out grew the slack without bound until a whole body fitted inside it and every edge behind the front face counted as visible, and edges and vertices are offered before faces, so they won the pick. Cutting the slack from the scene also gave a small part in a large assembly a tolerance many times its own size. `pick_slack` now takes a size and returns the mesh's own chord tolerance with room to spare, `DisplayQuality::Coarse.chord(size) * 4.0`: a facet sits at most a chord tolerance inside its surface, and that tolerance is already a fraction of the body's size, so the slack no longer moves when the camera does. Each body is tested with its own bounding box, which the loop already holds. `view.pick` does the same, so an agent's pick still matches a click on the same pixel. Sketch profiles and origin planes belong to no body and keep a scene-level value, `scene_pick_slack`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>