compile error

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

compile error

Dinesh

#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


 








Reply | Threaded
Open this post in threaded view
|

Re: compile error

Florian Prud'homme
Hello ,

I remember I have a problem a bit similar 6 months ago . I created a new
file for this (in order to make it work with "data info" and "constrained"
triangulation) :


> /*
>   * Delaunay_mesh_vertex_base_with_info_2.h
>   *
>   *  Created on: Nov 23, 2017
>   *      Author: florian
>   */

> #ifndef DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_
> #define DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_

> #include <CGAL/Triangulation_vertex_base_2.h>

> namespace CGAL {

> template<typename Info_, typename GT, typename Vb =
> Triangulation_vertex_base_2&lt;GT> >
> class Delaunay_mesh_vertex_base_with_info_2: public Vb {
>      Info_ _info;

> public:
>      typedef typename GT::FT FT;
>      typedef typename Vb::Face_handle Face_handle;
>      typedef typename Vb::Point Point;
>      typedef Info_ Info;

>      template<typename TDS2>
>      struct Rebind_TDS {
>          typedef typename Vb::template Rebind_TDS<TDS2>::Other Vb2;
>          typedef Delaunay_mesh_vertex_base_with_info_2<Info, GT, Vb2>
Other;
>      };
> protected:
>      FT sizing_info_;

> public:
>      Delaunay_mesh_vertex_base_with_info_2() :
>              Vb(), sizing_info_(0.) {
>      }

>      Delaunay_mesh_vertex_base_with_info_2(const Point & p) :
>              Vb(p), sizing_info_(0.) {
>      }

>      Delaunay_mesh_vertex_base_with_info_2(const Point & p, Face_handle c)
:
>              Vb(p, c), sizing_info_(0.) {
>      }

>      Delaunay_mesh_vertex_base_with_info_2(Face_handle c) :
>              Vb(c), sizing_info_(0.) {
>      }

>      void set_sizing_info(const FT& s) {
>          sizing_info_ = s;
>      }
>      const FT& sizing_info() const {
>          return sizing_info_;
>      }

>      const Info& info() const {
>          return _info;
>      }
>      Info& info() {
>          return _info;
>      }
> };

> } // namespace CGAL

> #endif /* DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_ */

 



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: compile error

Dinesh
In reply to this post by Dinesh
I tried exact-intersections-tag as well

On Wed, May 2, 2018 at 2:49 PM Dinesh Shetty <[hidden email]> wrote:
Reply | Threaded
Open this post in threaded view
|

Re: compile error

MaelRL
In reply to this post by Dinesh

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


 









Reply | Threaded
Open this post in threaded view
|

Re: compile error

MaelRL
In reply to this post by Florian Prud'homme
This is not the correct approach. Please use the solution that was
provided to you back then.


On 02/05/2018 21:59, Florian Prud'homme wrote:

> Hello ,
>
> I remember I have a problem a bit similar 6 months ago . I created a new
> file for this (in order to make it work with "data info" and "constrained"
> triangulation) :
>
>
>> /*
>>   * Delaunay_mesh_vertex_base_with_info_2.h
>>   *
>>   *  Created on: Nov 23, 2017
>>   *      Author: florian
>>   */
>> #ifndef DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_
>> #define DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_
>> #include <CGAL/Triangulation_vertex_base_2.h>
>> namespace CGAL {
>> template<typename Info_, typename GT, typename Vb =
>> Triangulation_vertex_base_2&lt;GT> >
>> class Delaunay_mesh_vertex_base_with_info_2: public Vb {
>>      Info_ _info;
>> public:
>>      typedef typename GT::FT FT;
>>      typedef typename Vb::Face_handle Face_handle;
>>      typedef typename Vb::Point Point;
>>      typedef Info_ Info;
>>      template<typename TDS2>
>>      struct Rebind_TDS {
>>          typedef typename Vb::template Rebind_TDS<TDS2>::Other Vb2;
>>          typedef Delaunay_mesh_vertex_base_with_info_2<Info, GT, Vb2>
> Other;
>>      };
>> protected:
>>      FT sizing_info_;
>> public:
>>      Delaunay_mesh_vertex_base_with_info_2() :
>>              Vb(), sizing_info_(0.) {
>>      }
>>      Delaunay_mesh_vertex_base_with_info_2(const Point & p) :
>>              Vb(p), sizing_info_(0.) {
>>      }
>>      Delaunay_mesh_vertex_base_with_info_2(const Point & p, Face_handle c)
> :
>>              Vb(p, c), sizing_info_(0.) {
>>      }
>>      Delaunay_mesh_vertex_base_with_info_2(Face_handle c) :
>>              Vb(c), sizing_info_(0.) {
>>      }
>>      void set_sizing_info(const FT& s) {
>>          sizing_info_ = s;
>>      }
>>      const FT& sizing_info() const {
>>          return sizing_info_;
>>      }
>>      const Info& info() const {
>>          return _info;
>>      }
>>      Info& info() {
>>          return _info;
>>      }
>> };
>> } // namespace CGAL
>> #endif /* DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_ */
>  
>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: compile error

Dinesh
Still does not work. Here is the updated typedefs

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

typedef CGAL::Delaunay_mesh_vertex_base_2<Kernel, Vb> Vertex_base;

typedef CGAL::Constrained_Delaunay_triangulation_face_base_2<Kernel> Fb;

typedef CGAL::Delaunay_mesh_face_base_2< Kernel, Fb > Face_base; typedef CGAL::Exact_intersections_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;


On Thu, May 3, 2018 at 4:50 AM, Mael Rouxel-Labbé <[hidden email]> wrote:
This is not the correct approach. Please use the solution that was
provided to you back then.


On 02/05/2018 21:59, Florian Prud'homme wrote:
> Hello ,
>
> I remember I have a problem a bit similar 6 months ago . I created a new
> file for this (in order to make it work with "data info" and "constrained"
> triangulation) :
>
>
>> /*
>>   * Delaunay_mesh_vertex_base_with_info_2.h
>>   *
>>   *  Created on: Nov 23, 2017
>>   *      Author: florian
>>   */
>> #ifndef DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_
>> #define DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_
>> #include <CGAL/Triangulation_vertex_base_2.h>
>> namespace CGAL {
>> template<typename Info_, typename GT, typename Vb =
>> Triangulation_vertex_base_2&lt;GT> >
>> class Delaunay_mesh_vertex_base_with_info_2: public Vb {
>>      Info_ _info;
>> public:
>>      typedef typename GT::FT FT;
>>      typedef typename Vb::Face_handle Face_handle;
>>      typedef typename Vb::Point Point;
>>      typedef Info_ Info;
>>      template<typename TDS2>
>>      struct Rebind_TDS {
>>          typedef typename Vb::template Rebind_TDS<TDS2>::Other Vb2;
>>          typedef Delaunay_mesh_vertex_base_with_info_2<Info, GT, Vb2>
> Other;
>>      };
>> protected:
>>      FT sizing_info_;
>> public:
>>      Delaunay_mesh_vertex_base_with_info_2() :
>>              Vb(), sizing_info_(0.) {
>>      }
>>      Delaunay_mesh_vertex_base_with_info_2(const Point & p) :
>>              Vb(p), sizing_info_(0.) {
>>      }
>>      Delaunay_mesh_vertex_base_with_info_2(const Point & p, Face_handle c)
> :
>>              Vb(p, c), sizing_info_(0.) {
>>      }
>>      Delaunay_mesh_vertex_base_with_info_2(Face_handle c) :
>>              Vb(c), sizing_info_(0.) {
>>      }
>>      void set_sizing_info(const FT& s) {
>>          sizing_info_ = s;
>>      }
>>      const FT& sizing_info() const {
>>          return sizing_info_;
>>      }
>>      const Info& info() const {
>>          return _info;
>>      }
>>      Info& info() {
>>          return _info;
>>      }
>> };
>> } // namespace CGAL
>> #endif /* DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_ */

>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss



Reply | Threaded
Open this post in threaded view
|

Re: compile error

MaelRL

This is unrelated to your problem with "_with_info" classes, though.

Looking at your constrained Delaunay triangulation tag, I assume that you are using an exact constructions kernel, which you cannot do here. You should use an inexact construction kernel, such as 'CGAL::Exact_predicates_inexact_constructions_kernel'.

Note that this also means that you cannot use the tag "Exact_intersections" for your constrained triangulation either (but you can use the exact predicates tag if you use EPICK).


On 03/05/2018 13:53, Dinesh Shetty wrote:
Still does not work. Here is the updated typedefs

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

typedef CGAL::Delaunay_mesh_vertex_base_2<Kernel, Vb> Vertex_base;

typedef CGAL::Constrained_Delaunay_triangulation_face_base_2<Kernel> Fb;

typedef CGAL::Delaunay_mesh_face_base_2< Kernel, Fb > Face_base; typedef CGAL::Exact_intersections_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;


On Thu, May 3, 2018 at 4:50 AM, Mael Rouxel-Labbé <[hidden email]> wrote:
This is not the correct approach. Please use the solution that was
provided to you back then.


On 02/05/2018 21:59, Florian Prud'homme wrote:
> Hello ,
>
> I remember I have a problem a bit similar 6 months ago . I created a new
> file for this (in order to make it work with "data info" and "constrained"
> triangulation) :
>
>
>> /*
>>   * Delaunay_mesh_vertex_base_with_info_2.h
>>   *
>>   *  Created on: Nov 23, 2017
>>   *      Author: florian
>>   */
>> #ifndef DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_
>> #define DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_
>> #include <CGAL/Triangulation_vertex_base_2.h>
>> namespace CGAL {
>> template<typename Info_, typename GT, typename Vb =
>> Triangulation_vertex_base_2&lt;GT> >
>> class Delaunay_mesh_vertex_base_with_info_2: public Vb {
>>      Info_ _info;
>> public:
>>      typedef typename GT::FT FT;
>>      typedef typename Vb::Face_handle Face_handle;
>>      typedef typename Vb::Point Point;
>>      typedef Info_ Info;
>>      template<typename TDS2>
>>      struct Rebind_TDS {
>>          typedef typename Vb::template Rebind_TDS<TDS2>::Other Vb2;
>>          typedef Delaunay_mesh_vertex_base_with_info_2<Info, GT, Vb2>
> Other;
>>      };
>> protected:
>>      FT sizing_info_;
>> public:
>>      Delaunay_mesh_vertex_base_with_info_2() :
>>              Vb(), sizing_info_(0.) {
>>      }
>>      Delaunay_mesh_vertex_base_with_info_2(const Point & p) :
>>              Vb(p), sizing_info_(0.) {
>>      }
>>      Delaunay_mesh_vertex_base_with_info_2(const Point & p, Face_handle c)
> :
>>              Vb(p, c), sizing_info_(0.) {
>>      }
>>      Delaunay_mesh_vertex_base_with_info_2(Face_handle c) :
>>              Vb(c), sizing_info_(0.) {
>>      }
>>      void set_sizing_info(const FT& s) {
>>          sizing_info_ = s;
>>      }
>>      const FT& sizing_info() const {
>>          return sizing_info_;
>>      }
>>      const Info& info() const {
>>          return _info;
>>      }
>>      Info& info() {
>>          return _info;
>>      }
>> };
>> } // namespace CGAL
>> #endif /* DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_ */

>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss




Reply | Threaded
Open this post in threaded view
|

Re: compile error

Dinesh
Well I was not using exact kernel before, but I was adviced to use it as I also use 2D arrangements

On Thu, May 3, 2018 at 8:27 AM Mael Rouxel-Labbé <[hidden email]> wrote:

This is unrelated to your problem with "_with_info" classes, though.

Looking at your constrained Delaunay triangulation tag, I assume that you are using an exact constructions kernel, which you cannot do here. You should use an inexact construction kernel, such as 'CGAL::Exact_predicates_inexact_constructions_kernel'.

Note that this also means that you cannot use the tag "Exact_intersections" for your constrained triangulation either (but you can use the exact predicates tag if you use EPICK).


On 03/05/2018 13:53, Dinesh Shetty wrote:
Still does not work. Here is the updated typedefs

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

typedef CGAL::Delaunay_mesh_vertex_base_2<Kernel, Vb> Vertex_base;

typedef CGAL::Constrained_Delaunay_triangulation_face_base_2<Kernel> Fb;

typedef CGAL::Delaunay_mesh_face_base_2< Kernel, Fb > Face_base; typedef CGAL::Exact_intersections_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;


On Thu, May 3, 2018 at 4:50 AM, Mael Rouxel-Labbé <[hidden email]> wrote:
This is not the correct approach. Please use the solution that was
provided to you back then.


On 02/05/2018 21:59, Florian Prud'homme wrote:
> Hello ,
>
> I remember I have a problem a bit similar 6 months ago . I created a new
> file for this (in order to make it work with "data info" and "constrained"
> triangulation) :
>
>
>> /*
>>   * Delaunay_mesh_vertex_base_with_info_2.h
>>   *
>>   *  Created on: Nov 23, 2017
>>   *      Author: florian
>>   */
>> #ifndef DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_
>> #define DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_
>> #include <CGAL/Triangulation_vertex_base_2.h>
>> namespace CGAL {
>> template<typename Info_, typename GT, typename Vb =
>> Triangulation_vertex_base_2&lt;GT> >
>> class Delaunay_mesh_vertex_base_with_info_2: public Vb {
>>      Info_ _info;
>> public:
>>      typedef typename GT::FT FT;
>>      typedef typename Vb::Face_handle Face_handle;
>>      typedef typename Vb::Point Point;
>>      typedef Info_ Info;
>>      template<typename TDS2>
>>      struct Rebind_TDS {
>>          typedef typename Vb::template Rebind_TDS<TDS2>::Other Vb2;
>>          typedef Delaunay_mesh_vertex_base_with_info_2<Info, GT, Vb2>
> Other;
>>      };
>> protected:
>>      FT sizing_info_;
>> public:
>>      Delaunay_mesh_vertex_base_with_info_2() :
>>              Vb(), sizing_info_(0.) {
>>      }
>>      Delaunay_mesh_vertex_base_with_info_2(const Point & p) :
>>              Vb(p), sizing_info_(0.) {
>>      }
>>      Delaunay_mesh_vertex_base_with_info_2(const Point & p, Face_handle c)
> :
>>              Vb(p, c), sizing_info_(0.) {
>>      }
>>      Delaunay_mesh_vertex_base_with_info_2(Face_handle c) :
>>              Vb(c), sizing_info_(0.) {
>>      }
>>      void set_sizing_info(const FT& s) {
>>          sizing_info_ = s;
>>      }
>>      const FT& sizing_info() const {
>>          return sizing_info_;
>>      }
>>      const Info& info() const {
>>          return _info;
>>      }
>>      Info& info() {
>>          return _info;
>>      }
>> };
>> } // namespace CGAL
>> #endif /* DELAUNAY_MESH_VERTEX_BASE_WITH_INFO_2_H_ */

>
>
>
> --
> Sent from: http://cgal-discuss.949826.n4.nabble.com/
>


--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss