mirror of https://github.com/CGAL/cgal
fix bug when both edges to remove are constrained edges
This commit is contained in:
parent
d6ffe7c0f3
commit
d2be97b1eb
|
|
@ -1603,7 +1603,20 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
|
||||||
if (!is_border(edges_to_erase[1],g))
|
if (!is_border(edges_to_erase[1],g))
|
||||||
join_face(edges_to_erase[1],g);
|
join_face(edges_to_erase[1],g);
|
||||||
else
|
else
|
||||||
remove_face(opposite(edges_to_erase[1],g),g);
|
{
|
||||||
|
if (!is_border(pq, g))
|
||||||
|
remove_face(opposite(edges_to_erase[1],g),g);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(!is_border(opposite(next(qp,g),g),g))
|
||||||
|
{
|
||||||
|
// q will be removed, swap it with p
|
||||||
|
internal::swap_vertices(p, q, g);
|
||||||
|
}
|
||||||
|
remove_face(opposite(edges_to_erase[1],g),g);
|
||||||
|
return q;
|
||||||
|
}
|
||||||
|
}
|
||||||
join_vertex(pq,g);
|
join_vertex(pq,g);
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,8 @@ create_single_source_cgal_program( "test_test_face.cpp" )
|
||||||
|
|
||||||
create_single_source_cgal_program( "test_Collapse_edge.cpp" )
|
create_single_source_cgal_program( "test_Collapse_edge.cpp" )
|
||||||
|
|
||||||
|
create_single_source_cgal_program( "test_Collapse_edge_with_constraints.cpp" )
|
||||||
|
|
||||||
create_single_source_cgal_program("test_graph_traits.cpp")
|
create_single_source_cgal_program("test_graph_traits.cpp")
|
||||||
|
|
||||||
create_single_source_cgal_program("test_Properties.cpp")
|
create_single_source_cgal_program("test_Properties.cpp")
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,331 @@
|
||||||
|
#include <CGAL/Simple_cartesian.h>
|
||||||
|
#include <CGAL/Surface_mesh.h>
|
||||||
|
#include <CGAL/boost/graph/Euler_operations.h>
|
||||||
|
|
||||||
|
typedef CGAL::Simple_cartesian<double> K;
|
||||||
|
typedef K::Point_3 Point_3;
|
||||||
|
typedef CGAL::Surface_mesh<Point_3> Mesh;
|
||||||
|
typedef Mesh::Property_map<Mesh::Edge_index, bool> ECM;
|
||||||
|
|
||||||
|
|
||||||
|
bool test_one_side(Mesh::Halfedge_index h, Mesh m)
|
||||||
|
{
|
||||||
|
std::pair<ECM, bool> ecm_and_bool = m.property_map<Mesh::Edge_index, bool>("ecm");
|
||||||
|
Mesh::Vertex_index vkept=target(h, m);
|
||||||
|
CGAL::Euler::collapse_edge(edge(h, m), m, ecm_and_bool.first);
|
||||||
|
return (!m.is_removed(vkept) && CGAL::is_valid_polygon_mesh(m));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool test(Mesh::Halfedge_index h, Mesh& m)
|
||||||
|
{
|
||||||
|
return test_one_side(h, m) && test_one_side(opposite(h, m), m);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
// ---------------------------------------------- //
|
||||||
|
// two faces incident to the edge to be collapsed //
|
||||||
|
// ---------------------------------------------- //
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
/* ECM ecm = */m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(prev(h2c,m), m), true);
|
||||||
|
put(ecm, edge(prev(opposite(h2c,m),m), m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(next(h2c,m), m), true);
|
||||||
|
put(ecm, edge(prev(opposite(h2c,m),m), m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(prev(h2c,m), m), true);
|
||||||
|
put(ecm, edge(next(opposite(h2c,m),m), m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
// duplicate block + add one border (1)
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
Mesh::Halfedge_index hb1 = opposite(prev(h2c, m), m);
|
||||||
|
assert(is_border(hb1, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
/* ECM ecm = */m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
Mesh::Halfedge_index hb1 = opposite(prev(h2c, m), m);
|
||||||
|
assert(is_border(hb1, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(prev(h2c,m), m), true);
|
||||||
|
put(ecm, edge(prev(opposite(h2c,m),m), m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
Mesh::Halfedge_index hb1 = opposite(prev(h2c, m), m);
|
||||||
|
assert(is_border(hb1, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(next(h2c,m), m), true);
|
||||||
|
put(ecm, edge(prev(opposite(h2c,m),m), m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
Mesh::Halfedge_index hb1 = opposite(prev(h2c, m), m);
|
||||||
|
assert(is_border(hb1, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(prev(h2c,m), m), true);
|
||||||
|
put(ecm, edge(next(opposite(h2c,m),m), m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
// duplicate block + add one border (2)
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
Mesh::Halfedge_index hb2 = opposite(next(opposite(h2c,m), m), m);
|
||||||
|
assert(is_border(hb2, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
/* ECM ecm = */m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
Mesh::Halfedge_index hb2 = opposite(next(opposite(h2c,m), m), m);
|
||||||
|
assert(is_border(hb2, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(prev(h2c,m), m), true);
|
||||||
|
put(ecm, edge(prev(opposite(h2c,m),m), m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
Mesh::Halfedge_index hb2 = opposite(next(opposite(h2c,m), m), m);
|
||||||
|
assert(is_border(hb2, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(next(h2c,m), m), true);
|
||||||
|
put(ecm, edge(prev(opposite(h2c,m),m), m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
Mesh::Halfedge_index hb2 = opposite(next(opposite(h2c,m), m), m);
|
||||||
|
assert(is_border(hb2, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(prev(h2c,m), m), true);
|
||||||
|
put(ecm, edge(next(opposite(h2c,m),m), m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
// duplicate block + add one border (1)
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
Mesh::Halfedge_index hb1 = opposite(prev(h2c, m), m);
|
||||||
|
assert(is_border(hb1, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
Mesh::Halfedge_index hb2 = opposite(next(opposite(h2c,m), m), m);
|
||||||
|
assert(is_border(hb2, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
/* ECM ecm = */m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
Mesh::Halfedge_index hb1 = opposite(prev(h2c, m), m);
|
||||||
|
assert(is_border(hb1, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
Mesh::Halfedge_index hb2 = opposite(next(opposite(h2c,m), m), m);
|
||||||
|
assert(is_border(hb2, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(prev(h2c,m), m), true);
|
||||||
|
put(ecm, edge(prev(opposite(h2c,m),m), m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
Mesh::Halfedge_index hb1 = opposite(prev(h2c, m), m);
|
||||||
|
assert(is_border(hb1, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
Mesh::Halfedge_index hb2 = opposite(next(opposite(h2c,m), m), m);
|
||||||
|
assert(is_border(hb2, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(next(h2c,m), m), true);
|
||||||
|
put(ecm, edge(prev(opposite(h2c,m),m), m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::Euler::add_center_vertex(h, m);
|
||||||
|
Mesh::Halfedge_index hb1 = opposite(prev(h2c, m), m);
|
||||||
|
assert(is_border(hb1, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
Mesh::Halfedge_index hb2 = opposite(next(opposite(h2c,m), m), m);
|
||||||
|
assert(is_border(hb2, m));
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(prev(h2c,m), m), true);
|
||||||
|
put(ecm, edge(next(opposite(h2c,m),m), m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
// ---------------------------------------------- //
|
||||||
|
// one face incident to the edge to be collapsed //
|
||||||
|
// ---------------------------------------------- //
|
||||||
|
// center triangle with 2 border edges (1)
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index hb1=opposite(next(h2c,m),m);
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
/* ECM ecm = */m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index hb1=opposite(next(h2c,m),m);
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(next(h2c, m),m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index hb1=opposite(next(h2c,m),m);
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(prev(h2c, m),m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
// center triangle with 2 border edges (2)
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index hb2=opposite(prev(h2c,m),m);
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
/* ECM ecm = */m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index hb2=opposite(prev(h2c,m),m);
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(next(h2c, m),m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index hb2=opposite(prev(h2c,m),m);
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(prev(h2c, m),m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
// center triangle with 1 border edges
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index hb1=opposite(next(h2c,m),m);
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
Mesh::Halfedge_index hb2=opposite(prev(h2c,m),m);
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
/* ECM ecm = */m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index hb1=opposite(next(h2c,m),m);
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
Mesh::Halfedge_index hb2=opposite(prev(h2c,m),m);
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(next(h2c, m),m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Mesh m;
|
||||||
|
Mesh::Halfedge_index h2c = CGAL::make_triangle(Point_3(),Point_3(),Point_3(),m);
|
||||||
|
Mesh::Halfedge_index hb1=opposite(next(h2c,m),m);
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb1, m), hb1, m);
|
||||||
|
Mesh::Halfedge_index hb2=opposite(prev(h2c,m),m);
|
||||||
|
CGAL::Euler::add_vertex_and_face_to_border(prev(hb2, m), hb2, m);
|
||||||
|
ECM ecm = m.add_property_map<Mesh::Edge_index, bool>("ecm", false).first;
|
||||||
|
put(ecm, edge(prev(h2c, m),m), true);
|
||||||
|
bool res = test(h2c, m);
|
||||||
|
assert(res);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue