Sketch: accept redundant but consistent constraints (#687) (#699)

A clover of same-size rectangles drawn around a shared corner was refused as over-constrained.

Constraints that remove no degree of freedom but still hold (zero residual) are now kept and shown dimmed as redundant. Conflicting ones are still refused. A redundant driving dimension is refused with "already determined by ...". Typed sizes become driven (reference) dimensions. Drawing no longer adds Horizontal/Vertical to a side that is already implied through two coincident corners. The solver reports redundant constraints using a Jacobian row-dependence test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bherbruckandClaude Opus 5.5 authored and GitHub committed 2026-10-13 10:12:55 -04:00
1 parent add4a18961
commit 9ba72e118b
14 files changed
+804 -77

No files matched your search

+3 -1
View File
@@ -95,7 +95,9 @@ pub(super) fn draw(s: &mut Session, p: &Value) -> Result<Value> {
}
_ => return Err(bad(cmd, "unsupported dimension role")),
};
let mut dimension = json!({"entities": entities, "type": ty, "value": value});
// A typed size the sketch already has (a rectangle drawn onto another's side, the same
// height) is placed as a driven (reference) dimension rather than refused.
let mut dimension = json!({"entities": entities, "type": ty, "value": value, "if_redundant": "driven"});
if let Some(sketch) = params.get("sketch") {
dimension["sketch"] = sketch.clone();
}