2017-10-10 4 views
2

私は、2メッシュの和集合を計算するためにCGAL::Polygon_mesh_processing::corefine_and_compute_union(),関数を使用しています。CGAL組合の誤解

私はウェブサイト(https://cgal.geometryfactory.com/CGAL/doc/master/Polygon_mesh_processing/Polygon_mesh_processing_2corefinement_mesh_union_8cpp-example.html)からコードexempleとオフ提供するファイルと eight.off blobby.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:share)

ありがとうございました。ここ

+0

は 'mesh2.off'は、有効な入力メッシュ(重複エッジによる自己交差)ではありません。最初に['CGAL :: Polygon_mesh_processing :: stitch_borders()'](https://doc.cgal.org/latest/Polygon_mesh_processing/group__PMP__repairing__grp.html#ga15f047f56af2fee3e491120db4dc69a3)を呼び出して修正すると、結果が得られます。 – sloriot

+0

それはトリックでした、ありがとうございます。 –

+0

これらのコメントは答えに変わる必要があります。 –

答えて

0

はsloriotからaswnerある:

mesh2.offは、有効な入力メッシュ( 重複エッジによる自己交差)ではありません。最初に CGAL :: Polygon_mesh_processing :: stitch_borders()を呼び出して修正すると、 という結果が得られます。

Thxを