Sheet metal: tear as a fourth corner relief shape (#809)

A sheet metal rule's corner relief shape can now be tear; saved under format 17 with a note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NOWN-DEVandClaude Opus 5.5 authored and GitHub committed 2026-10-13 14:28:28 -04:00
1 parent bfbf5f9432
commit dd084ec9e1
11 files changed
+751 -56

No files matched your search

@@ -350,6 +350,15 @@ fn rules_dialog_picks_the_corner_relief_shape() {
h.step(&json!({"start": "sheet.manage_rules"})).unwrap();
h.frames(3);
assert_eq!(shown(&h.app), Some(1), "the dialog shows the rule's shape");
// The tear: no relief in the base, both ends of all four bends torn.
h.step(&json!({"click": {"handle": "dialog:Corner Relief Shape"}})).unwrap();
h.step(&json!({"click": {"handle": "dialog:Corner Relief Shape:Tear"}})).unwrap();
assert_eq!(shown(&h.app), Some(3));
h.step(&json!({"widget": "OK"})).unwrap();
assert!(h.app.dialog.is_none(), "{:?}", h.app.dialog);
assert_eq!(h.app.session.doc.sheet_rule(None).corner_relief_shape, "tear");
let torn = h.app.session.model.state().sheets.last().map(|s| s.flanges.iter().filter(|f| f.tear == (true, true)).count());
assert_eq!((rounds(&h.app), torn), (Some(0), Some(4)));
}
#[test]