Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] An error when trying to compute intersection of polygons

Subject: CGAL users discussion list

List archive

[cgal-discuss] An error when trying to compute intersection of polygons


Chronological Thread 
  • From: BBB HHH <>
  • To: "cgal-discuss lists-sop.inria.fr" <>
  • Subject: [cgal-discuss] An error when trying to compute intersection of polygons
  • Date: Fri, 25 Sep 2009 09:44:36 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.fr; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=2NEKiTAD5hMoMYNVXWoGztXKyQI7Me+rhKaTV86dm+O7n86MSo5416F11PdO9CW34Z5BuJr3DNSxMDFLVIZg3zESqBpNXCajyXXbs62F6mE8olBaGa92U2bU6D8/ldy9mN2HG6fnGxAWqamRap/fBtruX33R2F+Wfeodic7iouE=;

Hello,

I am trying to compute the intersection of some polygons in 2D. For that purpose, i am using the 2D Regularized Boolean Set-Operations of CGAL 3.4. I am also using VS2005 under Windows XP SP3.

For some polygons which seemto be correct (CCW orientation, non-degenerate, simple, bounded), i have the following error:

CGAL error: precondition violation!
_expression_ : cv.is_in_x_range (p)
File       : c:\program files\cgal-3.4-beta1\include\cgal\arr_segment_traits_2.h

Line       : 481
Explanation:
Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html


I am using an exact kernel (CGAL::Simple_cartesian<CGAL::Lazy_exact_nt<Gmpq> >). The problematic line of code is that computing the intersection of some polygons

std::vector<Polygon_2>        polygons;
// Fill the list of polygons
// Initialize the polygon set with a polygon
Polygon_set_2 S(first_polygon);
S.intersection(polygons.begin(), polygons.end());

Thanks in advance for your help
Hichem Barki




Archive powered by MHonArc 2.6.16.

Top of Page