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:23:22 +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=PQ49ux3MM2t9o3lCe3BA6pF4K2QaNAr5XVOZc6MxFF/yyGow7Qn8PW4P8vhanZZ/iB FIgZejJ8l0qXKcDe/xpcK1n1I8nGVh8lyzgQs7n7YOZH9wqmtxLN+vAmPpwV7c6EieQ7 kTVzpj6nYvLFVospmhsYPZM/9LLu4F4ZugRZE=

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;

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




Archive powered by MHonArc 2.6.16.

Top of Page