Subject: CGAL users discussion list
List archive
- From: Mohamed Yousef <>
- To:
- Subject: Re: [cgal-discuss] indices of faces, halfedges, vertices
- Date: Tue, 27 Apr 2010 14:52:27 +0200
- 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=o+lNVFX4Jf05x9WK/jFUwxkOPtlOib5im8MQmnmBSloQuoK/lj/BDNVM9tcmfo5yaT cMoLvprif55sKR/cyYO/ackOdLuD34N13Tj2II3c4nUp9UVt44XMrKSOiRlCTf5HIFn4 y4L4yWa353EFCaKeqgFqL6YeqAmGd7GH2UI2A=
The real problem with solutions like this , is that it's built by hand
and every time you update P , you will have to go through the very lengthy process of updating id's
the only real solution is to use Vector based Polyhedron's instead of List ones , but those are limited and more importantly
doesn't support deleting nodes
this problem is a real weak point of cgal , facing applications that require regular , random update of Polyhedron and need random access / indices
Regards,
Mohamed Yousef
and every time you update P , you will have to go through the very lengthy process of updating id's
the only real solution is to use Vector based Polyhedron's instead of List ones , but those are limited and more importantly
doesn't support deleting nodes
this problem is a real weak point of cgal , facing applications that require regular , random update of Polyhedron and need random access / indices
Regards,
Mohamed Yousef
On 27 April 2010 14:45, <> wrote:
Thank you.
Le 27/04 - 14:02, Sebastien Loriot (GeometryFactory) a écrit :
> wrote:
> >It's what I want.
> >But it seems that by default the vertex class has no member id.
> >Is there an option ?
>
> Have a look at this item class
> CGAL/Polyhedron_items_with_id_3.h
>
> Facets, halfedges and vertices will have an id.
>
> S.
>
> >
> >Le 27/04 - 11:49, Sebastien Loriot (GeometryFactory) a écrit :
> >> wrote:
> >>>I have a polyhedron P.
> >>>And I want to associate to each face an index : the distance from
> >>>P->facets_begin() to the iterator pointing to the face (for example).
> >>>
> >>>Now, given a halfedge h, I would like to know the number of h.facets().
> >>>I tried std::distance(P.facets_begin(), h.facets()) but it doesn't work
> >>>since one is an iterator and the other a handle.
> >>>
> >>>Is there a simple way to do that ?
> >>>
> >>Is something like this a correct solution for your problem?
> >>
> >>unsigned i=0
> >>for (Polyhedron::Facet_iterator
> >>it=P.facets_begin();it!=P.facets_end();++it){
> >> it->id()=i++;
> >>}
> >>
> >>S.
> >
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- [cgal-discuss] indices of faces, halfedges, vertices, cc . ld, 04/27/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, Sebastien Loriot (GeometryFactory), 04/27/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, cc . ld, 04/27/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, Sebastien Loriot (GeometryFactory), 04/27/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, cc . ld, 04/27/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, Mohamed Yousef, 04/27/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, Sebastien Loriot (GeometryFactory), 04/27/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, Mohamed Yousef, 04/27/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, Sebastien Loriot (GeometryFactory), 04/28/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, Mohamed Yousef, 04/29/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, Sebastien Loriot (GeometryFactory), 04/27/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, Mohamed Yousef, 04/27/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, cc . ld, 04/27/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, Sebastien Loriot (GeometryFactory), 04/27/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, cc . ld, 04/27/2010
- Re: [cgal-discuss] indices of faces, halfedges, vertices, Sebastien Loriot (GeometryFactory), 04/27/2010
Archive powered by MHonArc 2.6.16.