mirror of https://github.com/CGAL/cgal
handle isolated vertices in the target mesh
This commit is contained in:
parent
6511f95999
commit
026abdb175
|
|
@ -167,6 +167,8 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm,
|
||||||
for(tm_vertex_descriptor v : vertices(tm))
|
for(tm_vertex_descriptor v : vertices(tm))
|
||||||
{
|
{
|
||||||
tm_halfedge_descriptor h = halfedge(v, tm);
|
tm_halfedge_descriptor h = halfedge(v, tm);
|
||||||
|
if (h==boost::graph_traits<TargetMesh>::null_halfedge())
|
||||||
|
continue;
|
||||||
tm_halfedge_descriptor next_around_vertex=h;
|
tm_halfedge_descriptor next_around_vertex=h;
|
||||||
do{
|
do{
|
||||||
next_around_vertex=opposite(next(next_around_vertex, tm), tm);
|
next_around_vertex=opposite(next(next_around_vertex, tm), tm);
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,57 @@ test_copy_face_graph_nm_umbrella()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
void
|
||||||
|
test_copy_face_graph_isolated_vertices()
|
||||||
|
{
|
||||||
|
typedef Kernel::Point_3 Point_3;
|
||||||
|
|
||||||
|
{
|
||||||
|
T s, t;
|
||||||
|
add_vertex(s);
|
||||||
|
CGAL::copy_face_graph(s, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
T s, t;
|
||||||
|
add_vertex(t);
|
||||||
|
CGAL::copy_face_graph(s, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
T s, t;
|
||||||
|
CGAL::make_triangle(Point_3(), Point_3(), Point_3(), s);
|
||||||
|
add_vertex(s);
|
||||||
|
t=s;
|
||||||
|
CGAL::copy_face_graph(s, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
T s, t;
|
||||||
|
CGAL::make_triangle(Point_3(), Point_3(), Point_3(), s);
|
||||||
|
add_vertex(s);
|
||||||
|
add_vertex(t);
|
||||||
|
CGAL::copy_face_graph(s, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
T s, t;
|
||||||
|
CGAL::make_tetrahedron(Point_3(), Point_3(), Point_3(), Point_3(), s);
|
||||||
|
add_vertex(s);
|
||||||
|
t=s;
|
||||||
|
CGAL::copy_face_graph(s, t);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
T s, t;
|
||||||
|
CGAL::make_tetrahedron(Point_3(), Point_3(), Point_3(), Point_3(), s);
|
||||||
|
add_vertex(s);
|
||||||
|
add_vertex(t);
|
||||||
|
CGAL::copy_face_graph(s, t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void
|
void
|
||||||
join_face_test()
|
join_face_test()
|
||||||
|
|
@ -619,6 +670,7 @@ void
|
||||||
test_Euler_operations()
|
test_Euler_operations()
|
||||||
{
|
{
|
||||||
test_copy_face_graph_nm_umbrella<Graph>();
|
test_copy_face_graph_nm_umbrella<Graph>();
|
||||||
|
test_copy_face_graph_isolated_vertices<Graph>();
|
||||||
join_face_test<Graph>();
|
join_face_test<Graph>();
|
||||||
add_vertex_and_face_to_border_test<Graph>();
|
add_vertex_and_face_to_border_test<Graph>();
|
||||||
add_face_to_border_test<Graph>();
|
add_face_to_border_test<Graph>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue