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: Tue, 29 Sep 2009 15:53:58 +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=S/UwfoOSuSTfkgI34WRKU8u5qrZm2vtcEiceeANLZUc8cIkxLuEzcoouUQL1szRvv2 QwioXPuC4a5RPl9whUEkFJeoifXDgjpevapW5SEGsM4l33VZCJbEmAhV8VHxiX86J4tQ pRv1qYvvyeKLZLTLJukMHNMxo2gBL0OPEfmuw=

Thanks for the suggestion I'll use that in future. Best regards

2009/9/29 Efraim Fogel <>
Marco Aurelio Sterpa wrote:
> I didn't know it's better to use halfedge_handle to iterate on the edges.
This is not what I said. You have to use an iterator to iterate, and a
Halfedge iterator is convertible to a Halfedge_handle. Anyhow, what I
did say was that it was better to store objects of type Halfedge_handle
rather than objects of type Halfedge.
>
> 2009/9/26 < <mailto:>>
>
>     Quoting "Marco Aurelio Sterpa" <
>     <mailto:>>:
>
>         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 < <mailto:>>
>
>             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 <
>             <mailto:>>:
>
>              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
>
>

--
 ____  _        ____             _
 /_____/_) o    /__________  __  //
(____ (   (    (    (_/ (_/-(-'_(/
                       _/

--
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