13 #include <CGAL/Cartesian.h>
16 #include <CGAL/Linear_cell_complex_for_combinatorial_map.h>
18 #include <CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h>
21 #include <CGAL/Linear_cell_complex_incremental_builder.h>
34 typedef CGAL::Cartesian< double >
Kernel;
37 typedef CGAL::Linear_cell_complex_traits< 3, Kernel >
MyTraits;
41 template<
class Refs >
47 typedef CGAL::cpp11::tuple< Vertex_attribute, void, Face_attribute >
53 Linear_cell_complex_for_combinatorial_map< 2, 3, MyTraits, Myitem >
61 std::ifstream in(filename);
65 CGAL::read_off(in, lcc);
66 lcc.display_characteristics(std::cout);
68 catch(
const std::length_error &le)
70 std::cerr <<
"[LCC] Exception caught while reading input file " << filename
71 <<
": " << le.what() << std::endl;
72 BOOST_ASSERT_MSG(
false,
"[LCC] Exception caught while reading input file.");
75 auto pos_pm =
get(boost::vertex_point, lcc);
78 typedef boost::property_map< LCC, boost::face_index_t >::const_type
80 boost::vector_property_map< Vector, Face_index_map > normals(
81 get(boost::face_index, lcc));
100 typedef boost::vector_property_map<
102 typename boost::property_map< LCC, boost::vertex_index_t >::const_type >
105 BarycenterMap barycenters_pm(
get(boost::vertex_index, lcc));
107 lcc, pos_pm, barycenters_pm);
120 std::cout <<
"Done." << std::endl;
129 std::cout <<
"Usage: test-linear-cell-complex filename;"
130 " filename being an off file."