Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Retrieving Subconstraints in CDTplus

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Retrieving Subconstraints in CDTplus


Chronological Thread 
  • From: Damian Sheehy <>
  • To:
  • Subject: Re: [cgal-discuss] Retrieving Subconstraints in CDTplus
  • Date: Mon, 11 May 2009 11:36:32 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=dvcgvEh5OOUgwdox7xv1JIn5spwlwV7AGdYhVxQGC4H1Q3UWrytyQaABIV/F9CwP5L XcvazD6wAlycCUDg0kOtWAZbr1Dzt+iD1e5cZQNb+svl/RKVouMKAnmN1YS1Ze3Obk/0 oy5+39aeN1NPoOdcCmvEkrt7JAWdYgLA9tR9s=

Hi Matthias,

I believe it's a bug in the documentation.
Can someone from the CGAL dev team confirm?

Try this. . . .

CDTplus::Vertex_handle v1, v2;

for (CDTplus::Subconstraint_
iterator c_it = cdt.subconstraints_begin(); c_it != cdt.subconstraints_end(); ++c_it)
{
        v1 = c_it->first.first;
        v2 = c_it->first.second;
}


Regards,

Damian


On Mon, May 11, 2009 at 6:40 AM, Matthias Teich <> wrote:
Hi again!

I am still looking for a way to retrieve the vertex_handles from a subconstraint in a constrained triangluation plus.

Any hints are really appreciated.

Best Regards,
Matthias


Matthias schrieb:
Hi!

The documentation says:

"Constrained triangulation plus 2<Tr>:: Subconstraint iterator
An iterator to visit all the sub-constraints of the triangulation.
The order of visit is arbitrary. The value type of this iterator is
a pair std::pair<Vertex handle, Vertex handle> corresponding
to the vertices of the sub-constraint"

So I thought the following should work:

for (CDTplus::Subconstraint_iterator c_it = cdt.subconstraints_begin(); c_it != cdt.subconstraints_end(); ++c_it)
{
      std::pair<CDTplus::Vertex_handle,CDTplus::Vertex_handle> pair = *c_it;
      // do sth with pair
}

Can anyone explain how I can retrieve the subconstraints?

What follows is the lengthy error message from visual studio:

::CC_iterator<DSC,Const>::CC_iterator(const CGAL::CGALi::CC_iterator<DSC,Const> &)' : cannot convert parameter 1 from 'const std::pair<_Ty1,_Ty2>' to 'const CGAL::CGALi::CC_iterator<DSC,Const> &'
1>        with
1>        [
1>            DSC=CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vb,Fb>>>>,
1>            Const=false
1>        ]
1>        and
1>        [
1>            _Ty1=CGAL::CGALi::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vb,Fb>>>>,false>,
1>            _Ty2=CGAL::CGALi::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vb,Fb>>>>,false>
1>        ]
1>        and
1>        [
1>            DSC=CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vb,Fb>>>>,
1>            Const=false
1>        ]
1>        Reason: cannot convert from 'const std::pair<_Ty1,_Ty2>' to 'const CGAL::CGALi::CC_iterator<DSC,Const>'
1>        with
1>        [
1>            _Ty1=CGAL::CGALi::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vb,Fb>>>>,false>,
1>            _Ty2=CGAL::CGALi::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vb,Fb>>>>,false>
1>        ]
1>        and
1>        [
1>            DSC=CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vb,Fb>>>>,
1>            Const=false
1>        ]
1>        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>        .\MeshOffsetter.cpp(534) : see reference to function template instantiation 'std::pair<_Ty1,_Ty2>::pair<const _Kty,_Ty>(const std::pair<const _Kty,_Ty> &)' being compiled
1>        with
1>        [
1>            _Ty1=CGAL::CGALi::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vb,Fb>>>>,false>,
1>            _Ty2=CGAL::CGALi::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vb,Fb>>>>,false>,
1>            _Kty=std::pair<CGAL::CGALi::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vb,Fb>>>>,false>,CGAL::CGALi::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vb,Fb>>>>,false>>,
1>            _Ty=std::list<CGAL::Constraint_hierarchy_2<CGAL::CGALi::CC_iterator<CGAL::Compact_container<CGAL::Triangulation_vertex_base_2<Kernel,CGAL::Triangulation_ds_vertex_base_2<CGAL::Triangulation_data_structure_2<Vb,Fb>>>>,false>,bool>::H_context> *
1>        ]

------------------------------------------------------------------------


Eingehende eMail ist virenfrei.
Von AVG überprüft - www.avg.de Version: 8.5.325 / Virendatenbank: 270.12.23/2106 - Ausgabedatum: 05/09/09 06:54:00
 

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




Archive powered by MHonArc 2.6.16.

Top of Page