forked from 1b-agent/opencadstudio-upstream
fix(3d): box/lasso-select 3D solids and refresh them after a transform
Box, window, crossing and lasso selection only tested wires and hatches, so 3D solids (which render as meshes) could never be selected that way. Add mesh_box_hit / mesh_poly_hit that project the solid mesh and test it against the box / lasso (window = all vertices inside, crossing = any vertex inside or the region sitting inside the solid), and wire them into the selection paths. Also re-tessellate solids after a move/rotate/scale/mirror/copy: the entity moved but its cached mesh didn't, so the solid stayed drawn at its old position. Rebuild the mesh caches when a transformed/copied handle is an ACIS volume. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
c5969b4776
commit
d5f1348f1b
4 files changed
+167
No files matched your search
@@ -3739,6 +3739,9 @@ impl OpenCADStudio {
|
||||
vp_mat,
|
||||
bounds,
|
||||
));
|
||||
handles.extend(
|
||||
self.tabs[i].scene.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
|
||||
@@ -3790,6 +3793,9 @@ impl OpenCADStudio {
|
||||
vp_mat,
|
||||
bounds,
|
||||
));
|
||||
handles.extend(
|
||||
self.tabs[i].scene.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
|
||||
@@ -3926,6 +3932,9 @@ impl OpenCADStudio {
|
||||
vp_mat,
|
||||
bounds,
|
||||
));
|
||||
handles.extend(
|
||||
self.tabs[i].scene.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