diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-21 17:55:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-21 17:55:58 +0200 |
commit | fd21465ec309cb84cd262c110fe59d8060c37f82 (patch) | |
tree | 5786d8d9b6f7628abe81a1b2c2403e65ae6f0865 | |
parent | 277d2f1f50fe060ad7ff4b2696bf67a742a0ea83 (diff) | |
parent | f5b99b578eb3e85128e84c64ebd52cababad67e2 (diff) |
Merge pull request #39730 from madmiraal/fix-39718
Fix creation of duplicate faces in CSG merge faces.
-rw-r--r-- | modules/csg/csg.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp index ded0b970dc..d0c9bf5d38 100644 --- a/modules/csg/csg.cpp +++ b/modules/csg/csg.cpp @@ -904,8 +904,12 @@ void CSGBrushOperation::Build2DFaces::_merge_faces(const Vector<int> &p_segment_ vertices[p_segment_indices[closest_idx]].point }; if (are_segements_parallel(edge1, edge2, vertex_snap2)) { - degenerate_points.push_back(outer_edge_idx[0]); - degenerate_points.push_back(outer_edge_idx[1]); + if (!degenerate_points.find(outer_edge_idx[0])) { + degenerate_points.push_back(outer_edge_idx[0]); + } + if (!degenerate_points.find(outer_edge_idx[1])) { + degenerate_points.push_back(outer_edge_idx[1]); + } continue; } |