Salome HOME
Windows compatibility.
[modules/smesh.git] / src / SMESHUtils / SMESH_MeshAlgos.cxx
index 1112eb973a4cc1c02af7ad606ac63e91d9464735..1eae5f7818e23d205812d4330a7e8437c34349cb 100644 (file)
@@ -459,6 +459,7 @@ struct SMESH_ElementSearcherImpl: public SMESH_ElementSearcher
       _ebbTree[i] = NULL;
       _ebbTreeHeight[i] = -1;
     }
+    _elementType = SMDSAbs_All;
   }
   virtual ~SMESH_ElementSearcherImpl()
   {
@@ -688,7 +689,7 @@ void SMESH_ElementSearcherImpl::findOuterBoundary(const SMDS_MeshElement* outerF
           outerFace2 = angle2Face.begin()->second;
       }
     }
-    // store the found outer face and add its links to continue seaching from
+    // store the found outer face and add its links to continue searching from
     if ( outerFace2 )
     {
       _outerFaces.insert( outerFace2 );
@@ -878,10 +879,10 @@ SMESH_ElementSearcherImpl::FindClosestTo( const gp_Pnt&       point,
 
 TopAbs_State SMESH_ElementSearcherImpl::GetPointState(const gp_Pnt& point)
 {
-  double tolerance = getTolerance();
-
   _elementType = SMDSAbs_Face;
 
+  double tolerance = getTolerance();
+
   ElementBndBoxTree*& ebbTree = _ebbTree[ SMDSAbs_Face ];
   if ( !ebbTree )
     ebbTree = new ElementBndBoxTree( *_mesh, _elementType, _meshPartIt );