我使用CGAL::Polygon_mesh_processing::corefine_and_compute_union(),
函數來計算2個網格的聯合。CGAL工會誤解
當我使用的代碼爲例從網站(https://cgal.geometryfactory.com/CGAL/doc/master/Polygon_mesh_processing/Polygon_mesh_processing_2corefinement_mesh_union_8cpp-example.html),並提供關閉文件blobby.off和eight.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 (PWD:股)
謝謝你的幫助。
'mesh2.off'是不是一個有效輸入目(自相交由於複製邊緣)。如果你首先通過調用['CGAL :: Polygon_mesh_processing :: stitch_borders()'](https://doc.cgal.org/latest/Polygon_mesh_processing/group__PMP__repairing__grp.html#ga15f047f56af2fee3e491120db4dc69a3)來修復它,你會得到你的結果。 – sloriot
這樣做伎倆,非常感謝你。 –
這些評論應該變成答案。 –