Merge pull request #39981 from madmiraal/fix-39919-3.2
[3.2] Fix CSG Visual Bug.
This commit is contained in:
commit
3247ac4b0e
1 changed files with 1 additions and 10 deletions
|
@ -524,7 +524,7 @@ void CSGBrushOperation::MeshMerge::_add_distance(List<real_t> &r_intersectionsA,
|
||||||
|
|
||||||
// Check if distance exists.
|
// Check if distance exists.
|
||||||
for (const List<real_t>::Element *E = intersections.front(); E; E = E->next())
|
for (const List<real_t>::Element *E = intersections.front(); E; E = E->next())
|
||||||
if (Math::abs(**E - p_distance) < vertex_snap) return;
|
if (Math::is_equal_approx(**E, p_distance)) return;
|
||||||
|
|
||||||
intersections.push_back(p_distance);
|
intersections.push_back(p_distance);
|
||||||
}
|
}
|
||||||
|
@ -1066,15 +1066,6 @@ void CSGBrushOperation::Build2DFaces::_find_edge_intersections(const Vector2 p_s
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't create degenerate triangles.
|
|
||||||
Vector2 split_edge1[2] = { vertices[new_vertex_idx].point, edge_points[0] };
|
|
||||||
Vector2 split_edge2[2] = { vertices[new_vertex_idx].point, edge_points[1] };
|
|
||||||
Vector2 new_edge[2] = { vertices[new_vertex_idx].point, vertices[opposite_vertex_idx].point };
|
|
||||||
if (are_segements_parallel(split_edge1, new_edge, vertex_snap2) &&
|
|
||||||
are_segements_parallel(split_edge2, new_edge, vertex_snap2)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If opposite point is on the segemnt, add its index to segment indices too.
|
// If opposite point is on the segemnt, add its index to segment indices too.
|
||||||
Vector2 closest_point = Geometry::get_closest_point_to_segment_2d(vertices[opposite_vertex_idx].point, p_segment_points);
|
Vector2 closest_point = Geometry::get_closest_point_to_segment_2d(vertices[opposite_vertex_idx].point, p_segment_points);
|
||||||
if ((closest_point - vertices[opposite_vertex_idx].point).length_squared() < vertex_snap2)
|
if ((closest_point - vertices[opposite_vertex_idx].point).length_squared() < vertex_snap2)
|
||||||
|
|
Loading…
Reference in a new issue