Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] CGAL 4.1: Straight skeleton infinite loop workaround

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] CGAL 4.1: Straight skeleton infinite loop workaround


Chronological Thread 
  • From: Philipp Moeller <>
  • To: mschneider <>
  • Cc:
  • Subject: Re: [cgal-discuss] CGAL 4.1: Straight skeleton infinite loop workaround
  • Date: Fri, 14 Dec 2012 11:47:25 +0100
  • Organization: GeometryFactory

mschneider
<>
writes:

> 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() );

Hi,

thanks for the patch. Could you provide a data-set and some code to
reproduce that problem? That way we can look for a fully correct fix.

Cheers,
Philipp



Archive powered by MHonArc 2.6.18.

Top of Page