Merge pull request #39730 from madmiraal/fix-39718

Fix creation of duplicate faces in CSG merge faces.
This commit is contained in:
Rémi Verschelde 2020-06-21 17:55:58 +02:00 committed by GitHub
commit fd21465ec3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}