Subject: CGAL users discussion list
List archive
- From: Ben Supnik <>
- To:
- Subject: Re: [cgal-discuss] Another insert_curve & Arrangment problem
- Date: Sat, 31 Oct 2009 17:41:06 -0400
Does compiling with -frounding-math make any difference?
Ben Strasser wrote:
Hello,
the following Arrangement program crashes for me. What am I doing wrong?
#include <CGAL/Cartesian.h>
#include <CGAL/Arrangement_2.h>
#include <CGAL/Arr_segment_traits_2.h>
#include <CGAL/MP_Float.h>
#include <CGAL/Quotient.h>
typedef CGAL::Cartesian<CGAL::Quotient<CGAL::MP_Float> > Kernel;
typedef CGAL::Point_2<Kernel> Point;
typedef CGAL::Segment_2<Kernel> Segment;
typedef CGAL::Ray_2<Kernel> Ray;
typedef CGAL::Vector_2<Kernel> Vector;
typedef CGAL::Arrangement_2<CGAL::Arr_segment_traits_2<Kernel> >
Arrangement;
int main(){
Arrangement arr;
CGAL::insert_curve(arr, Segment(Point(3.12834,-1.30888), Point(-4.09958,2.70984)));
CGAL::insert_curve(arr, Segment(Point(3.12834,-1.30888), Point(-3.64611,-2.7549)));
CGAL::insert_curve(arr, Segment(Point(3.12834,-1.30888), Point(-3.47212,1.66325)));
CGAL::insert_curve(arr, Segment(Point(3.12834,-1.30888), Point(2.48026,0.00888205)));
CGAL::insert_curve(arr, Segment(Point(3.12834,-1.30888), Point(2.44273,0.214056)));
CGAL::insert_curve(arr, Segment(Point(3.12834,-1.30888), Point(0.973117,0.767958)));
CGAL::insert_curve(arr, Segment(Point(-4.09958,2.70984), Point(-3.64611,-2.7549)));
CGAL::insert_curve(arr, Segment(Point(-4.09958,2.70984), Point(-3.47212,1.66325)));
CGAL::insert_curve(arr, Segment(Point(-4.09958,2.70984), Point(2.48026,0.00888205)));
CGAL::insert_curve(arr, Segment(Point(-4.09958,2.70984), Point(5.07653,2.86381)));
CGAL::insert_curve(arr, Segment(Point(-4.09958,2.70984), Point(2.44273,0.214056))); // assert fires here
}
The error message is
CGAL error: assertion violation!
Expr: new_face != old_face
File: /usr/include/CGAL/Arrangement_2/Arrangement_2_functions.h
Line: 3282
Explanation:
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: new_face != old_face
File: /usr/include/CGAL/Arrangement_2/Arrangement_2_functions.h
Line: 3282
Aborted
I also tried the Exact_predicates_exact_constructions_kernel without GMP. The result is exactly the same.
I compile with
g++ -O0 foo.cpp -lCGAL -o foo
my compiler version is
g++ (Ubuntu 4.3.2-1ubuntu12) 4.3.2
I am uncertain as to what my exact cgal version is as I installed it through the package system. The package version is
3.3.1-2ubuntu1 (interpid)
Thanks for your time,
Ben Strasser
--
Scenery Home Page: http://scenery.x-plane.com/
Scenery blog: http://xplanescenery.blogspot.com/
Plugin SDK: http://www.xsquawkbox.net/xpsdk/
X-Plane Wiki: http://wiki.x-plane.com/
Scenery mailing list:
Developer mailing list:
- [cgal-discuss] Another insert_curve & Arrangment problem, Ben Strasser, 10/31/2009
- Re: [cgal-discuss] Another insert_curve & Arrangment problem, Ben Supnik, 10/31/2009
- Re: [cgal-discuss] Another insert_curve & Arrangment problem, Ben Strasser, 10/31/2009
- Re: [cgal-discuss] Another insert_curve & Arrangment problem, Ben Supnik, 10/31/2009
Archive powered by MHonArc 2.6.16.