Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] compile error

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] compile error


Chronological Thread 
  • From: Mael Rouxel-Labbé <>
  • To:
  • Subject: Re: [cgal-discuss] compile error
  • Date: Thu, 3 May 2018 11:46:17 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:gL4SehabEIgFUN4uOZ+Gzxv/LSx+4OfEezUN459isYplN5qZr8u5bnLW6fgltlLVR4KTs6sC17KN9fi4EUU7or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6arXK99yMdFQviPgRpOOv1BpTSj8Oq3Oyu5pHfeQpFiCazbL9oMBm6sRjau9ULj4dlNqs/0AbCrGFSe+RRy2NoJFaTkAj568yt4pNt8Dletuw4+cJYXqr0Y6o3TbpDDDQ7KG81/9HktQPCTQSU+HQRVHgdnwdSDAjE6BH6WYrxsjf/u+Fg1iSWIdH6QLYpUjmk8qxlSgLniD0fOjAk7m/XhMx+gqFVrh2vqBNwwZLbbZqPO/ZiZK7QZ88WSGRDU8tXSidPApm8b4wKD+cZOuhXtZfyp18WohWiAgmsGezuxSFMhnPv26M1yf8uHhrc2wc9GN8OtW7bo8vxNKsIS+C1y7TIzDrdYPNSwzv97JLHfQs6rv6SRr9wftTeyU4qFwzbklWQs4zkPz2P2esRr2ib6PBgVOK1h2E7rAFxpyGiy8ExgYfHgYIVz0rL9SR/wIstOdK4R1R0Ydq+HJtXrSGaOI17Sd4hTWFwoCs2174LtJ2hcCQXyZkqxwTTZvyGfoSS/x7vSumcLS92iX9nYr6zmhe//Eu6xuDyV8S4yktGojRLn9TKq3sDzQbc6tKdRft45kqh2SiA1wTU6uxcPEw5m7DXK5smwrMxjJYTtF7MHi7ymEnvi6+Wa1kk9vKv6+T5YrXqvJmcOJFoig3mM6QunNKwAfggPwQTXGWW+v6w2KDi8ED5WrlHjvw7nrPEvJzEKskXvqu5DBVU0oYn5Ra/FTCm0NEAkHkCNl1KZhaHg5LzO1HJPfD5Aumwg1C2nDdv3f/JJabuDYvWI3jMjrjherN95FBAyAopzdFf6YhbBa0dIPL0QE/wtMbUAQM+Mwyx2+rnEsly1psCWWKTBa+UKL/dsVCS6eIrOuWDeY4VuC3hJPg4/P7ulmQ0mUQdfKmsxZsYcmq0HvVgI0WDYHrjmM0NEWkQvll2cOu/g1KLVXtfZm25QrknzjA9EoOvS4nZFa63h7nU+S62GqpsYX1WB1TJNX7ifQTMD/IFZSbUOMh8gjEAE7yoQYUs/R6jswr316B2IOPf5ioCpNTo090jtL6brg076TEhV5fV6GqKVWwhxjpZFQ9z57h2pAlG8nnG1KF5h/JCEtkJvqFGXwA/OILG3uJzAMz1QBOHddCMGg7/HoeWRAopR9d0+OcgJl5nEo/73B/O2C+nH6UEmbWAGJsu4+TX2H2jf58gmUaD77EoihwdeuUKNWCigfQipVGIQYvOzQOcnqeuMKMBwGjK6mfFy2eS7hlV

Hello,

Simply using CGAL::Triangulation_face_base_with_info_2 does not fill all the requirements you need for the face of your triangulation. Here is how it goes:

You need a face base that fits for the class CGAL::Delaunay_mesher_2. According to the documentation, you need a face class that fits the requirements of the concept DelaunayMeshFaceBase_2. A suggested class to use is what you use below: CGAL::Delaunay_mesh_face_base_2.

Note that the concept DelaunayMeshFaceBase_2 includes the requirements of the concept ConstrainedTriangulationFaceBase_2, itself including TriangulationFaceBase_2 (this is the "Refines" part in the doc).

Thus you need your face base to be a model of all these concepts. If you look at the class CGAL::Delaunay_mesh_face_base_2, this is done by having by default the class CGAL::Constrained_Delaunay_triangulation_face_base_2 as base class (which itself has the default base class CGAL::Constrained_triangulation_face_base_2, thus fitting the requirements of the concept ConstrainedTriangulationFaceBase_2). Similarly, CGAL::Constrained_triangulation_face_base_2 has for base class CGAL::Triangulation_face_base_2 by default, which fits the requirements of TriangulationFaceBase_2.

Now, let's say that you want to have an info field in your triangulation face base, the class CGAL::Triangulation_face_base_with_info_2 is a model of TriangulationFaceBase_2, but you can't just use that class, you still need to fit the requirements of the other concepts: it must be a face compatible with a constrained triangulation and with the mesher.

How do to that, well you just specify the base classes:

typedef CGAL::Triangulation_face_base_with_info_2<std::pair<int,int>, Kernel> Fb_with_info; // this replaces CGAL::Triangulation_face_base_2

Now, what is missing in your code:

typedef CGAL::Constrained_triangulation_face_base_2<Kernel, Fb_with_info> CFb_with_info;
typedef CGAL::Constrained_Delaunay_triangulation_face_base_2<Kernel, CFb_with_info> CDFb_with_info;
typedef CGAL::Delaunay_mesh_face_base_2< Kernel, CDFb_with_info > Face_base;

Note that this is the same for your mesh vertex base class, you should use your _with_info vertex base as base of the class CGAL::Delaunay_mesh_vertex_base_2 (rather than the other way around).

On 02/05/2018 21:49, Dinesh Shetty wrote:

#include<CGAL/Exact_predicates_exact_constructions_kernel.h>

typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;

typedef CGAL::Delaunay_mesh_vertex_base_2<Kernel> Vb;

typedef CGAL::Triangulation_vertex_base_with_info_2<std::pair< std::pair<int, int>, std::pair<int, std::string> >, Kernel, Vb > Vertex_base;

typedef CGAL::Delaunay_mesh_face_base_2< Kernel > Face_base;

//typedef CGAL::Triangulation_face_base_with_info_2<std::pair<int,int>, Kernel> Face_base; //does not work with constrained triangulation?

typedef CGAL::Exact_predicates_tag Itag;

typedef CGAL::Triangulation_data_structure_2< Vertex_base, Face_base > Triangulation_data;

typedef CGAL::Constrained_Delaunay_triangulation_2< Kernel, Triangulation_data, Itag > CDTriangulation;

typedef CGAL::Constrained_triangulation_plus_2<CDTriangulation> CDTriangulationPlus;

typedef CGAL::Delaunay_mesh_size_criteria_2< CDTriangulationPlus > Criteria;

typedef CGAL::Delaunay_mesher_2< CDTriangulationPlus, Criteria > Mesher_Base;

typedef CDTriangulationPlus::Vertex_handle Vertex_handle;

typedef std::vector< Vertex_handle > Vertex_handles;

typedef CDTriangulationPlus::Face_handle Face_handle;

typedef CDTriangulationPlus::Point Point;

typedef CGAL::Polygon_2<Kernel> Polygon2D;


std::list<Point> seed;



CGAL::refine_Delaunay_mesh_2(cdtp, seed.begin(), seed.end(), Criteria( cnfg_.MaxTriangleSkewness(), cnfg_.MaxTriangleEdgeLength()*2.0));









CGAL::lloyd_optimize_mesh_2(cdtp ,CGAL::parameters::max_iteration_number = MeshOptItr);



Leads to following compile error

3>D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/number_utils.h(104): error C2064: term does not evaluate to a function taking 1 arguments


3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Mesh_2/Refine_edges_with_clusters.h(286) : see reference to function template instantiation 'CGAL::Null_functor::result_type CGAL::sqrt<CGAL::Lazy_exact_nt<ET_>>(const AS &)' being compiled


3> with


3> [


3> ET_=CGAL::Gmpq,


3> AS=CGAL::Lazy_exact_nt<CGAL::Gmpq>


3> ]


3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Mesh_2/Refine_edges_with_clusters.h(249) : while compiling class template member function 'CGAL::Point_2<R_> CGAL::Mesh_2::Refine_edges_base_with_clusters<Tr,Is_locally_conform>::split_cluster_point(CGAL::internal::CC_iterator<DSC,Const>,CGAL::internal::CC_iterator<DSC,Const>,const CGAL::Mesh_2::Clusters<Tr>::Cluster &) const'


3> with


3> [


3> R_=CGAL::Epeck,


3> Tr=FeMDefs::CDTriangulationPlus,


3> Is_locally_conform=CGAL::Mesh_2::Is_locally_conforming_Gabriel<FeMDefs::CDTriangulationPlus>,


3> DSC=CGAL::Compact_container<CGAL::Triangulation_vertex_base_with_info_2<std::pair<std::pair<int,int>,std::pair<int,IdType>>,Kernel,CGAL::Delaunay_mesh_vertex_base_2<Kernel,CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<FeMDefs::Vertex_base,FeMDefs::Face_base>>>>>>,


3> Const=false


3> ]


3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Mesh_2/Refine_edges_with_clusters.h(127) : see reference to function template instantiation 'CGAL::Point_2<R_> CGAL::Mesh_2::Refine_edges_base_with_clusters<Tr,Is_locally_conform>::split_cluster_point(CGAL::internal::CC_iterator<DSC,Const>,CGAL::internal::CC_iterator<DSC,Const>,const CGAL::Mesh_2::Clusters<Tr>::Cluster &) const' being compiled


3> with


3> [


3> R_=CGAL::Epeck,


3> Tr=FeMDefs::CDTriangulationPlus,


3> Is_locally_conform=CGAL::Mesh_2::Is_locally_conforming_Gabriel<FeMDefs::CDTriangulationPlus>,


3> DSC=CGAL::Compact_container<CGAL::Triangulation_vertex_base_with_info_2<std::pair<std::pair<int,int>,std::pair<int,IdType>>,Kernel,CGAL::Delaunay_mesh_vertex_base_2<Kernel,CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<FeMDefs::Vertex_base,FeMDefs::Face_base>>>>>>,


3> Const=false


3> ]


3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Mesh_2/Refine_edges_with_clusters.h(315) : see reference to class template instantiation 'CGAL::Mesh_2::Refine_edges_base_with_clusters<Tr,Is_locally_conform>' being compiled


3> with


3> [


3> Tr=FeMDefs::CDTriangulationPlus,


3> Is_locally_conform=CGAL::Mesh_2::Is_locally_conforming_Gabriel<FeMDefs::CDTriangulationPlus>


3> ]


3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Delaunay_mesher_2.h(71) : see reference to class template instantiation 'CGAL::Mesh_2::Refine_edges_with_clusters<Tr,Is_locally_conform>' being compiled


3> with


3> [


3> Tr=FeMDefs::CDTriangulationPlus,


3> Is_locally_conform=CGAL::Mesh_2::Is_locally_conforming_Gabriel<FeMDefs::CDTriangulationPlus>


3> ]


3> D:\PE\PE_Software\3rdParty\CGAL\CGAL-4.12\include\CGAL/Delaunay_mesher_2.h(372) : see reference to class template instantiation 'CGAL::Delaunay_mesher_2<Tr,Crit>' being compiled


3> with


3> [


3> Tr=FeMDefs::CDTriangulationPlus,


3> Crit=FeMDefs::Criteria


3> ]


3> src\FemMesh.cpp(485) : see reference to function template instantiation 'void CGAL::refine_Delaunay_mesh_2<CDTriangulationPlus,CGAL::Delaunay_mesh_size_criteria_2<CDT>,std::_List_iterator<_Mylist>>(Tr &,InputIterator,InputIterator,const Criteria &,bool)' being compiled


3> with


3> [


3> CDT=FeMDefs::CDTriangulationPlus,


3> _Mylist=std::_List_val<std::_List_simple_types<CGAL::Point_2<CGAL::Epeck>>>,


3> Tr=CDTriangulationPlus,


3> InputIterator=std::_List_iterator<std::_List_val<std::_List_simple_types<CGAL::Point_2<CGAL::Epeck>>>>,


3> Criteria=CGAL::Delaunay_mesh_size_criteria_2<FeMDefs::CDTriangulationPlus>


3> ]



any help appreciated


 












Archive powered by MHonArc 2.6.18.

Top of Page