summaryrefslogtreecommitdiff
path: root/modules/csg/csg.cpp
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2020-06-29 16:40:25 +0100
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2020-06-29 17:57:07 +0100
commit1a559c9889b5a8ae9fdc65482548c6bad0b61eb4 (patch)
tree5fba6baa050c718e6a81c36eeada2eb2dc87a04a /modules/csg/csg.cpp
parent4599381fad10a20ffd2d4eadf7e9de99ef15ac80 (diff)
Create degenerate triangles when inserting an edge into a CSG face.
They will be deleted when the faces are merged, but their edges are needed for merging faces.
Diffstat (limited to 'modules/csg/csg.cpp')
-rw-r--r--modules/csg/csg.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp
index d0c9bf5d38..a3250f0d57 100644
--- a/modules/csg/csg.cpp
+++ b/modules/csg/csg.cpp
@@ -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) {