#include <CGAL/Combinatorial_map.h>
#include <iostream>
#include <cstdlib>
#include <cassert>
typedef CMap_3::Dart_descriptor Dart_descriptor;
int main()
{
CMap_3 cm;
Dart_descriptor d1 = cm.make_combinatorial_hexahedron();
assert( cm.is_insertable_cell_1_in_cell_2
(cm.beta(d1,1),cm.beta(d1,0)) );
cm.insert_cell_1_in_cell_2(cm.beta(d1,1), cm.beta(d1,0));
assert( cm.is_valid() );
Dart_descriptor d2=cm.beta(d1,2,1,1,2);
assert( cm.is_insertable_cell_1_in_cell_2
(d2,cm.beta(d2,1,1)) );
cm.insert_cell_1_in_cell_2(d2, cm.beta(d2,1,1));
assert( cm.is_valid() );
std::vector<Dart_descriptor> path;
path.push_back(cm.beta(d1,1));
path.push_back(cm.beta(d1,0,2,1));
path.push_back(cm.beta(d2,0));
path.push_back(cm.beta(d2,2,1));
assert( (cm.is_insertable_cell_2_in_cell_3
(path.begin(),path.end())) );
Dart_descriptor d3=cm.insert_cell_2_in_cell_3(path.begin(),path.end());
assert( cm.is_valid() );
cm.display_characteristics(std::cout) << ", valid=" <<
cm.is_valid() << std::endl;
assert( (cm.is_removable<2>(d3)) );
cm.remove_cell<2>(d3);
assert( cm.is_valid() );
assert( (cm.is_removable<1>(cm.beta(d1,1))) );
cm.remove_cell<1>(cm.beta(d1,1));
assert( cm.is_valid() );
assert( (cm.is_removable<1>(cm.beta(d2,0))) );
cm.remove_cell<1>(cm.beta(d2,0));
assert( cm.is_valid() );
cm.display_characteristics(std::cout) << ", valid="
<< cm.is_valid() << std::endl;
return EXIT_SUCCESS;
}
The class Combinatorial_map represents a dD combinatorial map.
Definition: Combinatorial_map.h:39