0023794: Too small precision leads to instability
authorika <ika@opencascade.com>
Thu, 7 Mar 2013 09:21:34 +0000 (13:21 +0400)
committerika <ika@opencascade.com>
Thu, 7 Mar 2013 09:21:34 +0000 (13:21 +0400)
tol2 (10^-36) was changed to dPreci (10^-18)
test case was changed by adding TODO

src/ShapeConstruct/ShapeConstruct_ProjectCurveOnSurface.cxx
tests/bugs/heal/bug210

index 891771a..c0af8c6 100755 (executable)
@@ -993,7 +993,6 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformAdvanced (Handle(G
       Standard_Real dist = pnt2d(1).SquareDistance(pnt2d(NbPnt2d));
       Standard_Real dPreci = Precision::PConfusion()*Precision::PConfusion();
       if(dist >= dPreci) {
-        Standard_Real tol2 = dPreci*dPreci;
         gp_Vec2d avec (pnt2d(1),pnt2d(NbPnt2d));
         gp_Dir2d adir (avec);
         gp_Lin2d alin (pnt2d(1),adir);
@@ -1002,7 +1001,7 @@ Standard_Boolean ShapeConstruct_ProjectCurveOnSurface::PerformAdvanced (Handle(G
           Standard_Real dist2 = pnt2d(1).SquareDistance(pnt2d(i));
           Standard_Real step = pnt2d(1).Distance(pnt2d(NbPnt2d))/(NbPnt2d-1);
           Standard_Real ddist = Abs(pnt2d(1).Distance(pnt2d(i))-step*(i-1));
-          if( devia>tol2 || (dist2-dist)>dPreci || ddist>1.e-3*step ) {
+          if( devia>dPreci || (dist2-dist)>dPreci || ddist>1.e-3*step ) {
             IsLine = Standard_False;
             i = NbPnt2d;
           }
index 09ba026..7760f2e 100755 (executable)
@@ -1,3 +1,4 @@
+puts "TODO CR23794 ALL: Faulty shapes in variables faulty_1 to faulty_"
 puts "========="
 puts " OCC210 "
 puts "========="