Salome HOME
workaround for bug #16280 / #1514: tolerance for nodes on the border fixed to 0.01...
authorPaul RASCLE <paul.rascle@edf.fr>
Wed, 24 Jan 2018 16:00:52 +0000 (17:00 +0100)
committerPaul RASCLE <paul.rascle@edf.fr>
Wed, 24 Jan 2018 16:00:52 +0000 (17:00 +0100)
src/HYDROData/HYDROData_Tool.cxx

index e3a96059352a8e6ff88b078351cac7783edb9b42..750b8973c998de272c9a9d4e196a458c7c6a92cd 100644 (file)
@@ -188,6 +188,9 @@ TopAbs_State HYDROData_Tool::ComputePointState( const gp_XY& theXY, const TopoDS
   Standard_Real aTol = BRep_Tool::Tolerance(theFace);
   BRepAdaptor_Surface Ads ( theFace, Standard_False );
   Standard_Real toluv = Min ( Ads.UResolution(aTol), Ads.VResolution(aTol) ); 
+  if (toluv < 0.01)
+    toluv = 0.01; // there is no need to be more precise than 1cm a any case ! 
+                  // another solution could be to compute a tolerance related to the distance between the border nodes 
   const gp_Pln& aPlane = Ads.Surface().Plane();
   gp_Pnt aPnt(theXY.X(), theXY.Y(), 0.);
   Standard_Real aU1, aV1;