Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Min_circle problem

Subject: CGAL users discussion list

List archive

[cgal-discuss] Min_circle problem


Chronological Thread 
  • From: "Atul Thakur" <>
  • To:
  • Subject: [cgal-discuss] Min_circle problem
  • Date: Sun, 7 Sep 2008 21:28:26 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=x3qjaKQuhvgX/QkORdb+/Yiz5XrcI7QMUo28ZGYDjeYXK34h71JTv5ZU0mUPoI35TN jM5b82pypVg1xBQ1pH9fmLnCzDNbficLZXiEYTCrCTA8vZ3OOf7ORLjzxAuRDe+bSSoZ wnaPOWXCisErhYuJURxX6Vz5F9M0bOvWxOC3A=

Hi All:
I started using CGAL recently and for a limited purpose of finding minimum circle for given set of 2D points. I am getting a strange problem that my code runs some time and crashes for other times. If I debug the code slowly the program runs fine but when debugged fast <as in I press F10 rapidly while debugging>crash occurs with following error

Expr: ! CGAL_NTS is_zero(den)
File: c:\program files\cgal-3.3.1\include\cgal\constructions\kernel_ftc2.h
Line: 60


Further on probing I found that line 60 of kernel_ftc2.h assert is as follows
 // The 3 points aren't collinear.
 // Hopefully, this is already checked at the upper level.
 CGAL_kernel_assertion ( ! CGAL_NTS is_zero(den) );


My input data is checked for collinearity beforehand and moreover code runs some time.

The part of code that is bugging me is as follows

list <Point> map2d;
map2d = uvmap(vertex_list);//function to transform 3d polygon to 2d uv plane
//set the convex hull of the uv map
Min_circle mc(map2d.begin(), map2d.end(), true);
if (minimum < mc.circle().squared_radius())
minimum = mc.circle().squared_radius();



I defined Min_circle as per manual as follows

typedef CGAL::Homogeneous<NT> K;
typedef CGAL::Min_circle_2_traits_2<Rep> Traits;
typedef CGAL::Min_circle_2<Traits> Min_circle;  



Any pointers will be really helpful. I am sure that program is crashing on Min_circle mc(map2d.begin(), map2d.end(), true);

thanks,

-Atul



Archive powered by MHonArc 2.6.16.

Top of Page