Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Arrangement changes between 3.1 and 3.3.1

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Arrangement changes between 3.1 and 3.3.1


Chronological Thread 
  • From: Martin Baeker <>
  • To:
  • Subject: Re: [cgal-discuss] Arrangement changes between 3.1 and 3.3.1
  • Date: Wed, 26 Sep 2007 13:26:48 +0200 (CEST)
  • Organization: Institut fuer Werkstoffe TU Braunschweig

Dear efi,

I'm really sorry for being too stupid by half, but I just cannot find
where the release notes are.
Are they in the manual somewhere? I
could find neither a chapter nor an index entry called release notes.

Sorry for being a bother,

Martin.

> Dear Martin,
>
> The interface went through a few more changes since the last time you were
> using it. For starters, the 'arr.insert[_blah](...)' member functions were
> replaced by corresponding free functions 'insert[_blah](arr, ...)'. All
> differences are listed in the release notes. The manual was enhanced, and
> many
> examples were introduced including some that show how to construct and
> maintain arrangements with history.
>
> Martin Baeker wrote:
> > Dear Efi,
> >
> > probably I am doing something stupid, but it still does not
> > work. Here's the full program, copied almost directly from the 3.1
> > manual and replacing Arrangement_2 with Arrangement_with_history_2:
> >
> > #include <iostream>
> > // CGAL stuff
> > #include <CGAL/Cartesian.h>
> > #include <CGAL/Quotient.h>
> > #include <CGAL/MP_Float.h>
> > #include <CGAL/Point_2.h>
> > #include <CGAL/enum.h>
> > #include <CGAL/intersections.h>
> > #include <CGAL/Arr_segment_traits_2.h>
> > #include <CGAL/Arr_default_dcel.h>
> > #include <CGAL/Arrangement_with_history_2.h>
> >
> > typedef CGAL::Quotient<CGAL::MP_Float> NT;
> > typedef CGAL::Cartesian<NT> TutorialR;
> > typedef CGAL::Arr_segment_traits_2<TutorialR> Traits;
> > typedef Traits::Point_2 Point_2;
> > typedef Traits::Curve_2 Curve_2;
> > typedef Traits::X_monotone_curve_2
> > X_monotone_curve_2;
> >
> > typedef CGAL::Arrangement_with_history_2<Traits> Arr_2;
> > int main() {
> > Arr_2 arr;
> > //insertion of the curves
> > arr.insert(Curve_2(Point_2(0, 0), Point_2(1, 1)));
> > arr.insert(Curve_2(Point_2(0, 1), Point_2(1, 0))); //traversal of the
> > curves
> > Arr_2::Curve_iterator cit;
> > Arr_2::Edge_iterator eit;
> > for (cit = arr.curve_node_begin(); cit != arr.curve_node_end(); ++cit) {
> > std::cout << std::endl << "Curve level:" << std::endl << cit->curve()
> > << std::endl ;
> > std::cout << "Edge level:" << std::endl;
> >
> > //traversal of the edges of the current curve
> > for (eit = cit->edges_begin(); eit != cit->edges_end(); ++eit) {
> > std::cout << eit->x_curve() << std::endl ;
> > }
> > }
> > return 0;
> > }
> >
> >
> > Still, when I'm trying to compile this, I get the same error messages as
> > before:
> >
> > minitest.C:26: Fehler: »class Arr_2« hat kein Element namens »insert«
> > minitest.C:27: Fehler: »class Arr_2« hat kein Element namens »insert«
> > minitest.C:31: Fehler: »class Arr_2« hat kein Element namens
> > »curve_node_begin«
> > minitest.C:31: Fehler: »class Arr_2« hat kein Element namens
> > »curve_node_end
> > «
> > minitest.C:33: Fehler: »class
> > CGAL::Arrangement_with_history_2<CGAL::Arr_segment_traits_2<CGAL::Cartesian<CGAL::Quotient<CGAL::MP_Float>
> > > >,
> > CGAL::Arr_default_dcel<CGAL::Arr_segment_traits_2<CGAL::Cartesian<CGAL::Quotient<CGAL::MP_Float>
> > > > > >::Curve_halfedges« hat kein Element namens »curve«
> > ...
> >
> > If you have any hint what I am doing wrong, I'd be grateful.
> >
> > Thanks a lot,
> >
> > Martin.
> >
> >
> >
> >
> > > The functionality to are referring to (iterating over the curves) has
> > > been preserved, but it is part of the arrangement with history data
> > > structure. In the past We use to have Planar_map_2 and Arrangement_2.
> > > These were replaced by Arrangement_2 and Arrangement_with_history_2, so
> > > simply define the type Arr_2 to be Arrangement_with_history_2<...>
> > >
> > > Martin Baeker wrote:
> > >
> > > > Dear experts,
> > > >
> > > > I am currently updating my code from version 3.1 to 3.3.1.
> > > >
> > > > In between, the Arrangement_2-class has changed drastically and I am
> > > > missing the old possibility of iterating over the curves of an
> > > > Arrangement:
> > > >
> > > > Old code (taken almost directly from the 3.1 manual)
> > > >
> > > > Arr_2 pm;
> > > > // Trial: Insert the segments one by one
> > > > pm.insert(seglist.begin(), seglist.end());
> > > > for (unsigned int i=0; i< seglist.size(); i++)
> > > > pm.insert_curve(seglist[i]);
> > > > std::cout << "\n\nWriting pm's halfedges" << std::endl;
> > > > Arr_2::Edge_iterator eit;
> > > > Arr_2::Curve_iterator cit;
> > > > unsigned int edgeCounter=0;
> > > > for (cit = pm.curve_node_begin(); cit != pm.curve_node_end(); ++cit)
> > > > {
> > > > std::cout << std::endl << "Curve level:" << std::endl <<
> > > > cit->curve()
> > > > << std::endl ;
> > > > std::cout << "Edge level:" << std::endl;
> > > > edgeCounter++;
> > > > for (eit = cit->edges_begin(); eit != cit->edges_end(); ++eit) {
> > > > std::cout << eit->x_curve() << std::endl ;
> > > > }
> > > > }
> > > >
> > > > However, this does not work anymore because there is no
> > > > Arr_2::Curve_iterator class anymore. I searched through the Docs but
> > > > could not find how this can be replaced with another iterator.
> > > > Is it still possible to traverse the Curves of an Arrangement?
> > > >
> > > > Thanks a lot in advance,
> > > >
> > > > Martin.
> > > >
> > > >
> > > > Priv.-Doz. Dr. Martin Bäker
> > > > Institut für Werkstoffe
> > > > Technische Universität Braunschweig
> > > > Langer Kamp 8
> > > > 38106 Braunschweig
> > > > Germany
> > > > Tel.: 00-49-531-391-3073
> > > > Fax 00-49-531-391-3058
> > > > e-mail
> > > > <>--
> > > >
> > > > 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
> > >
> > >
> >
> > Priv.-Doz. Dr. Martin Bäker
> > Institut für Werkstoffe
> > Technische Universität Braunschweig
> > Langer Kamp 8
> > 38106 Braunschweig
> > Germany
> > Tel.: 00-49-531-391-3073
> > Fax 00-49-531-391-3058
> > e-mail
> > <>--
> >
> > 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
>
>

Priv.-Doz. Dr. Martin Bäker
Institut für Werkstoffe
Technische Universität Braunschweig
Langer Kamp 8
38106 Braunschweig
Germany
Tel.: 00-49-531-391-3073
Fax 00-49-531-391-3058
e-mail
<>


Archive powered by MHonArc 2.6.16.

Top of Page