如何从cgal中的linear_cell_complex_for_combinatorial_map提取面部信息

How to extract face information from Linear_cell_complex_for_combinatorial_map in CGAL?

本文关键字:combinatorial for map 提取 信息 面部 complex cell cgal 中的 linear      更新时间:2023-10-16

我试图使用CGAL创建一个六面体网。到目前为止,我能够创建一个六角龙,但无法从中提取面部和边缘信息。我能够使用point_of_vertex_attribute

提取顶点信息
typedef CGAL::Linear_cell_complex_for_combinatorial_map<3> LCC;
typedef LCC::Point Point;
.....
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));

默认情况下(上面是您的示例的情况)线性单元复合物与其单元格没有ID。如果您确实需要这些ID,则应定义自己的项目类,并在创建后与这些ID相关联。但是通常您不需要这些ID;您可以使用迭代器直接通过线性细胞复合物的细胞迭代。参见doc the doc.cgal.org/latest/combinatorial_map/index.html。