如何从CGAL中的Linear_cell_complex_for_combinatorial_map中提取面部信息? [英] How to extract face information from Linear_cell_complex_for_combinatorial_map in CGAL?

查看:67
本文介绍了如何从CGAL中的Linear_cell_complex_for_combinatorial_map中提取面部信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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));


推荐答案

默认情况下(上述示例就是这种情况) )线性单元格复合体没有与单元格关联的ID。如果您确实需要这些ID,则应定义自己的商品类,并在创建后将其关联。但是通常您不需要这些ID;您可以使用迭代器直接迭代线性单元复合体的单元。 cf.此处的文档doc.cgal.org/latest/Combinatorial_map/index.html。

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.

这篇关于如何从CGAL中的Linear_cell_complex_for_combinatorial_map中提取面部信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆