Mark the first shape as inside, not the second shape, when CSG shapes are
co-planer.
This commit is contained in:
parent
d3b5c0948c
commit
5b1e6e35be
1 changed files with 2 additions and 2 deletions
|
@ -583,8 +583,8 @@ bool CSGBrushOperation::MeshMerge::_bvh_inside(FaceBVH *facebvhptr, int p_max_de
|
||||||
// Check if faces are co-planar.
|
// Check if faces are co-planar.
|
||||||
if ((current_normal - face_normal).length_squared() < CMP_EPSILON2 &&
|
if ((current_normal - face_normal).length_squared() < CMP_EPSILON2 &&
|
||||||
is_point_in_triangle(face_center, current_points)) {
|
is_point_in_triangle(face_center, current_points)) {
|
||||||
// Only add an intersection if checking a B face.
|
// Only add an intersection if not a B face.
|
||||||
if (face.from_b) {
|
if (!face.from_b) {
|
||||||
_add_distance(intersectionsA, intersectionsB, current_face.from_b, 0);
|
_add_distance(intersectionsA, intersectionsB, current_face.from_b, 0);
|
||||||
}
|
}
|
||||||
} else if (ray_intersects_triangle(face_center, face_normal, current_points, CMP_EPSILON, intersection_point)) {
|
} else if (ray_intersects_triangle(face_center, face_normal, current_points, CMP_EPSILON, intersection_point)) {
|
||||||
|
|
Loading…
Reference in a new issue