test: failing regression test for #268: Panic from truck-topology lib.rs:186 when joining struts that end on a bore wall (#283)
* test: reproduce #268 (Panic from truck-topology lib.rs:186 when joining struts that end on a bore wall) * Sew refuses edges whose ends weld to one vertex (#268) The sewer welds vertices on a 1e-6 grid but only rejected edges shorter than 1e-9, so a sliver edge between the two welded its ends into one vertex and truck-topology panicked ("Two same vertices cannot construct an edge") inside the guard. Such an edge is now a degenerate-edge error before any truck call, and the boolean takes its usual fallback. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: bherbruck <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
3 files changed
+36
-1
No files matched your search
@@ -363,7 +363,8 @@ fn sew_impl(faces: &[FaceSpec], touching: bool, sources: Option<&[Option<crate::
|
||||
}
|
||||
for e in l {
|
||||
let (a, b) = e.ends();
|
||||
if !a.is_finite() || !b.is_finite() || a.dist(b) < 1e-9 {
|
||||
// Ends that weld to one vertex would make truck panic on a zero-length edge (#268).
|
||||
if !a.is_finite() || !b.is_finite() || a.dist(b) < 1e-9 || key(a) == key(b) {
|
||||
return Err(KernelError::Invalid("sew: a degenerate edge".into()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user