Subject: CGAL users discussion list
List archive
- From: "samuel kim" <>
- To: <>
- Subject: RE: [cgal-discuss]To understand half edge data structure
- Date: Wed, 7 May 2008 16:53:45 +0200
- Organization: Purdue
I found a simple solution for my case, just changed the type of pHalfedge
from Halfedge_around_facet_circulator to Halfedge_handle, then it works
fine for the line,
pHalfedge = pHalfedge->prev()->opposite()
Thank you though.
Samuel
-----Original Message-----
From: samuel kim
[mailto:]
Sent: Wednesday, May 07, 2008 3:57 PM
To:
Subject: RE: [cgal-discuss]To understand half edge data structure
Hi Mathieu,
I am sorry that there was a mistake. It works now fine. Thanks. But is there
any way to give the handle back to pHalfedge? , because I need to use
pHalfedge continuously in my program.
pHalfedge_new = pHalfedge->prev()->opposite() then how can I give the new
handle back to pHalfedge?
pHalfedge = ?
Thank you in advance.
Samuel
-----Original Message-----
From: samuel kim
[mailto:]
Sent: Wednesday, May 07, 2008 3:35 PM
To:
Subject: RE: [cgal-discuss]To understand half edge data structure
Hi Mathieu,
It is not working with the same error.
I tried again as follows,
Halfedge_handle pHalfedge_new(pHalfedge->prev()->opposite());
For more understanding, I amd using CGAL::Polyhedron_3 with Polyhedron_3.h.
Is there anything else should be included?
Samuel
-----Original Message-----
From:
[mailto:]
Sent: Wednesday, May 07, 2008 3:26 PM
To:
Subject: Re: [cgal-discuss]To understand half edge data structure
samuel kim wrote:
> Hi Mathieu,
>
> I tried both as you said, but the same error comes out.
>
> Sam
> -----Original Message-----
> From:
>
>
> [mailto:]
> On Behalf Of Mathieu
> Bredif
> Sent: Wednesday, May 07, 2008 3:13 PM
> To:
>
> Subject: Re: [cgal-discuss]To understand half edge data structure
>
> you cannot assign an handle to a circulator, either construct a new
> circulator or affect the handle to an handle :
the same explanation is still valid, but:
> Halfedge_around_facet_circulator
> pHalfedge_new(pHalfedge->prev()->opposite());
there is a copy-paste mistake here, the explanation above allows to
easily fix it... :
Halfedge_handle
pHalfedge_new(pHalfedge->prev()->opposite());
> or
> Halfedge_handle pHalfedge_new = pHalfedge->prev()->opposite();
this should work
Monique Teillaud
>
> Mathieu
>
>
>
>> On Wed, May 7, 2008 at 2:57 PM, samuel kim
>> <>
>> wrote:
>> > Hi Mathieu and Janssens,
>> >
>> > Thank you very much for your reply, I think you are right. So I tried
>
> it but
>
>> > an error coming out.
>> > When I run as the below,
>> >
>> > Halfedge_around_facet_circulator pHalfedge = pFacet->facet_begin();
>> > pHalfedge = pHalfedge->prev()->opposite();
>> >
>> > error C2679: binary '=' : no operator found which takes a right-hand
>
> operand
>
>> > of type 'CGAL::CGALi::In_place_list_iterator<T,Alloc>' (or there is no
>> > acceptable conversion)
>> >
>> > Would you mind if I ask you one more time How can I solve this?
>> >
>> > Samuel
>> >
>> > -----Original Message-----
>> > From:
>> >
>> >
>> > [mailto:]
>> > On Behalf Of
>
> Mathieu
>
>> > Bredif
>> > Sent: Wednesday, May 07, 2008 2:34 PM
>> > To:
>> >
>> > Subject: Re: [cgal-discuss]To understand half edge data structure
>
> (VERY
>
>> > IMPORTANT)
>> >
>> > Hi,
>> > the facet_begin() halfedge is arbitrary, your mistake is to assume
>> > that facet2->facet_begin() is a particular halfedge handle.
>> > My advice is to stay with halfedges without using the intermediate
>
> face
>
>> > handles:
>> >
>> > A C = AB->prev()->opposite()
>> > A'C = AC->next_on_vertex() // or more verbosely AB->next()->opposite()
>> >
>> > Mathieu
>> >
>> > On Wed, May 7, 2008 at 1:58 PM, samuel kim
>> > <>
>
> wrote:
>
>> > > Hi all,
>> > >
>> > > I am struggling in an implementation with the half edge data
>
> structure.
>
>> > What I want to do is to travel the triangles from triangle# 1 to
>
> triangle# 3
>
>> > as shown at attached picture. For this, I read CGAL document and
>
> implemented
>
>> > based on what I understood. But result is not going to triangle# 3 but
>
> going
>
>> > back to triangle# 1 from triangle#2. The below is the source code I
>
> tried.
>
>> > >
>> > > Facet_handle hf_new;
>> > > Facet_iterator pFacet = facets_begin();
>> > > Halfedge_around_facet_circulator pHalfedge = pFacet->facet_begin();
>
> //
>
>> > expecting to get the handle of half_edge1 on triangle#1
>> > >
>> > > hf_new = pHalfedge->prev()->opposite()->facet(); // expecting to
>
> get the
>
>> > handle of facet of triangle#2
>> > > pHalfedge = hf_new->facet_begin(); // expecting to get the handle
>
> of
>
>> > half_edge2 in the triangle#2
>> > >
>> > > hf_new = pHalfedge->next()->opposite()->facet(); // expecting to
>
> get the
>
>> > handle of facet of triangle#3
>> > > pHalfedge = hf_new->facet_begin(); // expecting to get the handle
>
> of
>
>> > half_edge2 on the triangle#3
>> > >
>> > >
>> > > If I did as the above, the handle of facet was that of triangle#1.
>
> So I
>
>> > want to ask you a question, when I do this,
>> > > hf_new = pHalfedge->prev()->opposite()->facet(); //
>
> expecting to
>
>> > get the handle of facet of triangle#2
>> > > pHalfedge = hf_new->facet_begin(); // expecting to get the
>
> handle
>
>> > of half_edge2 in the triangle#2
>> > > Which edge handle should be returned in triangle#2?
>> > > And what is the base rule to get to know the exact pointer of the
>
> handle
>
>> > of half_edge data structure whenever travel triangles? Because I have
>
> tried
>
>> > many times, and found that the pointer of handle of half_edge data
>
> structure
>
>> > was varying at each triangle which was not expectable.
>> > >
>> > > Thank you for your help.
>> > >
>> > > Samuel
>> > >
>> > >
>> > > --
>> > > 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
>> >
>> > --
>> > 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
--
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
- Re: [cgal-discuss] CGALimageIO supports more formats to load origin information, (continued)
- Re: [cgal-discuss] CGALimageIO supports more formats to load origin information, Laurent Rineau, 05/07/2008
- [cgal-discuss]To understand half edge data structure (VERY IMPORTANT), samuel kim, 05/07/2008
- Re: [cgal-discuss]To understand half edge data structure (VERY IMPORTANT), Bart Janssens, 05/07/2008
- Re: [cgal-discuss]To understand half edge data structure (VERY IMPORTANT), Mathieu Brédif, 05/07/2008
- RE: [cgal-discuss]To understand half edge data structure, samuel kim, 05/07/2008
- Message not available
- Re: [cgal-discuss]To understand half edge data structure, Mathieu Brédif, 05/07/2008
- RE: [cgal-discuss]To understand half edge data structure, samuel kim, 05/07/2008
- Re: [cgal-discuss]To understand half edge data structure, Monique . Teillaud, 05/07/2008
- RE: [cgal-discuss]To understand half edge data structure, samuel kim, 05/07/2008
- RE: [cgal-discuss]To understand half edge data structure, samuel kim, 05/07/2008
- RE: [cgal-discuss]To understand half edge data structure, samuel kim, 05/07/2008
- Re: [cgal-discuss]To understand half edge data structure, Mathieu Brédif, 05/07/2008
- Message not available
- RE: [cgal-discuss]To understand half edge data structure, samuel kim, 05/07/2008
- [cgal-discuss]To understand half edge data structure (VERY IMPORTANT), samuel kim, 05/07/2008
- Re: [cgal-discuss]To understand half edge data structure, Laurent Rineau, 05/07/2008
- Re: [cgal-discuss] CGALimageIO supports more formats to load origin information, Laurent Rineau, 05/07/2008
Archive powered by MHonArc 2.6.16.