Subject: CGAL users discussion list
List archive
- From: mschneider <>
- To:
- Subject: [cgal-discuss] CGAL 4.1: Straight skeleton infinite loop workaround
- Date: Fri, 14 Dec 2012 01:33:56 -0800 (PST)
Hi,
there is an infinite loop in
[include/CGAL/Straight_skeleton_2/Straight_skeleton_builder_2_impl.h]
Template Function:
template<class Gt, class Ss, class V>
void Straight_skeleton_builder_2<Gt,Ss,V>::MergeCoincidentNodes()
We had to add a infinite loop checker. The code is pretty simple and only a
workaround for the problem to make the application robost for special user
data. There is now a handleList which adds the current node's handle. If the
node's handle is known we'll throw a exception to get outa loop.
This is the diff file:
1696,1698d1695
< std::list<int> handleListID;
< handleListID.push_back( h->id() );
<
1718,1723d1714
<
< // check for infinite loop
< if (std::find( handleListID.begin(), handleListID.end(), h->id() )
!=
< handleListID.end())
< throw std::runtime_error( "detected infinite loop." );
< handleListID.push_back( h->id() );
Best regards
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/CGAL-4-1-Straight-skeleton-infinite-loop-workaround-tp4656401.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] CGAL 4.1: Straight skeleton infinite loop workaround, mschneider, 12/14/2012
- Re: [cgal-discuss] CGAL 4.1: Straight skeleton infinite loop workaround, Philipp Moeller, 12/14/2012
Archive powered by MHonArc 2.6.18.