Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

Offset Plane dialog opens at 0 mm (#2327) (#2338)

Spencer Owenb1e5a5559e5a
diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs
index 0e48dc8688..d6b7f7e082 100644
--- a/crates/ui-egui/src/dialogs.rs
+++ b/crates/ui-egui/src/dialogs.rs
@@ -523,7 +523,7 @@ impl Dialog {
"solid.pipe" => Dialog::new(Kind::Pipe { diameter: "5 mm".into(), wall: String::new() }, vec![SelInput::new("Path", CURVES, true)]),
"solid.bounding_solid" => Dialog::new(Kind::Stock { margin: "2 mm".into() }, vec![SelInput::new("Bodies (all if none)", BODIES, true)]),
"construct.plane.offset" => {
- Dialog::new(Kind::OffsetPlane { offset: "10 mm".into() }, vec![SelInput::new("Plane", PLANES | PLANAR_FACES, false)])
+ Dialog::new(Kind::OffsetPlane { offset: "0 mm".into() }, vec![SelInput::new("Plane", PLANES | PLANAR_FACES, false)])
}
"construct.plane.midplane" => Dialog::new(
Kind::Midplane,
diff --git a/crates/ui-egui/tests/scenarios/offset_plane_from_face.json b/crates/ui-egui/tests/scenarios/offset_plane_from_face.json
index dae079bfa0..e9d4b8189d 100644
--- a/crates/ui-egui/tests/scenarios/offset_plane_from_face.json
+++ b/crates/ui-egui/tests/scenarios/offset_plane_from_face.json
@@ -10,5 +10,5 @@
{"call": "engine.execute", "params": {"command": "sketch.rectangle.two_point", "params": {"p0": [0, 0], "p1": [10, 10]}}},
{"call": "engine.execute", "params": {"command": "sketch.finish", "params": {}}},
{"call": "engine.execute", "params": {"command": "solid.extrude", "params": {"distance": 10, "operation": "new", "body_name": "Pad"}}},
- {"expect": {"errors": 0, "bodies": 2, "bbox": {"body": "Pad", "min": [null, null, 30], "max": [null, null, 40]}}}
+ {"expect": {"errors": 0, "bodies": 2, "bbox": {"body": "Pad", "min": [null, null, 20], "max": [null, null, 30]}}}
]