Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Problem using Straight Skeleton Algorithm

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Problem using Straight Skeleton Algorithm


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Problem using Straight Skeleton Algorithm
  • Date: Wed, 18 Apr 2012 14:27:55 +0200

The problem comes from the fact that your polygon is not simple.
Use poly.is_simple() to check that. I'll see if I can add a precondition
in the code.

With a little massage of the data, the polygon is simple:
835 274
1008 612
835 948
835 1188
782 1411
781 1412
782 1410
586 1454
634 1227
634 -5
584 -233
796 -172
835 35

Sebastien.


On 04/14/2012 12:37 PM, man wrote:
I am running SsPtr ptr = CGAL::create_interior_straight_skeleton_2(poly);

with the following polygon:

[x: 835, y: 274]
[x: 1008, y: 612]
[x: 835, y: 948]
[x: 835, y: 1188]
[x: 781, y: 1412]
[x: 782, y: 1410]
[x: 782, y: 1411]
[x: 586, y: 1454]
[x: 634, y: 1227]
[x: 634, y: -5]
[x: 584, y: -233]
[x: 796, y: -172]
[x: 835, y: 35]
[x: 835, y: 274]

But create_interior_straight_skeleton_2 produces an infinite loop.
If I remove the points

[x: 782, y: 1410]
[x: 782, y: 1411]

from the polygon, the algorithm works as expected.

Thanks
Sascha



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Problem-using-Straight-Skeleton-Algorithm-tp4556961p4556961.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.16.

Top of Page