【问题标题】:how to remove vertex , edge or face from CGAL::Linear_cell_complex_for_combinatorial_map如何从 CGAL::Linear_cell_complex_for_combinatorial_map 中删除顶点、边或面
【发布时间】:2019-01-02 12:19:43
【问题描述】:

我正在使用 qt creator 创建一个应用程序,它将 .off 文件读取为 CGAL::Linear_cell_complex_for_combinatorial_map 并预览它 我想对读取的网格进行操作,例如删除顶点、边或面并恢复它。

我创建了一个循环来访问飞镖: Dart_handle dh;

for (LCC_3::Dart_range::iterator it=lcc.darts().begin(),
           itend=lcc.darts().end(); it!=itend; )
    {
      dh=it++;
      if ( it!=itend && it==lcc.beta<2>(dh) ) ++it;

}

任何帮助或有用的链接来简化网格或删除顶点、边或面? 感谢您的帮助

【问题讨论】:

    标签: c++ graphics 3d mesh cgal


    【解决方案1】:

    您可以使用 remove_cell 操作。该方法以要移除的单元格的维度为模板:0 表示顶点,1 表示边,2 表示面...

    请参阅文档here 和示例there

    【讨论】:

    • 是否有任何从读取网格中删除/添加单元格的示例,因为所有关于多边形的示例都在这样的代码中创建:doc.cgal.org/latest/Combinatorial_map/…我不知道如何在读取网格中使用飞镖手柄@gdamiand
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-10-22
    • 2022-09-30
    • 1970-01-01
    相关资源
    最近更新 更多