forked from 1b-agent/opencadstudio-upstream
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 <[email protected]>
This commit is contained in:
1 parent
7bf9ce31ae
commit
47a4bf19b3
3 files changed
+65
No files matched your search
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user