Subject: CGAL users discussion list
List archive
- From: Gillian Ng <>
- To:
- Subject: [cgal-discuss] CGAL polygon intersection predicate - precondition exception!
- Date: Tue, 19 Jul 2011 02:46:56 -0700 (PDT)
I'm just trying to find out if two polygons intersect. However it gives this
error, which seems odd... I'm using CGAL 3.6.1 with Visual Studio .NET 2005.
----------
CGAL error: precondition violation!
Expression : ! _predP->is_valid() || comp_f(object, _predP->object) !=
SMALLER
File : d:\libs\cgal_vc8\include\cgal\multiset.h
Line : 2142
Explanation:
Refer to the bug-reporting instructions at
http://www.cgal.org/bug_report.html
----------
This is the code I wrote:
----------
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Polygon_2 <K> Polygon_2;
bool DoPolygonsIntersect( Polygon_2 &p1, Polygon_2 &p2 )
{
if ( CGAL::do_overlap( p1.bbox(), p2.bbox() ) )
{
if ( CGAL::do_intersect( p1, p2 ) )
{
return true;
}
}
return false;
}
----------
Please help! Thanks a lot guys.
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/CGAL-polygon-intersection-predicate-precondition-exception-tp3677725p3677725.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] CGAL polygon intersection predicate - precondition exception!, Gillian Ng, 07/19/2011
- Re: [cgal-discuss] CGAL polygon intersection predicate - precondition exception!, Gernot H. Gutschi, 07/19/2011
- Re: [cgal-discuss] CGAL polygon intersection predicate - precondition exception!, ravi teja, 07/19/2011
- [cgal-discuss] generating mesh from alpha shape, Farhad Bazyari, 07/19/2011
- Re: [cgal-discuss] generating mesh from alpha shape, Mariette Yvinec, 07/19/2011
- [cgal-discuss] Re: CGAL polygon intersection predicate - precondition exception!, Gillian Ng, 07/20/2011
- Re: [cgal-discuss] Re: CGAL polygon intersection predicate - precondition exception!, Sebastien Loriot (GeometryFactory), 07/20/2011
- [cgal-discuss] Re: CGAL polygon intersection predicate - precondition exception!, Gillian Ng, 07/21/2011
- Re: [cgal-discuss] Re: CGAL polygon intersection predicate - precondition exception!, Sebastien Loriot (GeometryFactory), 07/20/2011
- Re: [cgal-discuss] CGAL polygon intersection predicate - precondition exception!, Gernot H. Gutschi, 07/19/2011
Archive powered by MHonArc 2.6.16.