
#include <CGAL/Linear_cell_complex_for_combinatorial_map.h>#include <CGAL/draw_linear_cell_complex.h>typedef CGAL::Linear_cell_complex_for_combinatorial_map<3> LCC;typedef LCC::Dart_handle Dart_handle;typedef LCC::Point Point;int main(){ //创建一个线性单元复合体(即CGAL中的体模型) LCC lcc; //创建两个六面体,返回Dart句柄(即仿指针) 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)); //8个点 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)); //问题:beta是做什么的? //体模型是否有效 lcc.display_characteristics(std::cout) << ", valid=" << lcc.is_valid() << std::endl; //绘制 CGAL::draw(lcc); return EXIT_SUCCESS;}