From: abv Date: Fri, 5 Oct 2012 09:58:17 +0000 (+0400) Subject: 0023453: Infinite loop on cut operation X-Git-Tag: V6_5_4_beta1~19 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=2478cd9d9f505fb8ab41884c8e533907719b5c96;p=occt-copy.git 0023453: Infinite loop on cut operation In IntTools_FClass2d.cxx, do {} while {} cycle is replaced by for () cycle to avoid possible infinite loop. Check for degeneration is made with Precision::Confusion() precision instead of comparison with 0. Correction of misprint --- diff --git a/src/IntTools/IntTools_FClass2d.cxx b/src/IntTools/IntTools_FClass2d.cxx index 2d167301c4..50e50445f4 100755 --- a/src/IntTools/IntTools_FClass2d.cxx +++ b/src/IntTools/IntTools_FClass2d.cxx @@ -194,25 +194,24 @@ IntTools_FClass2d::IntTools_FClass2d() // //-- Verification of cases when forgotten to code degenereted if(!degenerated) { - Standard_Real aR2; - gp_Pnt P3da, P3db; - // - C3d.Initialize(edge,Face); - du=(plbid-pfbid)*0.1; - u=pfbid+du; - P3da=C3d.Value(u); - degenerated=Standard_True; - u+=du; - do { - P3db=C3d.Value(u); - aR2=P3da.SquareDistance(P3db); - if(aR2>0.) { - degenerated=Standard_False; - break; - } - u+=du; - } - while(u aPrec2) { + degenerated = Standard_False; + break; + } + } }//if(!degenerated) //-- ---------------------------------------- Tole = BRep_Tool::Tolerance(edge);