在面中插入边缘 - CGAL 错误:断言冲突

insert edges in faces- CGAL error: assertion violation

本文关键字:错误 断言 冲突 CGAL 插入 边缘      更新时间:2023-10-16

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

它显示以下错误:在抛出"CGAL::Assertion_exception"实例后终止调用 什么(): CGAL 错误: 断言冲突!例如: is_insertable_cell_1_in_cell_2(adart1, adart2)

我搜索了它,但我无法得到有用的解决方案

 QWidget* viewer ;
   std::string filename;
   Dart_handle dh3;
 LCC_3 lcc;
   QMainWindow qWin;
  CGAL::DefaultColorFunctorLCC fcolor;
void MainWindow ::insertCell()
{
      dh3=lcc.insert_cell_1_in_cell_2(lcc.darts().begin(), lcc.darts().end());
    CGAL_assertion( lcc.is_valid() );
    lcc.display_characteristics(std::cout) << ", valid=" <<
      lcc.is_valid() << std::endl;
    setCentralWidget( new CGAL::SimpleLCCViewerQt<LCC_3, CGAL::DefaultColorFunctorLCC>(&qWin ,
                      lcc,
                      "Basic LCC Viewer",
                      false,
                       fcolor ) );
    show();
}
 void MainWindow ::removeCell()
 {
    CGAL_assertion( (lcc.is_removable<2>(dh3)) );
    lcc.remove_cell<1>(dh3);
    CGAL_assertion( lcc.is_valid() );
     lcc.display_characteristics(std::cout) << ", valid="
                      << lcc.is_valid() << std::endl;
}

有什么帮助吗? 或有用的链接来简化网格或去除顶点、边或面?我感谢任何帮助

要在面中插入边缘,请参阅此处的文档。对于卷中的人脸,文档就在那里。您也可以在此处查看示例。

要了解的重要一点是,当您在面中添加边缘时,您需要说出在哪里插入边缘。这就是你给出两个精确飞镖的原因。当您想将面插入体积时,这类似:您需要给出一系列飞镖,这是体积中边缘的循环。