我正在尝试优化执行delauny细化后获得的网格,如下所示
CGAL::refine_Delaunay_mesh_2(cdtp, seed.begin(), seed.end(), Criteria( cnfg_.MaxTriangleSkewness(), cnfg_.MaxTriangleEdgeLength()*2.0));
if(OptimizeMesh)
{
CGAL::lloyd_optimize_mesh_2(cdtp ,CGAL::parameters::max_iteration_number = MeshOptItr);
}
但是我收到编译错误,如下所示
3>D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12-beta2\include\CGAL/Mesh_2/Mesh_global_optimizer_2.h(379): error C2039: 'sizing_info' : is not a member of 'CGAL::Triangulation_vertex_base_with_info_2<Info_,GT,Vb>'
3> with
3> [
3> Info_=std::pair<std::pair<int,int>,std::pair<int,IdType>>,
3> GT=Kernel,
3> Vb=CGAL::Triangulation_vertex_base_2<CGAL::Exact_predicates_inexact_constructions_kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vertex_base,Face_base>>>
3> ]
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12-beta2\include\CGAL/Mesh_2/Mesh_global_optimizer_2.h(371) : while compiling class template member function 'void CGAL::Mesh_2::Mesh_global_optimizer_2<CDT,MoveFunction>::update_mesh(const std::vector<_Ty> &)'
3> with
3> [
3> CDT=CGAL::Constrained_triangulation_plus_2<CDTriangulation>,
3> MoveFunction=Mv,
3> _Ty=std::pair<CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_with_info_2<std::pair<std::pair<int,int>,std::pair<int,IdType>>,Kernel,CGAL::Triangulation_vertex_base_2<CGAL::Exact_predicates_inexact_constructions_kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vertex_base,Face_base>>>>>,false>,CGAL::Point_2<CGAL::Epick>>
3> ]
3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12-beta2\include\CGAL/Mesh_2/Mesh_global_optimizer_2.h(178) : see reference to function template instantiation 'void CGAL::Mesh_2::Mesh_global_optimizer_2<CDT,MoveFunction>::update_mesh(const std::vector<_Ty> &)' being compiled
3> with
3> [
3> CDT=CGAL::Constrained_triangulation_plus_2<CDTriangulation>,
3> MoveFunction=Mv,
3> _Ty=std::pair<CGAL::internal::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_with_info_2<std::pair<std::pair<int,int>,std::pair<int,IdType>>,Kernel,CGAL::Triangulation_vertex_base_2<CGAL::Exact_predicates_inexact_constructions_kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vertex_base,Face_base>>>>>,false>,CGAL::Point_2<CGAL::Epick>>
3> ]
我在Windows 7上使用visual studio 2012.CGAL网站中的示例没有说明带有附加信息的顶点。我该如何克服这个问题?
答案 0 :(得分:0)
没有看到任何代码,我只能猜测顶点和/或面部类型,而不是有效的模型来使用优化方法。
据记载here, 其底层TriangulationDataStructure_2的顶点基础和面基,分别实现了DelaunayMeshFaceBase_2和DelaunayMeshVertexBase_2 的概念。
另见this example。