Subject: CGAL users discussion list
List archive
- From: Ben Supnik <>
- To:
- Cc: Asher Kamiraze <>
- Subject: Re: [cgal-discuss] Problem with CGAL::insert in Arrangement_2
- Date: Fri, 07 Oct 2011 15:53:40 -0400
What kernel are you templated against?
On 10/7/11 3:47 PM, Asher Kamiraze wrote:
Hi all,
I am facing a problem with a piece which used to work but which now crashes.
Here is the method a segmentation fault:
void myobject::build_arr(const string& path, double tolerance)
{
/// Here, we read the polygons from a file --> m_rectangles
vector<Polygon_2>::const_iterator itb = m_rectangles.begin(), ite =
m_rectangles.end();
for(;itb!=ite;++itb)
{
Polygon_2::Edge_const_iterator e = itb->edges_begin(), ite_edges =
itb->edges_end();
for(;e!=ite_edges;++e)
{
Vector_2 v = e->to_vector();
double d = sqrt(CGAL::to_double(v.squared_length()));
v = (tolerance / d) * v ;
std::cout << v << std::endl;
std::cout << Segment_2(e->source()-v, e->target()+v) <<
std::endl;
CGAL::insert(m_arr, Segment_2(e->source()-v, e->target()+v));
/// Whatever the dataset is, the second call to CGAL::insert causes a segmentation
fault
}
}
}
Here is the output on the console with one of my dataset:
45.5953 20.5199
387.269 239.624 506.547 293.304
-20.5199 45.5953
481.472 227.189 407.029 392.6
There is no duplicate point. I am on a linux ubuntu 11.04, g++ 4.5.2 and
CGAL 3.7 (I compiled it myself).
The same code used to work on the same machine, with an ubuntu 10.04
(cannot remember g++ version ...), and CGAL 3.7 also compiled by myself.
Do you have any idea on what the problem is?
Regards,
Asher
--
Scenery Home Page: http://scenery.x-plane.com/
Scenery blog: http://www.x-plane.com/blog/
Plugin SDK: http://www.xsquawkbox.net/xpsdk/
X-Plane Wiki: http://wiki.x-plane.com/
Scenery mailing list:
Developer mailing list:
- [cgal-discuss] Problem with CGAL::insert in Arrangement_2, Asher Kamiraze, 10/07/2011
- Re: [cgal-discuss] Problem with CGAL::insert in Arrangement_2, Ben Supnik, 10/07/2011
- Re: [cgal-discuss] Problem with CGAL::insert in Arrangement_2, Asher Kamiraze, 10/07/2011
- Re: [cgal-discuss] Problem with CGAL::insert in Arrangement_2, Ben Supnik, 10/07/2011
Archive powered by MHonArc 2.6.16.