fix: clip_mesh 改用 brute-force inside test (BVH 射线有容差 bug)
CI / Build & Test (push) Failing after 36s
CI / Release Build (push) Failing after 31s

This commit is contained in:
茂之钳
2026-07-23 15:45:03 +00:00
parent 78995ecf6a
commit 28356d2f08
+2 -1
View File
@@ -138,7 +138,8 @@ HalfedgeMesh clip_mesh(const HalfedgeMesh& a, const HalfedgeMesh& b,
core::Point3D v2 = a.vertex(vis[2]);
core::Point3D centroid = (v0 + v1 + v2) * (1.0 / 3.0);
bool inside = is_point_inside_bvh(centroid, bvh_b);
// Use brute-force check for correct results (BVH ray query has epsilon issues)
bool inside = is_point_inside_mesh(centroid, b);
if (invert_b) inside = !inside;
// Keep the face if its centroid is OUTSIDE (b)