Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Straight_Skeleton_2 Null pointer

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Straight_Skeleton_2 Null pointer


Chronological Thread 
  • From: "Fernando Cacciola" <>
  • To: <>
  • Subject: Re: [cgal-discuss] Straight_Skeleton_2 Null pointer
  • Date: Tue, 11 Dec 2007 10:05:52 -0300
  • Organization: Geometry Factory

Hi Sinan,

The polygon in data/example.poly has the wrong orientation.
I didn't notice before because the demo program corrects the orientation of polygons on load, but I forgotten it did that.

If you add the following to your example program, right after the example is loaded:

CGAL::Orientation o = CGAL::orientation_2(all_pts, all_pts+(int)vertexCount);
if ( o != CGAL::COUNTERCLOCKWISE )
std::reverse(all_pts,all_pts+(int)vertexCount);

it will work.

Best

Fernando Cacciola
GeometryFactory




Archive powered by MHonArc 2.6.16.

Top of Page