CGAL工会误区

CGAL union misunderstanding

本文关键字:误区 CGAL      更新时间:2023-10-16

我正在使用CGAL::Polygon_mesh_processing::corefine_and_compute_union(),函数来计算 2 个网格的联合。

当我使用来自网站(https://cgal.geometryfactory.com/CGAL/doc/master/Polygon_mesh_processing/Polygon_mesh_processing_2corefinement_mesh_union_8cpp-example.html)的代码示例以及提供的关闭文件blobby.offeight.off时,一切都很好。

不幸的是,当我使用其他关闭文件时,我会收到我不明白的错误:

CGAL error: assertion violation!
Expression : it_poly_hedge!=edge_to_hedge.end()
File       : /usr/local/include/CGAL/Polygon_mesh_processing/internal/Corefinement/Visitor.h
Line       : 1008

以下是 Visitor.h 中的相关代码:

    //WARNING: in few case this is needed if the marked edge is on the border
    //to optimize it might be better to only use sorted pair. TAG_SLXX1
    Node_id_pair opposite_pair(node_id_pair.second,node_id_pair.first);
    it_poly_hedge=edge_to_hedge.find(opposite_pair);
    CGAL_assertion( it_poly_hedge!=edge_to_hedge.end() );

你可以在这里找到我使用的文件:https://pool234.seedbox.fr/files/index.php/s/H87xL0Ema9HC44P(残疾人:分享)

谢谢你的帮助。

这是来自 sloriot 的 aswner :

mesh2.off 不是有效的输入网格(由于 重复的边缘)。如果您首先通过调用来修复它 CGAL::P olygon_mesh_processing::stitch_borders(),你会得到你的 结果。

感谢