fix(sketch): merged adjacent profiles have whole edges where shared ones ended (#509)

When adjacent profiles are merged for one extrude, collinear lines on either side of where a shared boundary ended are joined back into one edge, so the body has no split faces or extra vertices for later booleans to trip on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
MqriusandClaude Opus 5.5 authored and GitHub committed 2026-10-13 00:11:59 -04:00
1 parent 2f7046efac
commit bb431f7ac2
3 files changed
+82 -1

No files matched your search

+3
View File
@@ -334,6 +334,9 @@ fn merging_adjacent_regions() {
let mut areas: Vec<f64> = m.iter().map(|r| r.area()).collect();
areas.sort_by(f64::total_cmp);
assert!((areas[0] - 50.0).abs() < 1e-9 && (areas[1] - 200.0).abs() < 1e-9, "{areas:?}");
// The two squares make one rectangle: the outline isn't left split where the shared edge was.
let sides = m.iter().map(|r| r.outer.segs.len()).collect::<Vec<_>>();
assert!(sides.contains(&4) && sides.contains(&3), "{sides:?}");
}
#[test]