How to extract face information from Linear_cell_complex_for_combinatorial_map in CGAL?

孤人 提交于 2019-12-11 17:45:50

问题


I was trying to create a hexahedron mesh using CGAL. So far I was able to create a hexaheron, but was unable to extract face and edge info from it. I was able to extract vertices information though using 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));

回答1:


By default (which is the case of your example above) a linear cell complex does not have ids associated to its cells. If you really need these ids, you should define your own item class and associate these ids after creation. But usually you don't need these ids; you can directly iterate through the cells of the linear cell complex by using iterators. Cf. the doc here doc.cgal.org/latest/Combinatorial_map/index.html.



来源:https://stackoverflow.com/questions/53819689/how-to-extract-face-information-from-linear-cell-complex-for-combinatorial-map-i

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!