Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] i'm confused about the Edge

Subject: CGAL users discussion list

List archive

[cgal-discuss] i'm confused about the Edge


Chronological Thread 
  • From: "Bill Conan" <>
  • To:
  • Subject: [cgal-discuss] i'm confused about the Edge
  • Date: Fri, 20 Jun 2008 13:29:37 +0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=hFy7QNhELK2B6v3vulK46jS/bkiltBQnTCL38stx2P6fgjdKYzz6wIknrfQyMhejLH e6+H3l/2C6q016EIge8MVeD0MQUnKF0FSlZo5hxUSXkjqk0QlkrrnnBcTury7GEulzME rjEIv2xXtXhfxkKExu4mUIEmAQEYs56GPa2Ww=

hello guys,

i'm a little confused with the Edge. is there any Edge data structure
that is explicitly implemented in the CGAL?

look at the Polyhedron_items_3 class, there are only vertex, halfedge
and face data structures, but no "Edge"

class Polyhedron_item_3
{

struct Vertex_wrapper{}
struct Halfedge_wrapper{}
struct Face_wrapper{}

}


my problem is i need to add some attribute to the Edge like this:

struct My_edge: public CGAL::HalfedgeDS_halfedge_base<Refs>
{
Color edgeColor;
};


but i'm wondering, if i travel all the edges in this way, and give
each edge a color

typedef Polyhedron::Edge_iterator Edge_iterator;

Edge_iterator iter=p.edges_begin();
Edge_iterator iterEnd=p.edges_end();

for(iter!=iterEnd;++iter)
{
(*iter)->edgeColor=CGAL::RED;
}


then is that true that only half of the half-edges are assigned the color red?

and which half-edge of the two half-edges of an Edge can be visited by
the edge iterator? is there any rule behind?


say if at the beginning i let all the edges in red. and then i split
some random edges of the geometry.
and i assign the all the splitted edge to be in red too.

and now i if i travel all the edges again,


typedef Polyhedron::Edge_iterator Edge_iterator;

Edge_iterator iter=p.edges_begin();
Edge_iterator iterEnd=p.edges_end();

for(iter!=iterEnd;++iter)
{
is (*iter)->edgeColor == CGAL::RED;
}

can i make sure all the edges i traveled are in red?



Archive powered by MHonArc 2.6.16.

Top of Page