#include <CGAL/Combinatorial_map.h>
#include <CGAL/Combinatorial_map_constructors.h>
#include <CGAL/Combinatorial_map_operations.h>
#include <iostream>
#include <cstdlib>
typedef CMap_3::Dart_handle Dart_handle;
int main()
{
CMap_3 cm;
int mark = cm.get_new_mark();
if ( mark==-1 )
{
std::cerr<<"No more free mark, exit."<<std::endl;
exit(-1);
}
cm.sew<3>(dh1, dh2);
for (CMap_3::Dart_of_cell_range<3>::iterator
it(cm.darts_of_cell<3>(dh1).begin()),
itend(cm.darts_of_cell<3>(dh1).end()); it!=itend; ++it)
cm.mark(it, mark);
CGAL::remove_cell<CMap_3, 2>(cm, dh1);
unsigned int res=0;
for (CMap_3::Dart_range::iterator it(cm.darts().begin()),
itend(cm.darts().end()); it!=itend; ++it)
{
if ( cm.is_marked(it, mark) )
++res;
}
std::cout<<"Number of darts from the first tetrahedron: "<<res<<std::endl;
cm.free_mark(mark);
return EXIT_SUCCESS;
}