fix: contact and shell-grouping checks use a shared broad phase (#838)
Contact and shell-grouping checks find close triangle pairs through one shared grid instead of testing every pair. Refs #232.
This commit is contained in:
1 parent
4d8c80a86d
commit
b6e3a6c366
5 files changed
+150
-81
No files matched your search
@@ -834,6 +834,17 @@ fn sphere_booleans() {
|
||||
assert_eq!((m.merged.faces, m.merged.edges, m.merged.vertices), (7, 13, 9));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn similar_spheres_meet() {
|
||||
// bherbruck/solidcraft#232: the contact test compared every pair of nearby triangles of the
|
||||
// two fine sphere meshes and gave up past its work limit, so their join was refused.
|
||||
let a = sphere(Vec3::ZERO, 10.0).unwrap();
|
||||
for (x, meet) in [(12.0, true), (4.0, true), (20.0, true), (20.5, false)] {
|
||||
let b = sphere(Vec3::new(x, 0.0, 0.0), 10.0).unwrap();
|
||||
assert_eq!(a.meets(&b).unwrap(), meet, "centres {x} mm apart");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn debug_convergence() {
|
||||
|
||||
Reference in new issue
Block a user