X and the toolbar's Construction no longer start a pick tool (Fusion has none): with a selection they convert it, with nothing selected they switch construction mode, outside a sketch they say so. Center Rectangle draws both diagonals as construction, the centre at their crossing, with only the first carrying the midpoint constraint (the second is implied), so a fresh one stays at 4 DOF. Scenarios s30 (pattern a hole) and s32 (cut in the active component) enabled now that b36b332 is on main
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
90873e51bb
commit
1e8fc25976
6 files changed
+33
-11
No files matched your search
@@ -420,8 +420,8 @@ impl SolveApp {
|
||||
}
|
||||
}
|
||||
// Construction toggle: selected sketch curves switch at once, otherwise pick them.
|
||||
// Construction (X): convert the selection, or switch construction mode.
|
||||
if id == "sketch.construction" && self.session.active_sketch.is_some() {
|
||||
// Construction (X): convert the selection, or switch construction mode; no pick tool.
|
||||
if id == "sketch.construction" {
|
||||
sketch_palette::toggle_construction(self);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,9 @@ pub fn set_mode(app: &mut SolveApp, m: u8) {
|
||||
/// switch construction mode on or off.
|
||||
pub fn toggle_construction(app: &mut SolveApp) {
|
||||
let curves = selected_curves(app);
|
||||
if curves.is_empty() {
|
||||
if curves.is_empty() && app.session.active_sketch.is_none() {
|
||||
app.set_status("Construction mode is for drawing in a sketch: edit a sketch first", false);
|
||||
} else if curves.is_empty() {
|
||||
let m = if mode(app) == 1 { 0 } else { 1 };
|
||||
set_mode(app, m);
|
||||
} else {
|
||||
|
||||
@@ -65,7 +65,6 @@ impl Tool {
|
||||
"ConstraintCollinear" => ("ConstraintCollinear", Kind::Pick(2)),
|
||||
"ConstraintMidPoint" => ("ConstraintMidPoint", Kind::Pick(2)),
|
||||
"ConstraintSymmetry" => ("ConstraintSymmetry", Kind::Pick(3)),
|
||||
"sketch.construction" => ("sketch.construction", Kind::Pick(1)),
|
||||
_ => return crate::sketch_tools::tool_for(id),
|
||||
};
|
||||
Some(Tool { cmd, kind, pts: Vec::new(), hover: None, picks: Vec::new(), dims: Vec::new(), dims_stage: usize::MAX, dims_focus: false })
|
||||
@@ -280,7 +279,6 @@ fn run_pick(app: &mut SolveApp, t: &Tool) {
|
||||
let params = match t.cmd {
|
||||
"ConstraintHorizontalVertical" => json!({"line": k[0]}),
|
||||
"ConstraintFix" => json!({"entity": k[0]}),
|
||||
"sketch.construction" => json!({"curves": [k[0]]}),
|
||||
"ConstraintCoincident" => json!({"a": k[0], "b": k[1]}),
|
||||
"ConstraintMidPoint" => json!({"point": k[0], "line": k[1]}),
|
||||
"ConstraintSymmetry" => json!({"a": k[0], "b": k[1], "line": k[2]}),
|
||||
|
||||
Reference in new issue
Block a user