Salome HOME
Issue #2971: Naming issue in a group when loading a dump file
[modules/shaper.git] / src / ModelGeomAlgo / ModelGeomAlgo_Shape.cpp
index c65543ab81ff80b371cec879cf20f5b21842bdf3..207e4f3aa807ce4c1b861cd4f76df85927b0a26c 100644 (file)
@@ -77,11 +77,8 @@ namespace ModelGeomAlgo_Shape
     std::list<GeomShapePtr> aSubs = theShape->subShapes(theType);
     for (std::list<GeomShapePtr>::const_iterator aSubIt = aSubs.begin();
          aSubIt != aSubs.end(); ++aSubIt) {
-      double aTol = (*aSubIt)->tolerance();
-      if (theTolerance > aTol)
-        aTol = theTolerance;
       GeomPointPtr aMiddlePoint = (*aSubIt)->middlePoint();
-      if (aMiddlePoint && aMiddlePoint->distance(thePoint) < aTol)
+      if (aMiddlePoint && aMiddlePoint->distance(thePoint) < theTolerance)
         aFoundSubs.push_back(*aSubIt);
     }
     return aFoundSubs;