Salome HOME
Fix valgrind error: Mismatched free() / delete / delete []
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_GetInPlaceAPI.cxx
index c7abe5e96484b9c0830233c0842cf5be47d6c63b..a24738cdbc7296406c36583baedf6b2fcd0d919e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -26,7 +26,6 @@
 
 #include <GEOMAlgo_GetInPlaceAPI.hxx>
 #include <GEOMAlgo_GetInPlace.hxx>
-#include <GEOM_Function.hxx>
 #include <GEOM_Object.hxx>
 #include <GEOMUtils.hxx>
 
@@ -46,8 +45,6 @@
 #include <TopExp_Explorer.hxx>
 #include <TopoDS.hxx>
 #include <TopoDS_Vertex.hxx>
-#include <TopTools_MapOfShape.hxx>
-
 
 //=======================================================================
 //function : GetInPlace
@@ -182,7 +179,7 @@ Standard_Integer GEOMAlgo_GetInPlaceAPI::GetInPlaceOld
       if (fabs(tab_aWhat[3] - tab_aWhere[3]) <= aMassTol && aPnt_aWhat.Distance(aPnt) <= aTolConf)
         isFound = true;
       else {
-        if ((tab_aWhat[3] - tab_aWhere[3]) > aMassTol) {
+        if (tab_aWhat[3] > tab_aWhere[3]) {
           aPntShape = BRepBuilderAPI_MakeVertex( aPnt ).Shape();
           aVertex   = TopoDS::Vertex( aPntShape );
           BRepExtrema_DistShapeShape aWhereDistance ( aVertex, Exp_aWhere.Current() );
@@ -190,7 +187,7 @@ Standard_Integer GEOMAlgo_GetInPlaceAPI::GetInPlaceOld
           if (aWhereDistance.IsDone() && aWhatDistance.IsDone() &&
               fabs(aWhereDistance.Value() - aWhatDistance.Value()) <= aTolConf)
           {
-            // 0020162: "EDF 961 GEOM : Getinplace is getting additionnal orthogonal faces"
+            // 0020162: "EDF 961 GEOM : Getinplace is getting additional orthogonal faces"
             // aVertex must be projected to the same point on Where and on What
             gp_Pnt pOnWhat  = aWhatDistance.PointOnShape2(1);
             gp_Pnt pOnWhere = aWhereDistance.PointOnShape2(1);