fix(select): pick 3D solids by clicking their body, not just edges
Single-click selection only tested wire-edge proximity, so clicking a solid's face missed — only its thin projected edges were selectable. Add mesh_click_hit: project each mesh triangle to screen and test the cursor against it (front-most wins), wired as a fallback after the wire and hatch hit-tests. Works for any meshed solid. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
7bf9ce31ae
commit
47a4bf19b3
3 changed files with 65 additions and 0 deletions
|
|
@ -2850,6 +2850,11 @@ impl OpenCADStudio {
|
|||
vp_mat,
|
||||
bounds,
|
||||
)
|
||||
})
|
||||
.or_else(|| {
|
||||
// 3D solids: click anywhere on the shaded
|
||||
// body, not just the thin projected edges.
|
||||
self.tabs[i].scene.mesh_click_hit(p, vp_mat, bounds)
|
||||
});
|
||||
if let Some(handle) = hit {
|
||||
// Individual picks accumulate (issue #47):
|
||||
|
|
|
|||
Loading…
Reference in a new issue