X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FControls%2FSMESH_Controls.cxx;h=f71565018cb61459c3a39f638d4c493cc59a891e;hb=285f56790c4e056c29c8e39aa27083976bd39b4e;hp=1ccd96f9905611d39a69424bcebb65a90f437dc6;hpb=4c16067d4281f56bd07d3f92fb63fff9c0c1d169;p=modules%2Fsmesh.git diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 1ccd96f99..f71565018 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -3043,7 +3043,7 @@ bool ConnectedElements::IsSatisfy( long theElementId ) { // keep elements of myType const SMDS_MeshElement* element = eIt->next(); - if ( element->GetType() == myType ) + if ( myType == SMDSAbs_All || element->GetType() == myType ) myOkIDs.insert( myOkIDs.end(), element->GetID() ); // enqueue nodes of the element @@ -4425,6 +4425,12 @@ bool ElementsOnShape::IsSatisfy (const SMDS_MeshElement* elem) return isSatisfy; } +//================================================================================ +/*! + * \brief Check and optionally return a satisfying shape + */ +//================================================================================ + bool ElementsOnShape::IsSatisfy (const SMDS_MeshNode* node, TopoDS_Shape* okShape) { @@ -4561,6 +4567,7 @@ ElementsOnShape::Classifier::~Classifier() bool ElementsOnShape::Classifier::isOutOfSolid (const gp_Pnt& p) { + if ( isOutOfBox( p )) return true; mySolidClfr->Perform( p, myTol ); return ( mySolidClfr->State() != TopAbs_IN && mySolidClfr->State() != TopAbs_ON ); } @@ -4572,6 +4579,7 @@ bool ElementsOnShape::Classifier::isOutOfBox (const gp_Pnt& p) bool ElementsOnShape::Classifier::isOutOfFace (const gp_Pnt& p) { + if ( isOutOfBox( p )) return true; myProjFace.Perform( p ); if ( myProjFace.IsDone() && myProjFace.LowerDistance() <= myTol ) { @@ -4588,6 +4596,7 @@ bool ElementsOnShape::Classifier::isOutOfFace (const gp_Pnt& p) bool ElementsOnShape::Classifier::isOutOfEdge (const gp_Pnt& p) { + if ( isOutOfBox( p )) return true; myProjEdge.Perform( p ); return ! ( myProjEdge.NbPoints() > 0 && myProjEdge.LowerDistance() <= myTol ); } @@ -4860,7 +4869,7 @@ bool BelongToGeom::IsSatisfy (long theId) { if ( const SMDS_MeshElement* anElem = myMeshDS->FindElement( theId )) { - if ( anElem->GetType() == myType ) + if ( myType == SMDSAbs_All || anElem->GetType() == myType ) { if ( anElem->getshapeId() < 1 ) return myElementsOnShapePtr->IsSatisfy(theId); @@ -5000,7 +5009,8 @@ bool LyingOnGeom::IsSatisfy( long theId ) if ( mySubShapesIDs.Contains( elem->getshapeId() )) return true; - if ( elem->GetType() != SMDSAbs_Node && elem->GetType() == myType ) + if (( elem->GetType() != SMDSAbs_Node ) && + ( myType == SMDSAbs_All || elem->GetType() == myType )) { SMDS_ElemIteratorPtr nodeItr = elem->nodesIterator(); while ( nodeItr->more() )