diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-30 11:53:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-30 11:53:13 +0200 |
commit | 50e79134b8dc6ba192d01ebd1afcb39fb60bf0ec (patch) | |
tree | 946ae78549076639ee99e4588f31a8d7133da341 | |
parent | bccb323396377eafc4d51fe4ea70705144006033 (diff) | |
parent | 63f4e9219585200c380189b765bff01dd79214c1 (diff) |
Merge pull request #39956 from madmiraal/fix-39919
Fix CSG Visual Bug.
-rw-r--r-- | modules/csg/csg.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp index d0c9bf5d38..6c0a3a4ca3 100644 --- a/modules/csg/csg.cpp +++ b/modules/csg/csg.cpp @@ -523,7 +523,7 @@ void CSGBrushOperation::MeshMerge::_add_distance(List<real_t> &r_intersectionsA, // Check if distance exists. for (const List<real_t>::Element *E = intersections.front(); E; E = E->next()) { - if (Math::abs(**E - p_distance) < vertex_snap) { + if (Math::is_equal_approx(**E, p_distance)) { return; } } @@ -1068,15 +1068,6 @@ void CSGBrushOperation::Build2DFaces::_find_edge_intersections(const Vector2 p_s 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. Vector2 closest_point = Geometry2D::get_closest_point_to_segment(vertices[opposite_vertex_idx].point, p_segment_points); if ((closest_point - vertices[opposite_vertex_idx].point).length_squared() < vertex_snap2) { |