Equal cylinders crossing each other no longer refuse a cut (#788) (#1179)

Equal cylinders crossing each other no longer refuse a cut (#788).
This commit is contained in:
Lasse Lian authored and GitHub committed 2026-10-14 17:56:02 -04:00
1 parent beb3ea01e7
commit 8f081679bc
11 files changed
+537 -29

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ use crate::{BoolOp, KernelError, Result};
const MAX_SAMPLES: usize = 20_000;
/// Distance from `p` to the triangle `abc`.
fn point_triangle_dist(p: Vec3, a: Vec3, b: Vec3, c: Vec3) -> f64 {
pub(crate) fn point_triangle_dist(p: Vec3, a: Vec3, b: Vec3, c: Vec3) -> f64 {
let n = (b - a).cross(c - a);
let Some(nn) = n.normalized() else {
return [(a, b), (b, c), (c, a)].iter().map(|(u, v)| p.dist_to_segment(*u, *v)).fold(f64::INFINITY, f64::min);