\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.13.2 - Linear Cell Complex
Linear_cell_complex/draw_linear_cell_complex.cpp
#include <CGAL/Linear_cell_complex_for_combinatorial_map.h>
#include <CGAL/draw_linear_cell_complex.h>
typedef LCC::Dart_handle Dart_handle;
typedef LCC::Point Point;
int main()
{
LCC lcc;
Dart_handle dh1=
lcc.make_hexahedron(Point(0,0,0), Point(5,0,0),
Point(5,5,0), Point(0,5,0),
Point(0,5,4), Point(0,0,4),
Point(5,0,4), Point(5,5,4));
Dart_handle dh2=
lcc.make_hexahedron(Point(5,0,0), Point(10,0,0),
Point(10,5,0), Point(5,5,0),
Point(5,5,4), Point(5,0,4),
Point(10,0,4), Point(10,5,4));
lcc.sew<3>(lcc.beta(dh1, 1, 1, 2), lcc.beta(dh2, 2));
lcc.display_characteristics(std::cout)<<", valid="
<<lcc.is_valid()<<std::endl;
CGAL::draw(lcc);
return EXIT_SUCCESS;
}