Subject: CGAL users discussion list
List archive
[cgal-discuss] How to insert points with info in Periodic_3_Delaunay_triangulation_3?
Chronological Thread
- From: Jakob van Bethlehem <>
- To:
- Subject: [cgal-discuss] How to insert points with info in Periodic_3_Delaunay_triangulation_3?
- Date: Wed, 29 Feb 2012 13:58:09 +0100
Hello,
As a new subscriber to this list, I'm not exactly sure if this is the right
place to pose my question, but if not, maybe someone can redirect me.
What I'm basically trying to achieve is the procedure described in
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Triangulation_3/Chapter_main.html#Subsection_38.5.3
except that I'm trying for a Periodic_3_Delaunay_triangulation_3. Since that
class derives from this class, I'd expect this to work as well.
Unfortunately the compiler complains with:
[..]/include/c++/4.6.2/bits/stl_construct.h:76: error: no matching function for call to
‘CGAL::Point_3<CGAL::Cartesian<double>
>::Point_3(std::pair<CGAL::Point_3<CGAL::Cartesian<double> >, Info>&)’
And just before that:
/usr/include/CGAL/Periodic_3_Delaunay_triangulation_3.h:194: instantiated from ‘std::ptrdiff_t CGAL::Periodic_3_Delaunay_triangulation_3<Gt, Tds>::insert(InputIterator, InputIterator, bool) [with InputIterator = __gnu_cxx::__normal_iterator<std::pair<CGAL::Point_3<CGAL::Cartesian<double> >, Info>*, std::vector<std::pair<CGAL::Point_3<CGAL::Cartesian<double> >, Info> > >, [..]
To really spill out all the details, these are my type definitions:
struct Info;
typedef CGAL::Cartesian<double> Kernel3;
typedef CGAL::Periodic_3_triangulation_traits_3<Kernel3> GT;
typedef CGAL::Periodic_3_triangulation_ds_vertex_base_3<> VbDS;
typedef CGAL::Triangulation_vertex_base_3<GT,VbDS> Vb;
typedef CGAL::Periodic_3_triangulation_ds_cell_base_3<> CbDS;
typedef CGAL::Triangulation_cell_base_3<GT,CbDS> Cb;
typedef CGAL::Triangulation_vertex_base_with_info_3<Info, GT, Vb> VbInfo;
typedef CGAL::Triangulation_data_structure_3<VbInfo, Cb> TDS;
typedef CGAL::Periodic_3_Delaunay_triangulation_3<Traits, Tds> Per_delaunay;
I don't think the exact contents of the 'Info' struct should make a big difference here, but if it does, I could spill out that one as well on request. Like in the example I created a vector of pairs of a Point and Info-objects and then I try to call the 'insert()' member with the 'begin()' and 'end()' iterator of that vector. Apparently in a normal case the compiler is told to take the 'first' element when constructing Point_3 objects, but not in the periodic case.
Is there some overloaded version of 'insert()' missing in the periodic
tessellation type, or am I missing something?
(actually I also tried with a vector of std::pair<Periodic_point, Info>
elements, but got the same error about not being able to construct a Point_3 object
from such a pair)
Sincerely,
Jakob van Bethlehem
- [cgal-discuss] How to insert points with info in Periodic_3_Delaunay_triangulation_3?, Jakob van Bethlehem, 02/29/2012
- Re: [cgal-discuss] How to insert points with info in Periodic_3_Delaunay_triangulation_3?, Sebastien Loriot (GeometryFactory), 02/29/2012
- Re: [cgal-discuss] How to insert points with info in Periodic_3_Delaunay_triangulation_3?, Jakob van Bethlehem, 02/29/2012
- Re: [cgal-discuss] How to insert points with info in Periodic_3_Delaunay_triangulation_3?, Sebastien Loriot (GeometryFactory), 02/29/2012
- Re: [cgal-discuss] How to insert points with info in Periodic_3_Delaunay_triangulation_3?, Jakob van Bethlehem, 02/29/2012
- Re: [cgal-discuss] How to insert points with info in Periodic_3_Delaunay_triangulation_3?, Sebastien Loriot (GeometryFactory), 02/29/2012
Archive powered by MHonArc 2.6.16.