mirror of https://github.com/CGAL/cgal
commit
5dcd5c778b
|
|
@ -932,7 +932,6 @@ add_vertex_and_face_to_border(typename boost::graph_traits<Graph>::halfedge_desc
|
||||||
set_next(h1,ohe1,g);
|
set_next(h1,ohe1,g);
|
||||||
set_target(he1,target(h1,g),g);
|
set_target(he1,target(h1,g),g);
|
||||||
set_target(ohe1,v,g);
|
set_target(ohe1,v,g);
|
||||||
|
|
||||||
set_next(he2,he1,g);
|
set_next(he2,he1,g);
|
||||||
set_next(ohe1,ohe2,g);
|
set_next(ohe1,ohe2,g);
|
||||||
set_target(he2,v,g);
|
set_target(he2,v,g);
|
||||||
|
|
@ -940,16 +939,16 @@ add_vertex_and_face_to_border(typename boost::graph_traits<Graph>::halfedge_desc
|
||||||
set_next(ohe2,next(h2,g),g);
|
set_next(ohe2,next(h2,g),g);
|
||||||
set_target(ohe2,target(h2,g),g);
|
set_target(ohe2,target(h2,g),g);
|
||||||
set_next(h2,he2,g);
|
set_next(h2,he2,g);
|
||||||
internal::set_border(ohe1,g);
|
internal::set_border(he1,g);
|
||||||
internal::set_border(ohe2,g);
|
internal::set_border(he2,g);
|
||||||
|
|
||||||
CGAL::Halfedge_around_face_iterator<Graph> hafib,hafie;
|
CGAL::Halfedge_around_face_iterator<Graph> hafib,hafie;
|
||||||
for(boost::tie(hafib, hafie) = halfedges_around_face(he1, g);
|
for(boost::tie(hafib, hafie) = halfedges_around_face(ohe1, g);
|
||||||
hafib != hafie;
|
hafib != hafie;
|
||||||
++hafib){
|
++hafib){
|
||||||
set_face(*hafib, f, g);
|
set_face(*hafib, f, g);
|
||||||
}
|
}
|
||||||
set_halfedge(f, he1, g);
|
set_halfedge(f, ohe1, g);
|
||||||
return ohe2;
|
return ohe2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,13 @@
|
||||||
OFF
|
OFF
|
||||||
5 3 0
|
5 3 0
|
||||||
|
0 0 0
|
||||||
|
1 0 0
|
||||||
|
0 1 0
|
||||||
|
1 1 0
|
||||||
|
2 0 0
|
||||||
|
3 0 2 1
|
||||||
|
3 1 2 3
|
||||||
|
3 1 3 4
|
||||||
# yo
|
# yo
|
||||||
# |\
|
# |\
|
||||||
# | \
|
# | \
|
||||||
|
|
@ -9,12 +17,3 @@ OFF
|
||||||
# | \ |
|
# | \ |
|
||||||
# |f1\|
|
# |f1\|
|
||||||
# uo---ow
|
# uo---ow
|
||||||
0 0 0
|
|
||||||
1 0 0
|
|
||||||
0 1 0
|
|
||||||
1 1 0
|
|
||||||
2 0 0
|
|
||||||
# faces
|
|
||||||
3 0 2 1
|
|
||||||
3 1 2 3
|
|
||||||
3 1 3 4
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,14 @@
|
||||||
OFF
|
OFF
|
||||||
5 4 0
|
5 4 0
|
||||||
|
0 2 0
|
||||||
|
2 2 0
|
||||||
|
0 0 0
|
||||||
|
2 0 0
|
||||||
|
1 1 0
|
||||||
|
3 0 4 1
|
||||||
|
3 0 2 4
|
||||||
|
3 2 3 4
|
||||||
|
3 3 1 4
|
||||||
# u v
|
# u v
|
||||||
# +--------+
|
# +--------+
|
||||||
# |\ /|
|
# |\ /|
|
||||||
|
|
@ -12,13 +21,3 @@ OFF
|
||||||
# |/ \|
|
# |/ \|
|
||||||
# +--------+
|
# +--------+
|
||||||
# w x
|
# w x
|
||||||
0 2 0
|
|
||||||
2 2 0
|
|
||||||
0 0 0
|
|
||||||
2 0 0
|
|
||||||
1 1 0
|
|
||||||
# faces
|
|
||||||
3 0 4 1
|
|
||||||
3 0 2 4
|
|
||||||
3 2 3 4
|
|
||||||
3 3 1 4
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,13 @@
|
||||||
OFF
|
OFF
|
||||||
6 2 0
|
6 2 0
|
||||||
|
0 1 0
|
||||||
|
0 0 0
|
||||||
|
1 0 0
|
||||||
|
1 1 0
|
||||||
|
2 0 0
|
||||||
|
2 1 0
|
||||||
|
4 0 1 2 3
|
||||||
|
4 3 2 4 5
|
||||||
# u x z
|
# u x z
|
||||||
# +------------+------------+
|
# +------------+------------+
|
||||||
# | | |
|
# | | |
|
||||||
|
|
@ -9,12 +17,3 @@ OFF
|
||||||
# | | |
|
# | | |
|
||||||
# +------------+------------+
|
# +------------+------------+
|
||||||
# v w y
|
# v w y
|
||||||
0 1 0
|
|
||||||
0 0 0
|
|
||||||
1 0 0
|
|
||||||
1 1 0
|
|
||||||
2 0 0
|
|
||||||
2 1 0
|
|
||||||
# faces
|
|
||||||
4 0 1 2 3
|
|
||||||
4 3 2 4 5
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ join_face_test()
|
||||||
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
||||||
|
|
||||||
CGAL::Halfedge_around_face_iterator<T> begin, end;
|
CGAL::Halfedge_around_face_iterator<T> begin, end;
|
||||||
boost::tie(begin, end) = halfedges_around_face(halfedge(f.f1, f.m), f.m);
|
boost::tie(begin, end) = CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m);
|
||||||
assert(std::distance(begin, end) == 4);
|
assert(std::distance(begin, end) == 4);
|
||||||
for(; begin != end; ++begin)
|
for(; begin != end; ++begin)
|
||||||
{
|
{
|
||||||
|
|
@ -163,8 +163,8 @@ join_vertex_interior_test()
|
||||||
assert(CGAL::internal::exact_num_faces(f.m) == 2);
|
assert(CGAL::internal::exact_num_faces(f.m) == 2);
|
||||||
assert(CGAL::internal::exact_num_vertices(f.m) == 5);
|
assert(CGAL::internal::exact_num_vertices(f.m) == 5);
|
||||||
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
||||||
assert(boost::distance(halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 3);
|
assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 3);
|
||||||
assert(boost::distance(halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3);
|
assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3);
|
||||||
assert(degree(f.x, f.m) == 4);
|
assert(degree(f.x, f.m) == 4);
|
||||||
assert(CGAL::is_valid(f.m));
|
assert(CGAL::is_valid(f.m));
|
||||||
}
|
}
|
||||||
|
|
@ -188,8 +188,8 @@ join_vertex_exterior_test()
|
||||||
assert(CGAL::internal::exact_num_faces(f.m) == 2);
|
assert(CGAL::internal::exact_num_faces(f.m) == 2);
|
||||||
assert(CGAL::internal::exact_num_vertices(f.m) == 5);
|
assert(CGAL::internal::exact_num_vertices(f.m) == 5);
|
||||||
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
||||||
assert(boost::distance(halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4);
|
assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4);
|
||||||
assert(boost::distance(halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3);
|
assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3);
|
||||||
assert(degree(f.y, f.m) == 3);
|
assert(degree(f.y, f.m) == 3);
|
||||||
assert(CGAL::is_valid(f.m));
|
assert(CGAL::is_valid(f.m));
|
||||||
}
|
}
|
||||||
|
|
@ -207,8 +207,8 @@ join_vertex_exterior_test()
|
||||||
assert(CGAL::internal::exact_num_faces(f.m) == 2);
|
assert(CGAL::internal::exact_num_faces(f.m) == 2);
|
||||||
assert(CGAL::internal::exact_num_vertices(f.m) == 5);
|
assert(CGAL::internal::exact_num_vertices(f.m) == 5);
|
||||||
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
||||||
assert(boost::distance(halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4);
|
assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f1, f.m), f.m)) == 4);
|
||||||
assert(boost::distance(halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3);
|
assert(boost::distance(CGAL::halfedges_around_face(halfedge(f.f2, f.m), f.m)) == 3);
|
||||||
|
|
||||||
assert(CGAL::is_valid(f.m));
|
assert(CGAL::is_valid(f.m));
|
||||||
assert(degree(f.w, f.m) == 3);
|
assert(degree(f.w, f.m) == 3);
|
||||||
|
|
@ -237,8 +237,8 @@ split_vertex()
|
||||||
assert(CGAL::is_valid(f.m));
|
assert(CGAL::is_valid(f.m));
|
||||||
assert(CGAL::internal::exact_num_vertices(f.m) == 7);
|
assert(CGAL::internal::exact_num_vertices(f.m) == 7);
|
||||||
assert(CGAL::internal::exact_num_edges(f.m) == 8);
|
assert(CGAL::internal::exact_num_edges(f.m) == 8);
|
||||||
assert(boost::distance(halfedges_around_face(h1, f.m)) == 5);
|
assert(boost::distance(CGAL::halfedges_around_face(h1, f.m)) == 5);
|
||||||
assert(boost::distance(halfedges_around_face(h2, f.m)) == 7);
|
assert(boost::distance(CGAL::halfedges_around_face(h2, f.m)) == 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|
@ -264,8 +264,8 @@ split_join_vertex_inverse()
|
||||||
assert(CGAL::internal::exact_num_faces(f.m) == 2);
|
assert(CGAL::internal::exact_num_faces(f.m) == 2);
|
||||||
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
assert(CGAL::internal::exact_num_edges(f.m) == 6);
|
||||||
assert(CGAL::internal::exact_num_halfedges(f.m) == 12);
|
assert(CGAL::internal::exact_num_halfedges(f.m) == 12);
|
||||||
assert(boost::distance(halfedges_around_face(h1, f.m)) == 3);
|
assert(boost::distance(CGAL::halfedges_around_face(h1, f.m)) == 3);
|
||||||
assert(boost::distance(halfedges_around_face(h2, f.m)) == 3);
|
assert(boost::distance(CGAL::halfedges_around_face(h2, f.m)) == 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -383,7 +383,7 @@ int main()
|
||||||
test_Euler_operations<SM>();
|
test_Euler_operations<SM>();
|
||||||
|
|
||||||
#ifdef CGAL_USE_OPENMESH
|
#ifdef CGAL_USE_OPENMESH
|
||||||
test_Euler_operations<SM>();
|
test_Euler_operations<OMesh>();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::cerr << "done\n";
|
std::cerr << "done\n";
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
#include <CGAL/boost/graph/properties.h>
|
#include <CGAL/boost/graph/properties.h>
|
||||||
|
|
||||||
#include <CGAL/Simple_cartesian.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
|
|
||||||
#include <CGAL/Polyhedron_items_with_id_3.h>
|
#include <CGAL/Polyhedron_items_with_id_3.h>
|
||||||
#include <CGAL/IO/Polyhedron_iostream.h>
|
#include <CGAL/IO/Polyhedron_iostream.h>
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// ATTN: If you change this kernel remember to also hack
|
// ATTN: If you change this kernel remember to also hack
|
||||||
// properties_PolyMesh_ArrayKernelT.h accordingly
|
// properties_PolyMesh_ArrayKernelT.h accordingly
|
||||||
typedef CGAL::Simple_cartesian<double> Kernel;
|
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
|
||||||
typedef CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_with_id_3> Polyhedron;
|
typedef CGAL::Polyhedron_3<Kernel, CGAL::Polyhedron_items_with_id_3> Polyhedron;
|
||||||
|
|
||||||
typedef Kernel::Point_3 Point_3;
|
typedef Kernel::Point_3 Point_3;
|
||||||
|
|
@ -173,12 +173,12 @@ struct Surface_fixture_1 {
|
||||||
assert(x != boost::graph_traits<Graph>::null_vertex());
|
assert(x != boost::graph_traits<Graph>::null_vertex());
|
||||||
assert(y != boost::graph_traits<Graph>::null_vertex());
|
assert(y != boost::graph_traits<Graph>::null_vertex());
|
||||||
|
|
||||||
f1 = is_border(halfedge(u, m),m) ? face(opposite(halfedge(u, m), m), m) : face(halfedge(u, m), m);
|
f1 = CGAL::is_border(halfedge(u, m),m) ? face(opposite(halfedge(u, m), m), m) : face(halfedge(u, m), m);
|
||||||
assert(f1 != boost::graph_traits<Graph>::null_face());
|
assert(f1 != boost::graph_traits<Graph>::null_face());
|
||||||
CGAL::Halfedge_around_face_iterator<Graph> hafib, hafie;
|
CGAL::Halfedge_around_face_iterator<Graph> hafib, hafie;
|
||||||
for(boost::tie(hafib, hafie) = halfedges_around_face(halfedge(f1, m), m); hafib != hafie; ++hafib)
|
for(boost::tie(hafib, hafie) = CGAL::halfedges_around_face(halfedge(f1, m), m); hafib != hafie; ++hafib)
|
||||||
{
|
{
|
||||||
if(! is_border(opposite(*hafib, m), m))
|
if(! CGAL::is_border(opposite(*hafib, m), m))
|
||||||
f2 = face(opposite(*hafib, m), m);
|
f2 = face(opposite(*hafib, m), m);
|
||||||
}
|
}
|
||||||
typename boost::graph_traits<Graph>::face_iterator fb, fe;
|
typename boost::graph_traits<Graph>::face_iterator fb, fe;
|
||||||
|
|
@ -226,25 +226,25 @@ struct Surface_fixture_2 {
|
||||||
bool found;
|
bool found;
|
||||||
boost::tie(h, found) = halfedge(x, v, m);
|
boost::tie(h, found) = halfedge(x, v, m);
|
||||||
assert(found);
|
assert(found);
|
||||||
assert(! is_border(h,m));
|
assert(! CGAL::is_border(h,m));
|
||||||
f1 = face(h, m);
|
f1 = face(h, m);
|
||||||
assert(f1 != boost::graph_traits<Graph>::null_face());
|
assert(f1 != boost::graph_traits<Graph>::null_face());
|
||||||
|
|
||||||
boost::tie(h, found) = halfedge(v, u, m);
|
boost::tie(h, found) = halfedge(v, u, m);
|
||||||
assert(found);
|
assert(found);
|
||||||
assert(!is_border(h,m));
|
assert(!CGAL::is_border(h,m));
|
||||||
f2 = face(h, m);
|
f2 = face(h, m);
|
||||||
assert(f2 != boost::graph_traits<Graph>::null_face());
|
assert(f2 != boost::graph_traits<Graph>::null_face());
|
||||||
|
|
||||||
boost::tie(h, found) = halfedge(u, w, m);
|
boost::tie(h, found) = halfedge(u, w, m);
|
||||||
assert(found);
|
assert(found);
|
||||||
assert(!is_border(h,m));
|
assert(!CGAL::is_border(h,m));
|
||||||
f3 = face(h, m);
|
f3 = face(h, m);
|
||||||
assert(f3 != boost::graph_traits<Graph>::null_face());
|
assert(f3 != boost::graph_traits<Graph>::null_face());
|
||||||
|
|
||||||
boost::tie(h, found) = halfedge(w, x, m);
|
boost::tie(h, found) = halfedge(w, x, m);
|
||||||
assert(found);
|
assert(found);
|
||||||
assert(!is_border(h,m));
|
assert(!CGAL::is_border(h,m));
|
||||||
f4 = face(h, m);
|
f4 = face(h, m);
|
||||||
assert(f4 != boost::graph_traits<Graph>::null_face());
|
assert(f4 != boost::graph_traits<Graph>::null_face());
|
||||||
}
|
}
|
||||||
|
|
@ -287,8 +287,8 @@ struct Surface_fixture_3 {
|
||||||
assert(y != boost::graph_traits<Graph>::null_vertex());
|
assert(y != boost::graph_traits<Graph>::null_vertex());
|
||||||
assert(z != boost::graph_traits<Graph>::null_vertex());
|
assert(z != boost::graph_traits<Graph>::null_vertex());
|
||||||
|
|
||||||
f1 = is_border(halfedge(u, m),m) ? face(opposite(halfedge(u, m), m), m) : face(halfedge(u, m), m);
|
f1 = CGAL::is_border(halfedge(u, m),m) ? face(opposite(halfedge(u, m), m), m) : face(halfedge(u, m), m);
|
||||||
f2 = is_border(halfedge(u, m),m) ? face(opposite(halfedge(z, m), m), m) : face(halfedge(z, m), m);
|
f2 = CGAL::is_border(halfedge(u, m),m) ? face(opposite(halfedge(z, m), m), m) : face(halfedge(z, m), m);
|
||||||
|
|
||||||
assert(f1 != boost::graph_traits<Graph>::null_face());
|
assert(f1 != boost::graph_traits<Graph>::null_face());
|
||||||
assert(f2 != boost::graph_traits<Graph>::null_face());
|
assert(f2 != boost::graph_traits<Graph>::null_face());
|
||||||
|
|
@ -314,7 +314,7 @@ struct Surface_fixture_4 {
|
||||||
int found = 0;
|
int found = 0;
|
||||||
typename boost::graph_traits<Graph>::halfedge_iterator hb, he;
|
typename boost::graph_traits<Graph>::halfedge_iterator hb, he;
|
||||||
for(boost::tie(hb, he) = halfedges(m); hb != he; ++hb) {
|
for(boost::tie(hb, he) = halfedges(m); hb != he; ++hb) {
|
||||||
if(is_border(*hb,m)){
|
if(CGAL::is_border(*hb,m)){
|
||||||
if(get(pm, target(*hb,m)) == Point_3(0,0,0)){
|
if(get(pm, target(*hb,m)) == Point_3(0,0,0)){
|
||||||
if(found == 0){
|
if(found == 0){
|
||||||
h1 = *hb;
|
h1 = *hb;
|
||||||
|
|
@ -349,7 +349,7 @@ struct Surface_fixture_5 {
|
||||||
int found = 0;
|
int found = 0;
|
||||||
typename boost::graph_traits<Graph>::halfedge_iterator hb, he;
|
typename boost::graph_traits<Graph>::halfedge_iterator hb, he;
|
||||||
for(boost::tie(hb, he) = halfedges(m); hb != he; ++hb) {
|
for(boost::tie(hb, he) = halfedges(m); hb != he; ++hb) {
|
||||||
if(is_border(*hb,m)){
|
if(CGAL::is_border(*hb,m)){
|
||||||
if(get(pm, target(*hb,m)) == Point_3(2,1,0)){
|
if(get(pm, target(*hb,m)) == Point_3(2,1,0)){
|
||||||
h1 = *hb;
|
h1 = *hb;
|
||||||
found++;
|
found++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue