Move/Copy like Fusion: opens with nothing moved and a full triad at the bodies' centre (X/Y/Z arrows, plane squares, rotation rings, free-drag centre ball; snapped drags, Alt/Ctrl free), Move Type (Free Move, Translate, Rotate, Point to Point, Point to Position), X/Y/Z distances and angles with live preview, a pivot input; the triad is one shared module (gizmo.rs); UI scenario s27
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
1 parent
fba397ff65
commit
2b9ed16cc8
8 files changed
+794
-28
No files matched your search
@@ -52,7 +52,6 @@ pub fn anchor(app: &SolveApp, d: &Dialog) -> Option<(Vec3, Option<Vec3>)> {
|
||||
| Kind::OffsetFaces { .. } => (at, normal),
|
||||
// Shell thickness grows into the body.
|
||||
Kind::Shell { .. } => (at, normal.map(|n| -n)),
|
||||
Kind::Move { .. } => (at, Some(Vec3::Z)),
|
||||
Kind::Sheet(_) => (at, crate::dialogs_sheet::arrow(app, d).or(normal)),
|
||||
Kind::Plastic(_) => (at, normal),
|
||||
Kind::PatternRect { .. } => (at, d.inputs.get(1).and_then(|i| i.items.first()).and_then(|x| crate::dialogs::axis_of(app, x)).map(|a| a.1)),
|
||||
@@ -96,6 +95,16 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui, painter: &egui::Painter, proj
|
||||
app.dialog = Some(d);
|
||||
return;
|
||||
}
|
||||
// Move: the triad at the pivot; dragging it sets the distances and angles.
|
||||
if matches!(d.kind, Kind::Move { .. }) {
|
||||
if let Some(t) = crate::dialogs_move::triad(app, &d)
|
||||
&& let Some(g) = crate::gizmo::show(ui, painter, proj, egui::Id::new("sc_move_triad"), &t, snap_step(app.cam.half_height()))
|
||||
{
|
||||
crate::dialogs_move::drag(app, &mut d, g);
|
||||
}
|
||||
app.dialog = Some(d);
|
||||
return;
|
||||
}
|
||||
if let Some((base, dir)) = anchor(app, &d)
|
||||
&& let Some(bs) = proj.to_screen(base)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user