OutputIterator problem for incident cells

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

OutputIterator problem for incident cells

BRYang
Hi Everyone,

I was trying to get all the incident cells of a point in delaunay triangulation
with below function:

template <class OutputIterator> 
OutputIterator t.incident cells( Vertex handle v, OutputIterator cells)

My code is as follows:

std::list<Cell_handle_t> cell_vector;
//assume vh is the Vertex_handle
dt.incident_cells(vh, std::back_inserter(cell_vector));

But it says that there is something wrong with my code, the result is as follows:

Mesh.cpp(1454): error C2664: 'OutputIterator CGAL::Triangulation_3<GT,Tds_>::incident_cells<std::back_insert_iterator<_Container>>(CGAL::internal::CC_iterator<DSC,Const>,OutputIterator) const' : cannot convert parameter 1 from 'CGAL::internal::In_place_list_iterator<T,Alloc>' to 'CGAL::internal::CC_iterator<DSC,Const>'
1>          with
1>          [
1>              OutputIterator=std::back_insert_iterator<std::list<Cell_handle_t>>,
1>              GT=K,
1>              Tds_=Tds,
1>              _Container=std::list<Cell_handle_t>,
1>              DSC=CGAL::Compact_container<CGAL::Triangulation_vertex_base_with_info_3<VertexInfo,K,CGAL::Triangulation_vertex_base_3<K,CGAL::Triangulation_ds_vertex_base_3<CGAL::Triangulation_data_structure_3<Vb,Cb>>>>>,
1>              Const=false
1>          ]
1>          and
1>          [
1>              T=CGAL::HalfedgeDS_in_place_list_vertex<CGAL::I_Polyhedron_vertex<MPVertex<CGAL::HalfedgeDS_list_types<CGAL::Cartesian<simple_numbertype>,CGAL::I_Polyhedron_derived_items_3<MPItems>,std::allocator<int>>,CGAL::Tag_true,CGAL::Point_3<CGAL::Cartesian<simple_numbertype>>,CGAL::Vector_3<CGAL::Cartesian<simple_numbertype>>,CGAL::Cartesian<simple_numbertype>>>>,
1>              Alloc=std::allocator<CGAL::HalfedgeDS_in_place_list_vertex<CGAL::I_Polyhedron_vertex<MPVertex<CGAL::HalfedgeDS_list_types<CGAL::Cartesian<simple_numbertype>,CGAL::I_Polyhedron_derived_items_3<MPItems>,std::allocator<int>>,CGAL::Tag_true,CGAL::Point_3<CGAL::Cartesian<simple_numbertype>>,CGAL::Vector_3<CGAL::Cartesian<simple_numbertype>>,CGAL::Cartesian<simple_numbertype>>>>>
1>          ]
1>          and
1>          [
1>              DSC=CGAL::Compact_container<CGAL::Triangulation_vertex_base_with_info_3<VertexInfo,K,CGAL::Triangulation_vertex_base_3<K,CGAL::Triangulation_ds_vertex_base_3<CGAL::Triangulation_data_structure_3<Vb,Cb>>>>>,
1>              Const=false
1>          ]
1>          No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called


I have no idea what the exact problem is, would you please help me with it?
Thank you very much.

Monica
Reply | Threaded
Open this post in threaded view
|

Re: OutputIterator problem for incident cells

mikef
I am having the same problem...clueless
Reply | Threaded
Open this post in threaded view
|

Re: OutputIterator problem for incident cells

Laurent Rineau (CGAL/GeometryFactory)
In reply to this post by BRYang
Le Thursday, April 23, 2015 3:26:26 AM CEST brYang a ?crit :

> Hi Everyone,
>
> I was trying to get all the incident cells of a point in delaunay
> triangulation
> with below function:
>
> template <class OutputIterator>
> OutputIterator t.incident cells( Vertex handle v, OutputIterator cells)
>
> My code is as follows:
>
> std::list<Cell_handle_t> cell_vector;
> //assume vh is the Vertex_handle
> dt.incident_cells(vh, std::back_inserter(cell_vector));

The following error log shows that the first parameter, `v`, is not a
triangulation `Vertex_handle`. `CGAL::HalfedgeDS_in_place_list_vertex<..>` is
the vertex handle type of a CGAL Polyhedron_3!


> But it says that there is something wrong with my code, the result is as
> follows:
>
> Mesh.cpp(1454): error C2664: 'OutputIterator
> CGAL::Triangulation_3<GT,Tds_>::incident_cells<std::back_insert_iterator&lt
> ;_Container>>(CGAL::internal::CC_iterator<DSC,Const>,OutputIterator) const'
> : cannot convert parameter 1 from
> 'CGAL::internal::In_place_list_iterator<T,Alloc>' to
> 'CGAL::internal::CC_iterator<DSC,Const>'
> 1>          with
> 1>          [
> 1>
> OutputIterator=std::back_insert_iterator<std::list&lt;Cell_handle_t>>,
> 1>              GT=K,
> 1>              Tds_=Tds,
> 1>              _Container=std::list<Cell_handle_t>,
> 1>
> DSC=CGAL::Compact_container<CGAL::Triangulation_vertex_base_with_info_3&lt;
> VertexInfo,K,CGAL::Triangulation_vertex_base_3&lt;K,CGAL::Triangulation_ds_
> vertex_base_3&lt;CGAL::Triangulation_data_structure_3&lt;Vb,Cb>>>>>, 1>    
>          Const=false
> 1>          ]
> 1>          and
> 1>          [
> 1>
> T=CGAL::HalfedgeDS_in_place_list_vertex<CGAL::I_Polyhedron_vertex&lt;MPVert
> ex&lt;CGAL::HalfedgeDS_list_types&lt;CGAL::Cartesian&lt;simple_numbertype>,
> CGAL::I_Polyhedron_derived_items_3<MPItems>,std::allocator<int>>,CGAL::Tag_
> true,CGAL::Point_3<CGAL::Cartesian&lt;simple_numbertype>>,CGAL::Vector_3<CG
> AL::Cartesian&lt;simple_numbertype>>,CGAL::Cartesian<simple_numbertype>>>>,
> 1>
> Alloc=std::allocator<CGAL::HalfedgeDS_in_place_list_vertex&lt;CGAL::I_Polyh
> edron_vertex&lt;MPVertex&lt;CGAL::HalfedgeDS_list_types&lt;CGAL::Cartesian&
> lt;simple_numbertype>,CGAL::I_Polyhedron_derived_items_3<MPItems>,std::allo
> cator<int>>,CGAL::Tag_true,CGAL::Point_3<CGAL::Cartesian&lt;simple_numberty
> pe>>,CGAL::Vector_3<CGAL::Cartesian&lt;simple_numbertype>>,CGAL::Cartesian<
> simple_numbertype>>>>> 1>          ]
> 1>          and
> 1>          [
> 1>
> DSC=CGAL::Compact_container<CGAL::Triangulation_vertex_base_with_info_3&lt;
> VertexInfo,K,CGAL::Triangulation_vertex_base_3&lt;K,CGAL::Triangulation_ds_
> vertex_base_3&lt;CGAL::Triangulation_data_structure_3&lt;Vb,Cb>>>>>, 1>    
>          Const=false
> 1>          ]
> 1>          No user-defined-conversion operator available that can perform
> this conversion, or the operator cannot be called
>
>
> I have no idea what the exact problem is, would you please help me with it?
> Thank you very much.
>
> Monica
>
>
>
> --
> View this message in context:
> http://cgal-discuss.949826.n4.nabble.com/OutputIterator-problem-for-incide
> nt-cells-tp4660713.html Sent from the cgal-discuss mailing list archive at
> Nabble.com.



--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/


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