Merge remote-tracking branch 'cgal/5.4.x-branch'

This commit is contained in:
Sébastien Loriot 2022-07-04 10:52:07 +02:00
commit a4e53600c1
3 changed files with 21 additions and 2 deletions

View File

@ -833,6 +833,18 @@ bool remove_almost_degenerate_faces(const FaceRange& face_range,
// special case of `edge(h, tmesh)` being a border edge --> remove the face
if(is_border(opposite(h, tmesh), tmesh))
{
// check a non-manifold vertex won't be created
bool removal_is_nm=false;
for(halfedge_descriptor hh : CGAL::halfedges_around_target(next(h, tmesh), tmesh))
{
if (is_border(hh, tmesh))
{
removal_is_nm = true;
break;
}
}
if (removal_is_nm) continue;
for(halfedge_descriptor hh : CGAL::halfedges_around_face(h, tmesh))
{
// Remove from even 'next_edges_to_flip' because it might have been re-added from a flip

View File

@ -520,6 +520,8 @@ public:
/* Destructor */
~Graph();
void clear();
/* Adds a node to the graph */
node_id add_node();
@ -701,7 +703,7 @@ inline Graph::Graph(void (*err_function)(const char *))
flow = 0;
}
inline Graph::~Graph()
inline void Graph::clear()
{
while (node_block_first) {
node_block *next = node_block_first -> next;
@ -722,6 +724,11 @@ inline Graph::~Graph()
}
}
inline Graph::~Graph()
{
clear();
}
inline Graph::node_id Graph::add_node()
{
node *i;

View File

@ -47,7 +47,7 @@ public:
void clear_graph()
{
graph = MaxFlow::Graph();
graph.clear();
}
Vertex_descriptor add_vertex()