Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Edge/Facet Iterator

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Edge/Facet Iterator


Chronological Thread 
  • From: Daniel Duque Campayo <>
  • To:
  • Subject: Re: [cgal-discuss] Edge/Facet Iterator
  • Date: Wed, 15 Oct 2008 12:23:31 +0200

Hi,

> But this doesn`t exist. I don`t find it in the maunal and the compiler
> only gives me two possibilities to define a segment:
> Segment t.segment( Edge e)
> Segment t.segment( const Cell handle c, int i, int j)

You're in 3D then.

> So plz tell me how can I get the edges/segments of a face where the face
> should be a triangle? A small example woulb be very nice.

Well, if the facet is numbered i, i is also the index of the vertex of the
cell that is _not_ contained in the facet, the one across. You could get the
segments thus:

Segment s1=t.segment( c , (i+1)%4 , (i+2) %4)
Segment s2=t.segment( c , (i+2)%4 , (i+3) %4)
Segment s3=t.segment( c , (i+3)%4 , (i+1) %4)

The "mod 4", %4, takes care of the cyclic numbering.

Best,

Daniel

--
Daniel Duque
http://rincon.uam.es/dir?cw=950067138671875



Archive powered by MHonArc 2.6.16.

Top of Page