From 28356d2f08105923767f8072e9d8a5ac0a620f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=82=E4=B9=8B=E9=92=B3?= Date: Thu, 23 Jul 2026 15:45:03 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20clip=5Fmesh=20=E6=94=B9=E7=94=A8=20brute?= =?UTF-8?q?-force=20inside=20test=20(BVH=20=E5=B0=84=E7=BA=BF=E6=9C=89?= =?UTF-8?q?=E5=AE=B9=E5=B7=AE=20bug)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/boolean/boolean_mesh.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/boolean/boolean_mesh.cpp b/src/boolean/boolean_mesh.cpp index dfc6d28..920da12 100644 --- a/src/boolean/boolean_mesh.cpp +++ b/src/boolean/boolean_mesh.cpp @@ -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)