Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Why straight skeleton algorithm in CGAL is so

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Why straight skeleton algorithm in CGAL is so


Chronological Thread 
  • From: Fernando Cacciola <>
  • To:
  • Subject: Re: [cgal-discuss] Why straight skeleton algorithm in CGAL is so
  • Date: Wed, 29 Oct 2008 18:00:43 -0300

jiatao83 wrote:
Dear All:

The code followed:
--------------------------------------------------------------------------------------------------------
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_2 Point_2;

typedef CGAL::Straight_skeleton_2<Kernel> Ss;
typedef Ss::Halfedge_iterator Halfedge_iterator;
typedef Ss::Halfedge_handle Halfedge_handle;
typedef Ss::Vertex_handle Vertex_handle;
typedef CGAL::Straight_skeleton_builder_traits_2<Kernel> SsBuilderTraits;
typedef CGAL::Straight_skeleton_builder_2<SsBuilderTraits,Ss> SsBuilder;
SsBuilder ssb;
for(int i=0;i++;i<27)
{
/* According to the boundary to generate the pts */
Point_2* pts=new Point_2[numPointsInPart];
ssb.enter_contour(pts,pts+numPointsInPart-1);
}
ss=ssb.construct_skeleton();
--------------------------------------------------------------------------------------------------------
The program so time-consuming that it needs about 27 hours

That is incredibly slower than it ought to be. The worst case for a
polygon this size I've seen is a few mintues.

Can you send, directly to me private email a text file with the
coordinates of your boundaries, each boundary starting with a line
indicating the number of vertices, and details on your platform,
compiler and most importantly flags and defines?

TIA

Fernando Cacciola








Archive powered by MHonArc 2.6.16.

Top of Page