Modification of tests following the removal of global functions (nyf)

This commit is contained in:
Guillaume Damiand 2016-03-09 08:48:32 +01:00
parent f348cc634a
commit 68ed581ee3
3 changed files with 206 additions and 247 deletions

View File

@ -77,7 +77,7 @@ bool test2D()
make_edge ( map );
dh = make_combinatorial_tetrahedron ( map );
dh = map.make_combinatorial_tetrahedron();
cout << "Nombre de brins : " << map.number_of_darts() << endl;
cout << "Parcours de CC : ";
@ -103,9 +103,9 @@ bool test2D()
make_edge ( map );
d1 = make_combinatorial_polygon ( map,3 );
d1 = map.make_combinatorial_polygon(3);
d2 = make_combinatorial_polygon ( map,3 );
d2 = map.make_combinatorial_polygon(3);
cout << "Parcours all : "; drawAllPoints(map);
@ -120,13 +120,13 @@ bool test2D()
cout << "***************************** TEST TRIANGULATION_2 2D:" << endl;
d1 = make_combinatorial_tetrahedron ( map );
d1 = map.make_combinatorial_tetrahedron();
cout << "Parcours all before insert_cell_0_in_cell_2: ";
drawAllPoints(map);
// Triangulate the facet between the two triangles
CGAL::insert_cell_0_in_cell_2( map, d1 );
map.insert_cell_0_in_cell_2( d1 );
cout << "Parcours all after insert_cell_0_in_cell_2: ";
drawAllPoints(map);
@ -142,9 +142,9 @@ bool test2D()
for ( int i = 0; i < 1000; ++i )
{
d1 = make_combinatorial_polygon ( map,3 );
d2 = make_combinatorial_polygon ( map,3 );
d3 = make_combinatorial_polygon ( map,3 );
d1 = map.make_combinatorial_polygon (3);
d2 = map.make_combinatorial_polygon (3);
d3 = map.make_combinatorial_polygon (3);
// Sew the 2 tetrahedra along one facet
map.template sew<2> ( d1, d2 );
map.template sew<2> ( map.beta(d2, 1), d3 );
@ -231,8 +231,8 @@ bool test2D()
cout << "***************************** TEST INCIDENCE ITERATORS 2D:"
<< endl;
d1 = make_combinatorial_polygon ( map,4 );
d2 = make_combinatorial_polygon ( map,4 );
d1 = map.make_combinatorial_polygon(4);
d2 = map.make_combinatorial_polygon(4);
map.template sew<2> ( d1, d2 );
cout << "Map valid : " << map.is_valid() << endl;
@ -263,24 +263,24 @@ bool test2D()
d1 = map.create_dart ();
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex1: " << flush;
CGAL::remove_cell<Map,0> ( map, d1 );
map.remove_cell<0> ( d1 );
map.display_characteristics (cout)<<", valid=" << map.is_valid() << endl;
d1 = map.create_dart ();
map.template sew<1> ( d1, d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex2: " << flush;
CGAL::remove_cell<Map,0> ( map, d1 );
map.remove_cell<0> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
d1 = make_edge ( map );
d2 = map.beta(d1, 2);
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex3: " << flush;
CGAL::remove_cell<Map,0> ( map, d1 );
map.remove_cell<0> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex4: " << flush;
CGAL::remove_cell<Map,0> ( map, d2 );
map.remove_cell<0> ( d2 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
d1 = make_edge ( map );
@ -288,34 +288,34 @@ bool test2D()
map.template sew<1>( map.beta(d1, 2), map.beta (d1, 2) );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex5: " << flush;
CGAL::remove_cell<Map,0> ( map, d1 );
map.remove_cell<0> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon ( map,3 );
d1 = map.make_combinatorial_polygon(3);
d2 = map.beta(d1, 0);
d3 = map.beta(d1, 1);
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex6: " << flush;
CGAL::remove_cell<Map,0> ( map, d1 );
map.remove_cell<0> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex7: " << flush;
CGAL::remove_cell<Map,0> ( map, d2 );
map.remove_cell<0> ( d2 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex8: " << flush;
CGAL::remove_cell<Map,0> ( map, d3 );
amap.remove_cell<0> ( d3 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon ( map,3 );
d2 = make_combinatorial_polygon ( map,3 );
d1 = map.make_combinatorial_polygon(3);
d2 = map.make_combinatorial_polygon(3);
map.template sew<2> ( d1, d2 );
map.template sew<2> ( map.beta(d1, 0), map.beta(d2, 1) );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex9: " << flush;
CGAL::remove_cell<Map,0> ( map, d1 );
amap.remove_cell<0> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
map.clear();
@ -329,96 +329,96 @@ bool test2D()
d1 = map.create_dart ();
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge1: " << flush;
CGAL::remove_cell<Map,1> ( map, d1 );
amap.remove_cell<1> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
d1 = map.create_dart ();
map.template sew<1> ( d1, d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge2: " << flush;
CGAL::remove_cell<Map,1> ( map, d1 );
amap.remove_cell<1> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
d1 = make_edge ( map );
d1 = map.make_edge ( map );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge3: " << flush;
CGAL::remove_cell<Map,1> ( map, d1 );
amap.remove_cell<1> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
d1 = make_edge ( map );
d1 = map.make_edge ( map );
map.template sew<1> ( d1, d1 );
map.template sew<1> ( map.beta(d1, 2), map.beta (d1, 2) );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge4: " << flush;
CGAL::remove_cell<Map,1> ( map, d1 );
amap.remove_cell<1> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
d1 = make_edge ( map );
d1 = map.make_edge ( map );
map.template sew<1> ( d1, d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge5: " << flush;
CGAL::remove_cell<Map,1> ( map, d1 );
amap.remove_cell<1> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon ( map,3 );
d1 = map.make_combinatorial_polygon(3);
d2 = map.beta(d1, 0);
d3 = map.beta(d1, 1);
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge6: " << flush;
CGAL::remove_cell<Map,1> ( map, d1 );
amap.remove_cell<1> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge7: " << flush;
CGAL::remove_cell<Map,1> ( map, d2 );
amap.remove_cell<1> ( d2 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge8: " << flush;
CGAL::remove_cell<Map,1> ( map, d3 );
amap.remove_cell<1> ( d3 );
map.display_characteristics ( cout)<<", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon ( map,3 );
d2 = make_combinatorial_polygon ( map,3 );
d1 = map.make_combinatorial_polygon(3);
d2 = map.make_combinatorial_polygon(3);
map.template sew<2> ( d1, d2 );
d2 = map.beta(d1, 0);
d3 = map.beta(d1, 1);
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge9: " << flush;
CGAL::remove_cell<Map,1> ( map, d1 );
amap.remove_cell<1> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge10: " << flush;
CGAL::remove_cell<Map,1> ( map, d2 );
amap.remove_cell<1> ( d2 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge11: " << flush;
CGAL::remove_cell<Map,1> ( map, d3 );
amap.remove_cell<1> ( d3 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon ( map,3 );
d2 = make_combinatorial_polygon ( map,3 );
d1 = map.make_combinatorial_polygon(3);
d2 = map.make_combinatorial_polygon(3);
map.template sew<2> ( d1, d2 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge12: " << flush;
CGAL::remove_cell<Map,1> ( map, d1 );
amap.remove_cell<1> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon ( map,3 );
d2 = make_combinatorial_polygon ( map,3 );
d1 = map.make_combinatorial_polygon(3);
d2 = map.make_combinatorial_polygon(3);
map.template sew<2> ( d1, d2 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge13: " << flush;
CGAL::remove_cell<Map,1> ( map, map.beta (d1, 1) );
amap.remove_cell<1> ( map.beta (d1, 1) );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "remove edge14: " << flush;
CGAL::remove_cell<Map,1> ( map, d1 );
amap.remove_cell<1> ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_hexahedron ( map );
d1 = map.make_combinatorial_hexahedron();
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
CGAL::insert_cell_0_in_cell_2 ( map, d1 );
map.insert_cell_0_in_cell_2 ( d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
std::vector<Dart_handle> V;
@ -434,7 +434,7 @@ bool test2D()
for ( vector_iterator it = V.begin(); it != V.end(); ++it )
{
cout << "remove edge15: " << flush;
CGAL::remove_cell<Map,1> ( map, *it );
amap.remove_cell<1> ( *it );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
}
}
@ -447,51 +447,24 @@ bool test2D()
cout << "***************************** TEST INSERT EDGE 2D:"
<< endl;
/* d1 = map.create_dart ( Point ( 0, 0, 0 ) );
d2 = map.create_dart ( Point ( 1, 0, 0 ) );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "insert edge1: " << flush;
CGAL::insertedge ( map, d1, d2 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
map.clear();*/
/* d1 = make_edge ( map, Point ( 0, 0, 0 ), Point ( 0, 0, 1 ) );
map.template sew<1> ( d1, d1 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "insert edge2: " << flush;
CGAL::insertedge ( map, d1, d1->beta ( 2 ) );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
map.clear();*/
d1 = make_combinatorial_polygon ( map,4 );
d1 = map.make_combinatorial_polygon(4);
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "insert edge3: " << flush;
CGAL::insert_cell_1_in_cell_2 ( map, d1, map.beta(d1,1,1) );
map.insert_cell_1_in_cell_2 ( d1, map.beta(d1,1,1) );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_combinatorial_polygon ( map,4 );
d2 = make_combinatorial_polygon ( map,4 );
d1 = map.make_combinatorial_polygon(4);
d2 = map.make_combinatorial_polygon(4);
map.template sew<2> ( d1, d2 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid()
<< endl;
cout << "insert edge4: "
<< flush;
CGAL::insert_cell_1_in_cell_2 ( map, d1, map.beta(d1,1,1) );
map.insert_cell_1_in_cell_2 ( d1, map.beta(d1,1,1) );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
map.clear();
/* d1 = make_quadrilateral ( map, Point ( 0, 0, 0 ), Point ( 0, 0, 1 ),
Point ( 1, 0, 1 ), Point ( 1, 0, 0 ) );
d2 = make_quadrilateral ( map, Point ( 0, 0, 0 ), Point ( 0, 0, 1 ),
Point ( 1, 0, 1 ), Point ( 1, 0, 0 ) );
map.template sew<2> ( d1, d2 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
cout << "insert edge5: " << flush;
CGAL::insert_cell_1_in_cell_2 ( map, d1, d2 );
map.display_characteristics ( cout ) << ", valid=" << map.is_valid() << endl;
map.clear();*/
cout << "***************************** TEST INSERT EDGE 2D DONE."
<< endl;

View File

@ -327,7 +327,7 @@ struct InsertVertex
std::cout<<"Before: ";
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
std::cout<<"After insert_vertex "<<nb++<<" : "<<std::flush;
CGAL::insert_cell_0_in_cell_1(map,d);
map.insert_cell_0_in_cell_1(d);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
}
private:
@ -369,9 +369,9 @@ bool test3D()
cout << "Parcours all : "; ;
cout << endl << endl;
make_edge(map );
map.make_edge(map );
dh = make_combinatorial_tetrahedron(map);
dh = map.make_combinatorial_tetrahedron();
cout << "Nombre de brins : " << map.number_of_darts() << endl;
cout << "Parcours de CC : ";
@ -392,11 +392,11 @@ bool test3D()
cout << "***************************** TEST SEW 3D:" << endl;
make_edge(map);
map.make_edge();
d1 = make_combinatorial_tetrahedron(map);
d1 = map.make_combinatorial_tetrahedron();
d2 = make_combinatorial_tetrahedron(map);
d2 = map.make_combinatorial_tetrahedron();
cout << "Parcours all : "; ;
@ -411,11 +411,11 @@ bool test3D()
cout << "***************************** TEST TRIANGULATION_2 3D:" << endl;
d1 = make_combinatorial_tetrahedron(map);
d1 = map.make_combinatorial_tetrahedron();
cout << "Before insert_cell_0_in_cell_2: "; ;
CGAL::insert_cell_0_in_cell_2(map,d1);
map.insert_cell_0_in_cell_2(d1);
cout << "After insert_cell_0_in_cell_2: "; ;
@ -429,9 +429,9 @@ bool test3D()
cout << "***************************** TEST TRIANGULATION_3 3D:" << endl;
// Create 2 tetrahedra
d1 = make_combinatorial_tetrahedron(map);
d1 = map.make_combinatorial_tetrahedron();
d2 = make_combinatorial_tetrahedron(map);
d2 = map.make_combinatorial_tetrahedron();
// Sew the 2 tetrahedra along one facet
map.template sew<3>(d1, d2);
@ -441,7 +441,7 @@ bool test3D()
cout << "Before insert_cell_0_in_cell_2: "; ;
// Triangulate the facet between the two tetrahedra
CGAL::insert_cell_0_in_cell_2(map,d1);
map.insert_cell_0_in_cell_2(d1);
cout << "map valid: " << map.is_valid() << endl;
cout << "After insert_cell_0_in_cell_2: "; ;
@ -462,9 +462,9 @@ bool test3D()
for (int i = 0; i < 1000; ++i)
{
d1 = make_combinatorial_tetrahedron(map);
d2 = make_combinatorial_tetrahedron(map);
d3 = make_combinatorial_tetrahedron(map);
d1 = map.make_combinatorial_tetrahedron();
d2 = map.make_combinatorial_tetrahedron();
d3 = map.make_combinatorial_tetrahedron();
// Sew the 2 tetrahedra along one facet
map.template sew<3>(d1, d2);
map.template sew<3>(map.beta(d2,2), d3);
@ -605,8 +605,8 @@ bool test3D()
cout << "***************************** TEST INCIDENCE ITERATORS 3D:"
<< endl;
d1 = make_combinatorial_hexahedron(map);
d2 = make_combinatorial_hexahedron(map);
d1 = map.make_combinatorial_hexahedron();
d2 = map.make_combinatorial_hexahedron();
map.template sew<3>(d1, d2);
cout << "Map valid : " << map.is_valid() << endl;
@ -623,54 +623,54 @@ bool test3D()
d1 = map.create_dart();
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex1: " << flush; CGAL::remove_cell<Map,0>(map,d1);
cout << "remove vertex1: " << flush; map.remove_cell<0>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = map.create_dart(); map.template sew<1>(d1, d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex2: " << flush; CGAL::remove_cell<Map,0>(map,d1);
cout << "remove vertex2: " << flush; map.remove_cell<0>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_edge(map);
d1 = map.make_edge();
d2 = map.beta(d1,2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex3: " << flush; CGAL::remove_cell<Map,0>(map,d1);
cout << "remove vertex3: " << flush; map.remove_cell<0>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex4: " << flush; CGAL::remove_cell<Map,0>(map,d2);
cout << "remove vertex4: " << flush; map.remove_cell<0>(d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_edge(map);
d1 = map.make_edge();
map.template sew<1>(d1, d1);
map.template sew<1>(map.beta(d1,2), map.beta(d1,2));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex5: " << flush; CGAL::remove_cell<Map,0>(map,d1);
cout << "remove vertex5: " << flush; map.remove_cell<0>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon(map,3);
d1 = map.make_combinatorial_polygon(3);
d2 = map.beta(d1,0); d3 = map.beta(d1,1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex6: " << flush; CGAL::remove_cell<Map,0>(map,d1);
cout << "remove vertex6: " << flush; map.remove_cell<0>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex7: " << flush; CGAL::remove_cell<Map,0>(map,d2);
cout << "remove vertex7: " << flush; map.remove_cell<0>(d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex8: " << flush; CGAL::remove_cell<Map,0>(map,d3);
cout << "remove vertex8: " << flush; map.remove_cell<0>(d3);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon(map,3);
d2 = make_combinatorial_polygon(map,3);
d1 = map.make_combinatorial_polygon(3);
d2 = map.make_combinatorial_polygon(3);
map.template sew<3>(d1, d2); d2 = map.beta(d1,0); d3 = map.beta(d1,1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex9: " << flush; CGAL::remove_cell<Map,0>(map,d1);
cout << "remove vertex9: " << flush; map.remove_cell<0>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex10: " << flush; CGAL::remove_cell<Map,0>(map,d2);
cout << "remove vertex10: " << flush; map.remove_cell<0>(d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove vertex11: " << flush; CGAL::remove_cell<Map,0>(map,d3);
cout << "remove vertex11: " << flush; map.remove_cell<0>(d3);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
@ -682,82 +682,82 @@ bool test3D()
d1 = map.create_dart();
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge1: " << flush; CGAL::remove_cell<Map,1>(map,d1);
cout << "remove edge1: " << flush; map.remove_cell<1>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = map.create_dart(); map.template sew<1>(d1, d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge2: " << flush; CGAL::remove_cell<Map,1>(map,d1);
cout << "remove edge2: " << flush; map.remove_cell<1>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_edge(map);
d1 = map.make_edge();
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge3: " << flush; CGAL::remove_cell<Map,1>(map,d1);
cout << "remove edge3: " << flush; map.remove_cell<1>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_edge(map);
d1 = map.make_edge();
map.template sew<1>(d1, d1);
map.template sew<1>(map.beta(d1,2), map.beta(d1,2));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge4: " << flush; CGAL::remove_cell<Map,1>(map,d1);
cout << "remove edge4: " << flush; map.remove_cell<1>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_edge(map);
d1 = map.make_edge();
map.template sew<1>(d1, d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge5: " << flush; CGAL::remove_cell<Map,1>(map,d1);
cout << "remove edge5: " << flush; map.remove_cell<1>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon(map,3);
d1 = map.make_combinatorial_polygon(3);
d2 = map.beta(d1,0); d3 = map.beta(d1,1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge6: " << flush; CGAL::remove_cell<Map,1>(map,d1);
cout << "remove edge6: " << flush; map.remove_cell<1>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge7: " << flush; CGAL::remove_cell<Map,1>(map,d2);
cout << "remove edge7: " << flush; map.remove_cell<1>(d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge8: " << flush; CGAL::remove_cell<Map,1>(map,d3);
cout << "remove edge8: " << flush; map.remove_cell<1>(d3);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon(map,3);
d2 = make_combinatorial_polygon(map,3);
d1 = map.make_combinatorial_polygon(3);
d2 = map.make_combinatorial_polygon(3);
map.template sew<3>(d1, d2); d2 = map.beta(d1,0); d3 = map.beta(d1,1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge9: " << flush; CGAL::remove_cell<Map,1>(map,d1);
cout << "remove edge9: " << flush; map.remove_cell<1>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge10: " << flush; CGAL::remove_cell<Map,1>(map,d2);
cout << "remove edge10: " << flush; map.remove_cell<1>(d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge11: " << flush; CGAL::remove_cell<Map,1>(map,d3);
cout << "remove edge11: " << flush; map.remove_cell<1>(d3);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon(map,3);
d2 = make_combinatorial_polygon(map,3);
d1 = map.make_combinatorial_polygon(3);
d2 = map.make_combinatorial_polygon(3);
map.template sew<2>(d1, d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge12: " << flush; CGAL::remove_cell<Map,1>(map,d1);
cout << "remove edge12: " << flush; map.remove_cell<1>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon(map,3);
d2 = make_combinatorial_polygon(map,3);
d1 = map.make_combinatorial_polygon(3);
d2 = map.make_combinatorial_polygon(3);
map.template sew<2>(d1, d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge13: " << flush;
CGAL::remove_cell<Map,1>(map,map.beta(d1,1));
map.remove_cell<1>(map.beta(d1,1));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove edge14: " << flush; CGAL::remove_cell<Map,1>(map,d1);
cout << "remove edge14: " << flush; map.remove_cell<1>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_hexahedron(map);
d2 = make_combinatorial_hexahedron(map);
d1 = map.make_combinatorial_hexahedron();
d2 = map.make_combinatorial_hexahedron();
map.template sew<3>(d1, d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d3 = CGAL::insert_cell_0_in_cell_2(map,d1);
d3 = map.insert_cell_0_in_cell_2(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
{
@ -772,7 +772,7 @@ bool test3D()
typedef typename std::vector<Dart_handle>::iterator vector_it;
for ( vector_it it=V.begin(); it!=V.end(); ++it)
{
cout << "remove edge15: " << flush; CGAL::remove_cell<Map,1>(map,*it);
cout << "remove edge15: " << flush; map.remove_cell<1>(*it);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
}
}
@ -786,71 +786,71 @@ bool test3D()
d1 = map.create_dart(); map.template sew<1>(d1, d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove facet1: " << flush; CGAL::remove_cell<Map,2>(map,d1);
cout << "remove facet1: " << flush; map.remove_cell<2>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon(map,3);
d1 = map.make_combinatorial_polygon(3);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove facet2: " << flush; CGAL::remove_cell<Map,2>(map,d1);
cout << "remove facet2: " << flush; map.remove_cell<2>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_polygon(map,3);
d2 = make_combinatorial_polygon(map,3);
d1 = map.make_combinatorial_polygon(3);
d2 = map.make_combinatorial_polygon(3);
map.template sew<3>(d1, d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove facet3: " << flush; CGAL::remove_cell<Map,2>(map,d1);
cout << "remove facet3: " << flush; map.remove_cell<2>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_hexahedron(map);
d1 = map.make_combinatorial_hexahedron();
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove facet4: " << flush;
CGAL::remove_cell<Map,2>(map,map.beta(d1,2,1,1,2));
map.remove_cell<2>(map.beta(d1,2,1,1,2));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove facet5: " << flush;
CGAL::remove_cell<Map,2>(map,map.beta(d1,1,1,2));
map.remove_cell<2>(map.beta(d1,1,1,2));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove facet6: " << flush;
CGAL::remove_cell<Map,2>(map,map.beta(d1,2));
map.remove_cell<2>(map.beta(d1,2));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove facet7: " << flush;
CGAL::remove_cell<Map,2>(map,map.beta(d1,1,2));
map.remove_cell<2>(map.beta(d1,1,2));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove facet8: " << flush;
CGAL::remove_cell<Map,2>(map,map.beta(d1,0,2));
map.remove_cell<2>(map.beta(d1,0,2));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove facet9: " << flush; CGAL::remove_cell<Map,2>(map,d1);
cout << "remove facet9: " << flush; map.remove_cell<2>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = make_combinatorial_hexahedron(map);
d2 = make_combinatorial_hexahedron(map);
d1 = map.make_combinatorial_hexahedron();
d2 = map.make_combinatorial_hexahedron();
map.template sew<3>(d1, d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d3 = map.beta(d1,1,2);
cout << "remove facet10: " << flush;
CGAL::remove_cell<Map,2>(map,map.beta(d1,2));
map.remove_cell<2>(map.beta(d1,2));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove facet11: " << flush; CGAL::remove_cell<Map,2>(map,d1);
cout << "remove facet11: " << flush; map.remove_cell<2>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d1 = map.beta(d3,0,2);
cout << "remove edge12: " << flush; CGAL::remove_cell<Map,1>(map,d3);
cout << "remove edge12: " << flush; map.remove_cell<1>(d3);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_combinatorial_hexahedron(map);
d2 = make_combinatorial_hexahedron(map);
d1 = map.make_combinatorial_hexahedron();
d2 = map.make_combinatorial_hexahedron();
map.template sew<3>(d1, d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
d3 = CGAL::insert_cell_0_in_cell_2(map,d1);
d3 = map.insert_cell_0_in_cell_2(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
{
@ -864,7 +864,7 @@ bool test3D()
for (typename std::vector<Dart_handle>::iterator it=V.begin(); it!=V.end(); ++it)
{
cout << "remove facet13: " << flush; CGAL::remove_cell<Map,2>(map,*it);
cout << "remove facet13: " << flush; map.remove_cell<2>(*it);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
}
}
@ -889,94 +889,94 @@ bool test3D()
std::cout<<"************************* Test different cases *************************"<<std::endl;
d1 = map.create_dart();
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex1: " << flush; CGAL::insert_cell_0_in_cell_1(map,d1);
cout << "insert vertex1: " << flush; map.insert_cell_0_in_cell_1(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = map.create_dart(); map.template sew<1>(d1, d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex2: " << flush; CGAL::insert_cell_0_in_cell_1(map,d1);
cout << "insert vertex2: " << flush; map.insert_cell_0_in_cell_1(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_edge(map);
d1 = map.make_edge();
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex3: " << flush; CGAL::insert_cell_0_in_cell_1(map,d1);
cout << "insert vertex3: " << flush; map.insert_cell_0_in_cell_1(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_edge(map);
d1 = map.make_edge();
map.template sew<1>(d1, d1);
map.template sew<1>(map.beta(d1,2), map.beta(d1,2));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex4: " << flush; CGAL::insert_cell_0_in_cell_1(map,d1);
cout << "insert vertex4: " << flush; map.insert_cell_0_in_cell_1(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_edge(map);
d1 = map.make_edge();
map.template sew<1>(d1, d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex5: " << flush; CGAL::insert_cell_0_in_cell_1(map,d1);
cout << "insert vertex5: " << flush; map.insert_cell_0_in_cell_1(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_combinatorial_polygon(map,3);
d1 = map.make_combinatorial_polygon(3);
d2 = map.beta(d1,0); d3 = map.beta(d1,1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex6: " << flush; CGAL::insert_cell_0_in_cell_1(map,d1);
cout << "insert vertex6: " << flush; map.insert_cell_0_in_cell_1(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex7: " << flush; CGAL::insert_cell_0_in_cell_1(map,d2);
cout << "insert vertex7: " << flush; map.insert_cell_0_in_cell_1(d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex8: " << flush; CGAL::insert_cell_0_in_cell_1(map,d3);
cout << "insert vertex8: " << flush; map.insert_cell_0_in_cell_1(d3);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_combinatorial_polygon(map,3);
d2 = make_combinatorial_polygon(map,3);
d1 = map.make_combinatorial_polygon(3);
d2 = map.make_combinatorial_polygon(3);
map.template sew<3>(d1, d2); d2 = map.beta(d1,0); d3 = map.beta(d1,1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex9: " << flush; CGAL::insert_cell_0_in_cell_1(map,d1);
cout << "insert vertex9: " << flush; map.insert_cell_0_in_cell_1(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex10: " << flush; CGAL::insert_cell_0_in_cell_1(map,d2);
cout << "insert vertex10: " << flush; map.insert_cell_0_in_cell_1(d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex11: " << flush; CGAL::insert_cell_0_in_cell_1(map,d3);
cout << "insert vertex11: " << flush; map.insert_cell_0_in_cell_1(d3);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_combinatorial_polygon(map,3);
d2 = make_combinatorial_polygon(map,3);
d1 = map.make_combinatorial_polygon(3);
d2 = map.make_combinatorial_polygon(3);
map.template sew<2>(d1, d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex12: " << flush; CGAL::insert_cell_0_in_cell_1(map,d1);
cout << "insert vertex12: " << flush; map.insert_cell_0_in_cell_1(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_combinatorial_polygon(map,3);
d2 = make_combinatorial_polygon(map,3);
d1 = map.make_combinatorial_polygon(3);
d2 = map.make_combinatorial_polygon(3);
map.template sew<2>(d1, d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex13: " << flush;
CGAL::insert_cell_0_in_cell_1(map,map.beta(d1,1));
map.insert_cell_0_in_cell_1(map.beta(d1,1));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex14: " << flush; CGAL::insert_cell_0_in_cell_1(map,d1);
cout << "insert vertex14: " << flush; map.insert_cell_0_in_cell_1(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_combinatorial_hexahedron(map);
d2 = make_combinatorial_hexahedron(map);
d1 = map.make_combinatorial_hexahedron();
d2 = map.make_combinatorial_hexahedron();
map.template sew<3>(d1, d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex15: " << flush;
CGAL::insert_cell_0_in_cell_1(map,map.beta(d1,1,1));
map.insert_cell_0_in_cell_1(map.beta(d1,1,1));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex16: " << flush;
CGAL::insert_cell_0_in_cell_1(map,map.beta(d1,1));
map.insert_cell_0_in_cell_1(map.beta(d1,1));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex17: " << flush;
CGAL::insert_cell_0_in_cell_1(map,map.beta(d1,0));
map.insert_cell_0_in_cell_1(map.beta(d1,0));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert vertex18: " << flush; CGAL::insert_cell_0_in_cell_1(map,d1);
cout << "insert vertex18: " << flush; map.insert_cell_0_in_cell_1(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
@ -989,49 +989,49 @@ bool test3D()
/* d1 = map.create_dart();
d2 = map.create_dart();
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert edge1: " << flush; CGAL::insert_cell_1_in_cell_2(map,d1, d2);
cout << "insert edge1: " << flush; map.insert_cell_1_in_cell_2(d1, d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();*/
/* d1 = make_edge(map,, );
/* d1 = map.make_edge(, );
map.template sew<1>(d1, d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert edge2: " << flush; CGAL::insert_cell_1_in_cell_2(map,d1, d1->beta(2));
cout << "insert edge2: " << flush; map.insert_cell_1_in_cell_2(d1, d1->beta(2));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();*/
d1 = make_edge(map);
d2 = make_edge(map);
d1 = map.make_edge();
d2 = map.make_edge();
map.template sew<3>(d1, d2);
map.template sew<3>(map.beta(d1,2), map.beta(d2,2));
map.template sew<1>(d1, d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
/* cout << "insert edge3: " << flush; CGAL::insert_cell_1_in_cell_2(map,d1, d1);
/* cout << "insert edge3: " << flush; map.insert_cell_1_in_cell_2(d1, d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;*/
map.clear();
d1 = make_combinatorial_polygon(map,4 );
d1 = map.make_combinatorial_polygon(4 );
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert edge4: " << flush;
CGAL::insert_cell_1_in_cell_2(map,d1, map.beta(d1,1,1));
map.insert_cell_1_in_cell_2(d1, map.beta(d1,1,1));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_combinatorial_polygon(map,4);
d2 = make_combinatorial_polygon(map,4);
d1 = map.make_combinatorial_polygon(4);
d2 = map.make_combinatorial_polygon(4);
map.template sew<3>(d1, d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert edge5: " << flush;
CGAL::insert_cell_1_in_cell_2(map,d1, map.beta(d1,1,1));
map.insert_cell_1_in_cell_2(d1, map.beta(d1,1,1));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_combinatorial_polygon(map,4);
d2 = make_combinatorial_polygon(map,4);
d1 = map.make_combinatorial_polygon(4);
d2 = map.make_combinatorial_polygon(4);
map.template sew<2>(d1, d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert edge6: " << flush;
CGAL::insert_cell_1_in_cell_2(map,d1, map.beta(d1,1,1));
map.insert_cell_1_in_cell_2(d1, map.beta(d1,1,1));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
map.clear();
@ -1045,42 +1045,42 @@ bool test3D()
d1 = map.create_dart();
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert dangling edge1: " << flush;
CGAL::insert_dangling_cell_1_in_cell_2(map,d1);
map.insert_dangling_cell_1_in_cell_2(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_edge(map);
d1 = map.make_edge();
map.template sew<1>(d1, d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert dangling edge2: " << flush;
CGAL::insert_dangling_cell_1_in_cell_2(map,d1);
map.insert_dangling_cell_1_in_cell_2(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_edge(map);
d2 = make_edge(map);
d1 = map.make_edge();
d2 = map.make_edge();
map.template sew<3>(d1, d2);
map.template sew<3>(map.beta(d1,2), map.beta(d2,2));
map.template sew<1>(d1, d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert dangling edge3: " << flush;
CGAL::insert_dangling_cell_1_in_cell_2(map,d1);
map.insert_dangling_cell_1_in_cell_2(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_combinatorial_polygon(map,4);
d1 = map.make_combinatorial_polygon(4);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert dangling edge4: " << flush;
CGAL::insert_dangling_cell_1_in_cell_2(map,d1);
map.insert_dangling_cell_1_in_cell_2(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
d1 = make_combinatorial_polygon(map,4);
d2 = make_combinatorial_polygon(map,4);
d1 = map.make_combinatorial_polygon(4);
d2 = map.make_combinatorial_polygon(4);
map.template sew<3>(d1, d2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert dangling edge5: " << flush;
CGAL::insert_dangling_cell_1_in_cell_2(map,d1);
map.insert_dangling_cell_1_in_cell_2(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear();
@ -1092,50 +1092,50 @@ bool test3D()
std::vector<Dart_handle> v;
d1 = make_combinatorial_polygon(map,4);
d1 = map.make_combinatorial_polygon(4);
v.push_back(d1); v.push_back(map.beta(v[0],1));
v.push_back(map.beta(v[1],1)); v.push_back(map.beta(v[2],1));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert facet1: " << flush;
CGAL::insert_cell_2_in_cell_3(map,v.begin(),v.end());
map.insert_cell_2_in_cell_3(v.begin(),v.end());
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear(); v.clear();
d1 = make_combinatorial_polygon(map,3);
d2 = make_combinatorial_polygon(map,3);
d1 = map.make_combinatorial_polygon(3);
d2 = map.make_combinatorial_polygon(3);
map.template sew<2>(d1, d2);
v.push_back(d1); v.push_back(map.beta(v[0],1));
v.push_back(map.beta(v[1],1));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "insert facet2: " << flush;
CGAL::insert_cell_2_in_cell_3(map,v.begin(),v.end());
map.insert_cell_2_in_cell_3(v.begin(),v.end());
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear(); v.clear();
d1 = make_combinatorial_hexahedron(map);
d1 = map.make_combinatorial_hexahedron();
d2 = map.beta(d1,2);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove facet3: " << flush; CGAL::remove_cell<Map,2>(map,d1);
cout << "remove facet3: " << flush; map.remove_cell<2>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
v.push_back(d2); v.push_back(map.beta(v[0],1,2,1));
v.push_back(map.beta(v[1],1,2,1)); v.push_back(map.beta(v[2],1,2,1));
cout << "insert facet3: " << flush;
CGAL::insert_cell_2_in_cell_3(map,v.begin(),v.end());
map.insert_cell_2_in_cell_3(v.begin(),v.end());
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear(); v.clear();
d1 = make_combinatorial_hexahedron(map);
d2 = make_combinatorial_hexahedron(map);
d1 = map.make_combinatorial_hexahedron();
d2 = map.make_combinatorial_hexahedron();
map.template sew<3>(d1,d2);
d3 = map.beta(d1, 2);
d4 = map.beta(d1, 1,3,1,2);
assert(d4==map.beta(d1,1,3,1,2));
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
cout << "remove facet4: " << flush; CGAL::remove_cell<Map,2>(map,d1);
cout << "remove facet4: " << flush; map.remove_cell<2>(d1);
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
v.push_back(d3); v.push_back(map.beta(v[0],1,2,1));
v.push_back(map.beta(v[1],1,2,1)); v.push_back(map.beta(v[2],1,2,1));
cout << "insert facet4: " << flush; CGAL::insert_cell_2_in_cell_3(map,v.begin(),v.end());
cout << "insert facet4: " << flush; map.insert_cell_2_in_cell_3(v.begin(),v.end());
map.display_characteristics(cout) << ", valid=" << map.is_valid() << endl;
map.clear(); v.clear();

View File

@ -1,7 +1,5 @@
#include <CGAL/Combinatorial_map.h>
#include <CGAL/Cell_attribute.h>
#include <CGAL/Combinatorial_map_constructors.h>
#include <CGAL/Combinatorial_map_operations.h>
#include "Combinatorial_map_test_iterators.h"
#include <iostream>
@ -146,18 +144,6 @@ typedef CGAL::Combinatorial_map<4, Map_dart_items_4> Map8;
// int, int, int, int, double
typedef CGAL::Combinatorial_map<4, Map_dart_max_items_4> Map9;
/*
template<typename Map>
typename Map::Dart_handle getRandomDart(Map& map)
{
int nb = rand()%map.number_of_darts();
typename Map::Dart_range::iterator it=map.darts().begin();
for ( int i=0; i<nb; ++i, ++it )
{}
return it;
}
*/
template<typename Map, unsigned int i, typename Attr=typename Map::
template Attribute_type<i>::type>
struct CreateAttributes
@ -241,7 +227,7 @@ template<typename Map>
void create2Dmap(Map& map)
{
for ( int i=0; i<15; ++i )
CGAL::make_combinatorial_hexahedron(map);
map.make_combinatorial_hexahedron();
CreateAttributes<Map,0>::run(map);
CreateAttributes<Map,1>::run(map);
CreateAttributes<Map,2>::run(map);
@ -250,7 +236,7 @@ template<typename Map>
void create3Dmap(Map& map)
{
for ( int i=0; i<15; ++i )
CGAL::make_combinatorial_hexahedron(map);
map.make_combinatorial_hexahedron();
for ( int i=0; i<20; ++i )
{
@ -269,7 +255,7 @@ template<typename Map>
void create4Dmap(Map& map)
{
for ( int i=0; i<45; ++i )
CGAL::make_combinatorial_hexahedron(map);
map.make_combinatorial_hexahedron();
for ( int i=0; i<40; ++i )
{