Subject: CGAL users discussion list
List archive
- From: Efraim Fogel <>
- To:
- Subject: Re: [cgal-discuss] Arrangement_2 missing edges
- Date: Mon, 05 Jul 2010 10:50:32 +0300
An x-monotone polyline, which is the embedding of a SINGLE arrangement
edge, could comprise of several line segments. It sems to me that in
your drawing you simply connected the endpoints of the x-monotone
polylines in the arrangement with a line segments, while in fact some
(or all) comprise of several line segments.
Richard Procter wrote:
> Hi there,
>
> I am having some difficulties with Arrangement_2.
>
> Here's the problem: some of the input polylines are missing edges in
> the arrangement (e.g. the top right of the diagram in the attached PDF).
>
> As I am new to CGAL, I'm unsure whether it is expected behaviour or
> whether I am simply misusing the class somehow.
>
> Can someone confirm that it shouldn't be doing what I'm seeing? Are
> there any gotchas I should know about in the way I'm using it?
>
> many thanks,
> Richard.
>
>
>
>
>
> My type definitions are as follows:
>
> typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
> typedef Kernel::FT Number_Type;
>
> typedef CGAL::Arr_segment_traits_2<Kernel> Segment_Traits_2;
> typedef CGAL::Arr_polyline_traits_2<Segment_Traits_2> Traits_2;
>
> typedef Traits_2::Point_2 Point_2;
> typedef Traits_2::Curve_2 Polyline_2;
>
> typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
> typedef CGAL::Polygon_2<Kernel> Polygon_2;
>
> I create polylines and insert them into the arrangement as follows:
>
> std::list<Point_2> points;
> double x, y;
> [...]
> points.push_back(Point_2(Number_Type(x), Number_Type(y)));
> [...]
> CGAL::insert(*self->arrangement, Polyline_2(points.begin(),
> points.end()));
>
> CGAL version is 3.6 on Debian Linux (Lenny) installed from
> ftp.mpi-sb.mpg.de
> Code (it is part of a python module) is compiled by gcc 4.3.2 via:
>
> g++ -O3 -D_REENTRANT -frounding-math -Wall -fPIC
> -I/usr/include/python2.5 -c arrangementmodule.cc -o arrangementmodule.o
>
> g++ -shared arrangementmodule.o -rdynamic -lCGAL_Core -lCGAL -lgmpxx
> -lmpfr -lgmp -lboost_thread-mt -o arrangement.so
>
>
>
>
>
>
>
>
>
>
--
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
- [cgal-discuss] Arrangement_2 missing edges, Richard Procter, 07/05/2010
- Re: [cgal-discuss] Arrangement_2 missing edges, Ophir Setter, 07/05/2010
- Re: [cgal-discuss] Arrangement_2 missing edges, Efraim Fogel, 07/05/2010
- Re: [cgal-discuss] Arrangement_2 missing edges, Richard Procter, 07/05/2010
Archive powered by MHonArc 2.6.16.