Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] vertex methods problem

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] vertex methods problem


Chronological Thread 
  • From: Marco Aurelio Sterpa <>
  • To:
  • Subject: Re: [cgal-discuss] vertex methods problem
  • Date: Sat, 26 Sep 2009 16:30:02 +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=yAEuwyDqv/30c/mPyrAXQ2wPbf5YMqJv/Y3BOhkBc6QHw7t1gcKE4ytda46gJ8IHQE EbVyjs/wy7C1UK0a8QzFYK+SzBCCuFf+Xx6+Utg2pvcguKCDELypZkbZ3pqFl/KE4yb1 ebkTVs0qyN5Z5nzihAaR+Pl8paQJgZ7UHR4UU=

I didn't know it's better to use halfedge_handle to iterate on the edges.

2009/9/26 <>
Quoting "Marco Aurelio Sterpa" <>:

I use that vector<Halfedge> to save the levels of the arrangements. Anyway
I've to change the structure used to mantain the arrangement while declare
this?

typedef CGAL::Arrangement_2<Traits_2>                Arrangement_2;

I meant to say: Why do you maintain a vector of halfedges and not a vector of halfedge handles?



2009/9/26 <>

You cannot access the method vertex(), cause there is no such a method in
the arrangement halfedge nested class. (The Dcel halfedge does have a method
called vertex()). Please refer to the manual.

Beside, why do you maintain a vector of halfedges and of halfedges handles?

Quoting Sterpa <>:

 I've tried also this:
void algorithm_2(vector<Line_2> lines, int k) {
      CGAL::Geomview_stream gv(CGAL::Bbox_3(-100, -100, -100, 600, 600,
600));
      gv.set_line_width(2);
      gv.set_bg_color(CGAL::WHITE);
      gv.set_face_color(CGAL::BLACK);
      gv.set_vertex_radius(5);

      Arrangement_2 arr = getArrangement(lines);
      Edge_iterator ei;
      vector<Halfedge> levels[lines.size()];

     for(ei = arr.edges_begin(); ei != arr.edges_end(); ei++) {
             int i = getLevel(*ei, lines);
            levels[i].push_back(*ei);
}

int getLevel(Halfedge e, vector<Line_2> lines) {
      int k = 0;
      double x;
      e.vertex();

      ........
}

and I get the following error:

/usr/local/include/CGAL/Arrangement_on_surface_2.h: In function ‘int
getLevel(Halfedge, std::vector<CGAL::Line_2<CGAL::Simple_cartesian<double>
>,
std::allocator<CGAL::Line_2<CGAL::Simple_cartesian<double> > > >)’:
/usr/local/include/CGAL/Arrangement_on_surface_2.h:736: error: ‘typename
TopTraits_::Dcel::Vertex* CGAL::Arrangement_on_surface_2<GeomTraits_,
TopTraits_>::Halfedge::vertex() [with GeomTraits_ =
CGAL::Arr_linear_traits_2<CGAL::Simple_cartesian<double> >, TopTraits_ =

CGAL::Arr_unb_planar_topology_traits_2<CGAL::Arr_linear_traits_2<CGAL::Simple_cartesian<double>

,


CGAL::Arr_default_dcel<CGAL::Arr_linear_traits_2<CGAL::Simple_cartesian<double>

> >]’ is private

arrangement.cpp:214: error: within this context

It seems I cannot access the method vertex() of the halfedge structure, so
I
can proceed with this?--
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




Archive powered by MHonArc 2.6.16.

Top of Page