summaryrefslogtreecommitdiff
path: root/modules/csg/csg.cpp
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2020-08-12 08:01:02 +0100
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2020-08-12 08:01:02 +0100
commit5b1e6e35be91b2dc8f4135cea4b415c89b5b10d6 (patch)
tree0dc47ee0e6f28933db069a42c37fbba171046542 /modules/csg/csg.cpp
parentd3b5c0948c943b3fbcb4b5322262c59c92abfa83 (diff)
Mark the first shape as inside, not the second shape, when CSG shapes are
co-planer.
Diffstat (limited to 'modules/csg/csg.cpp')
-rw-r--r--modules/csg/csg.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp
index 6c0a3a4ca3..b270e04c63 100644
--- a/modules/csg/csg.cpp
+++ b/modules/csg/csg.cpp
@@ -583,8 +583,8 @@ bool CSGBrushOperation::MeshMerge::_bvh_inside(FaceBVH *facebvhptr, int p_max_de
// Check if faces are co-planar.
if ((current_normal - face_normal).length_squared() < CMP_EPSILON2 &&
is_point_in_triangle(face_center, current_points)) {
- // Only add an intersection if checking a B face.
- if (face.from_b) {
+ // Only add an intersection if not a B face.
+ if (!face.from_b) {
_add_distance(intersectionsA, intersectionsB, current_face.from_b, 0);
}
} else if (ray_intersects_triangle(face_center, face_normal, current_points, CMP_EPSILON, intersection_point)) {