Harden parametric sketch constraints

This commit is contained in:
Hakan Seven committed 2026-09-11 09:45:57 +03:00
1 parent 41c07e9858
commit 9b58ca8a93
101 files changed
+3128 -13767

No files matched your search

+1 -3
View File
@@ -963,9 +963,7 @@ impl OpenCADStudio {
}
}
// ── Constraints (persistent: added to the scope's SketchConstraintSet,
// solved via Scene::bump_entities, re-solved on every later edit —
// see docs/parametric_system_design.md §6.1) ──
// ── Persistent constraints ────────────────────────────────────
"HCONSTRAINT" | "VCONSTRAINT" | "FXCONSTRAINT" => {
let handles = self.tabs[i].scene.selected_handles_in_order();
if handles.is_empty() {
+4 -2
View File
@@ -298,10 +298,12 @@ pub fn start_allowed(cmd: &str) -> bool {
| "PERF"
| "CUI"
| "ALIASEDIT"
| "OPTIONS"
| "OP"
| "CUILOAD"
| "CUIIMPORT"
// The start page already offers Options as a button, so the
// command that opens the same dialog belongs here too.
| "OPTIONS"
| "OP"
)
}
+9 -16
View File
@@ -240,30 +240,23 @@ impl OpenCADStudio {
return Some(Task::done(Message::AliasEditorOpen));
}
// ── OPTIONS — app preferences dialog ────────────────────────────
// Registered for autocomplete (`commands/mod.rs`'s "one-shot
// commands" list) but had no actual dispatch arm anywhere — the
// Start-tab welcome screen's "Options" button emits
// `Message::OptionsOpen` directly and was the only way to reach
// it. Found while live-testing the new UI-scale setting (nothing
// to do with that feature itself, just discovered along the
// way). "OP" is AutoCAD's own short alias for this command.
// ── CUI — keyboard shortcut / key-binding editor ───────────────
"CUI" => {
return Some(Task::done(Message::ShortcutsPanelOpen));
}
// ── OPTIONS / OP — the preferences dialog ──────────────────────
// Both names were registered for autocomplete but never dispatched,
// so typing either one answered "Unknown command" and the dialog
// could only be reached from the button on the start page.
"OPTIONS" | "OP" => {
return Some(Task::done(Message::OptionsOpen));
}
// ── PARAMETERS — named-parameter/expression table editor ───────
// `docs/named_parameters_design.md` stage 4. AutoCAD's own
// command name for the equivalent feature (Parameters Manager).
"PARAMETERS" => {
return Some(Task::done(Message::NamedParametersOpen));
}
// ── CUI — keyboard shortcut / key-binding editor ───────────────
"CUI" => {
return Some(Task::done(Message::ShortcutsPanelOpen));
}
// CUIEXPORT <path> — write the keyboard-shortcut customizations
// (the drawing-independent CUI data) to a plain "KEY COMMAND" file.
"CUIEXPORT" => {