forked from 1b-agent/opencadstudio-upstream
fix(select): box/lasso-select blocks whose body is a solid
Box/lasso only tested top-level solid meshes, so a block whose visible body is a solid (its mesh lives in the per-INSERT instanced cache, and it has no wires to catch) was never picked up by a window/crossing/lasso. Add block_mesh_box_hit / block_mesh_poly_hit that test each INSERT's instanced block solid meshes and resolve a hit to the parent INSERT, and wire them into the selection paths. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
ae3b305f95
commit
ae9940929c
2 files changed
+100
No files matched your search
@@ -3742,6 +3742,9 @@ impl OpenCADStudio {
|
||||
handles.extend(
|
||||
self.tabs[i].scene.mesh_box_hit(a, p, crossing, vp_mat, bounds),
|
||||
);
|
||||
handles.extend(self.tabs[i].scene.block_mesh_box_hit(
|
||||
a, p, crossing, vp_mat, bounds,
|
||||
));
|
||||
// Box/lasso accumulates like individual picks
|
||||
// (issue #83): a plain box adds to the current
|
||||
// selection, Shift+box removes the boxed
|
||||
@@ -3796,6 +3799,9 @@ impl OpenCADStudio {
|
||||
handles.extend(
|
||||
self.tabs[i].scene.mesh_poly_hit(&poly_pts, crossing, vp_mat, bounds),
|
||||
);
|
||||
handles.extend(self.tabs[i].scene.block_mesh_poly_hit(
|
||||
&poly_pts, crossing, vp_mat, bounds,
|
||||
));
|
||||
// Selection filter: keep only allowed types.
|
||||
handles.retain(|&h| self.tabs[i].scene.passes_selection_filter(h));
|
||||
// Accumulate like the box path (issue #83): plain
|
||||
@@ -3935,6 +3941,9 @@ impl OpenCADStudio {
|
||||
handles.extend(
|
||||
self.tabs[i].scene.mesh_box_hit(a, p, crossing, vp_mat, bounds),
|
||||
);
|
||||
handles.extend(self.tabs[i].scene.block_mesh_box_hit(
|
||||
a, p, crossing, vp_mat, bounds,
|
||||
));
|
||||
// Selection filter: keep only allowed types.
|
||||
handles.retain(|&h| self.tabs[i].scene.passes_selection_filter(h));
|
||||
// Accumulate (issue #83): a plain box adds to the
|
||||
|
||||
Reference in new issue
Block a user