Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] CGAL Intersection Error

Subject: CGAL users discussion list

List archive

[cgal-discuss] CGAL Intersection Error


Chronological Thread 
  • From: Flaminigo <>
  • To:
  • Subject: [cgal-discuss] CGAL Intersection Error
  • Date: Sun, 25 Oct 2009 16:26:23 -0700 (PDT)


I use
OutputIterator
intersection ( Polygon_2<Kernel, Container> p1,
Polygon_2<Kernel, Container> p2,
OutputIterator oi)
to compute intersection of two polygons. How ever it reports errors when
computing the following two data:

Point data [] = {
Point
(0.0779032708430652393039039793621,0.122371377632631991860812092909
),
Point (13.2581684036192424258615574217,
0.959769766188581341381791389722
),
Point (1.83288664437794701633777094685
,0.617138373712451504538023527857
),
Point (0.693014198934081226965986388677
,0.39778520059801764086060416048
),
Point (0.463650350407879274783340406429
,0.340347544290135750610915010839
),
Point (0.0922023183796141926338307825972,
0.229473196453353733836877381691),
Point( 0.0727179173985912918887208888918
,0.195167801755973285837697517309)
};

Polygon p2(data, data + 4);

Point points_b[] = { Point(0,0), Point(10,0), Point(10,20), Point(0,20)};
Polygon p1 (points_b, points_b+4);

std::ostringstream ostr(std::ostringstream::out);
std::ostream_iterator<Polygon_h> sit = ostr;
intersection(p1, p2, sit);

My kernel is
typedef CGAL::Cartesian<double> K;
typedef CGAL::Polygon_2<K>
Polygon;
typedef CGAL::Polygon_with_holes_2<K>
Polygon_h;

The error is
CGAL error: assertion violation!
Expr: *slIter == curve
File: /usr/include/CGAL/Basic_sweep_line_2.h
Line: 675
Explanation:
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: *slIter == curve
File: /usr/include/CGAL/Basic_sweep_line_2.h
Line: 675
Aborted



--
View this message in context:
http://www.nabble.com/CGAL-Intersection-Error-tp26052948p26052948.html
Sent from the cgal-discuss mailing list archive at Nabble.com.




Archive powered by MHonArc 2.6.16.

Top of Page