forked from 1b-agent/opencadstudio-upstream
fix(3d): move and paste ACIS solids to the right place
Solids were missing from the entity transform dispatch, so move / rotate / scale / mirror were silently no-ops on a 3D solid (only its wires shifted) and a pasted solid stayed at its original location. Add a Transformable impl for Solid3D/Region/Body/Surface (delegating to acadrust, which now composes the move into the ACIS body placement) and register them in the dispatcher. Also make cross-drawing paste land at the cursor: the clipboard centroid is measured in the source drawing's offset-relative frame, so correct the paste translation by the source/target world_offset difference (zero within one drawing). Bumps acadrust for the solid-geometry transform fixes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
e45064f8a8
commit
de1f1c0e24
6 files changed
+49
-4
No files matched your search
@@ -369,6 +369,12 @@ pub(super) struct OpenCADStudio {
|
||||
clipboard: Vec<acadrust::EntityType>,
|
||||
/// Centroid of the clipboard entities (world XY plane).
|
||||
clipboard_centroid: glam::Vec3,
|
||||
/// The source drawing's `world_offset` at copy time. The centroid above is
|
||||
/// measured in that drawing's offset-relative frame; pasting into a drawing
|
||||
/// with a different offset (e.g. a large-coordinate file → a fresh one)
|
||||
/// must correct the paste translation by the offset difference, else the
|
||||
/// objects land `source_offset − target_offset` away from the cursor.
|
||||
clipboard_world_offset: [f64; 3],
|
||||
/// Table records (layer / linetype / text + dim style) the clipboard
|
||||
/// entities reference, captured from the source drawing at copy time so a
|
||||
/// paste into a *different* drawing can recreate any that are missing —
|
||||
@@ -1721,6 +1727,7 @@ impl OpenCADStudio {
|
||||
update_notice_body: None,
|
||||
clipboard: Vec::new(),
|
||||
clipboard_centroid: glam::Vec3::ZERO,
|
||||
clipboard_world_offset: [0.0; 3],
|
||||
clipboard_deps: ClipboardDeps::default(),
|
||||
shift_down: false,
|
||||
mtext_editor: None,
|
||||
|
||||
Reference in new issue
Block a user