0

VS 2017 を使用して、Windows でヘッダーのみのモードで最新の CGAL を使用して LSCM を使用して、閉じた三角形メッシュで UV 座標を生成するのに苦労しています。継ぎ目なので、のデフォルトコンストラクターに依存していますSMP::Two_vertices_parameterizer_3

typedef CGAL::Simple_cartesian<double> Kerneld;
typedef Kerneld::Point_3 Pointd;
typedef CGAL::Surface_mesh<Pointd> Meshd;
// ...
if (parameterizeMesh)
{
    std::cout << "Parameterizing mesh with Least-Squares Conformal Mapping ... " << std::endl;
    Meshd meshd;
    PMP::polygon_soup_to_polygon_mesh(vd, polys, meshd);

    SMP::LSCM_parameterizer_3<Meshd, SMP::Two_vertices_parameterizer_3<Meshd>> param;
    Meshd::Property_map<Meshd::Vertex_index, Kerneld::Point_2> uvmap = meshd.add_property_map<Meshd::vertex_index, Kerneld::Point_2>("v:uv").first;
    SMP::parameterize(meshd, param, PMP::longest_border(meshd).first, uvmap);
}

そして、それは失敗しています:

CGAL error: assertion violation!
Expression : _idx < data_.size()
File       : C:\dev\CGAL-4.14\include\CGAL/Surface_mesh/Properties.h
Line       : 206
Explanation:
Refer to the bug-reporting instructions at https://www.cgal.org/bug_report.html

次に、アサーション違反の直前に_idxとの両方の値を出力し、それぞれ(つまり) との興味深い結果を得ました。注目に値するのは、問題のメッシュが 16376 個の三角形の面を保持し、16376 * 3 = 49128 であることです。平面パラメーター化を扱う多くの CGAL の例を読みましたが、役に立ちませんでした。data_.size()42949672942^32 - 249128

EDIT : さらに調べてみると、最大の数値は実際には によって返される数値PMP::longest_borderであることがわかります。これは、閉じたメッシュを使用しているため意味があります。Seam_meshメッシュに仮想シームを導入することを検討しています。

4

0 に答える 0