Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Arrangement_2 missing edges

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Arrangement_2 missing edges


Chronological Thread 
  • From: Ophir Setter <>
  • To:
  • Subject: Re: [cgal-discuss] Arrangement_2 missing edges
  • Date: Mon, 5 Jul 2010 10:25:13 +0300
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; b=UlS57j0zDd2PuhnRK8kIRJw1r/IgnwjzgdwfoXJjHlOU8U3dGhwQ5xcglCQfPKwA0H w5da1q3pmy8tvbvJBMsputlMs4lIoAoF+UsplTu7dL9f2vWcSc7o8NJsfVWYRyls4+bm ZV4DgjjlvMfoVVclWduejfkE3ViSAgWO3a8EI=

I don't see missing polylines.
You probably use the functions correctly, but I can't be sure from these few lines of code.




On Mon, Jul 5, 2010 at 2:46 AM, 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.



--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




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















Archive powered by MHonArc 2.6.16.

Top of Page