+//=======================================================================
+/*
+ * Return elements whose bounding box intersects a sphere
+ */
+//=======================================================================
+
+void SMESH_ElementSearcherImpl::GetElementsInSphere( const gp_XYZ& center,
+ const double radius,
+ SMDSAbs_ElementType type,
+ vector< const SMDS_MeshElement* >& foundElems)
+{
+ _elementType = type;
+ ElementBndBoxTree*& ebbTree = _ebbTree[ type ];
+ if ( !ebbTree )
+ ebbTree = new ElementBndBoxTree( *_mesh, _elementType, _meshPartIt );
+
+ TIDSortedElemSet suspectFaces; // elements possibly intersecting the line
+ ebbTree->getElementsInSphere( center, radius, suspectFaces );
+ foundElems.assign( suspectFaces.begin(), suspectFaces.end() );
+}
+