From: eap Date: Wed, 6 Dec 2006 14:52:21 +0000 (+0000) Subject: PAL13473 (Build repetitive mesh): X-Git-Tag: V3_2_4pre1~34 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e117dee7116f9458e7473651596a3dd40c216e82;p=modules%2Fsmesh.git PAL13473 (Build repetitive mesh): Take myKind field into account --- diff --git a/src/SMESHFiltersSelection/SMESH_NumberFilter.cxx b/src/SMESHFiltersSelection/SMESH_NumberFilter.cxx index 929401562..61162a581 100644 --- a/src/SMESHFiltersSelection/SMESH_NumberFilter.cxx +++ b/src/SMESHFiltersSelection/SMESH_NumberFilter.cxx @@ -176,24 +176,26 @@ GEOM::GEOM_Object_ptr SMESH_NumberFilter::getGeom return anObj._retn(); // Get geom object corresponding to the mesh - _PTR(ChildIterator) anIter = study->NewChildIterator(aSO); - for (; anIter->More(); anIter->Next()) { - _PTR(SObject) aSO = anIter->Value(); - if (!aSO) - continue; - _PTR(SObject) aRefSO; - _PTR(SObject) anObj; - if (aSO->ReferencedObject(aRefSO)) - anObj = aRefSO; - - if (!anObj) - anObj = aSO; - - anObject = _CAST(SObject,anObj)->GetObject(); - GEOM::GEOM_Object_var aMeshShape = GEOM::GEOM_Object::_narrow(anObject); - - if (!aMeshShape->_is_nil()) - return aMeshShape._retn(); + if ( myKind == "SMESH" ) { + _PTR(ChildIterator) anIter = study->NewChildIterator(aSO); + for (; anIter->More(); anIter->Next()) { + _PTR(SObject) aSO = anIter->Value(); + if (!aSO) + continue; + _PTR(SObject) aRefSO; + _PTR(SObject) anObj; + if (aSO->ReferencedObject(aRefSO)) + anObj = aRefSO; + + if (!anObj) + anObj = aSO; + + anObject = _CAST(SObject,anObj)->GetObject(); + GEOM::GEOM_Object_var aMeshShape = GEOM::GEOM_Object::_narrow(anObject); + + if (!aMeshShape->_is_nil()) + return aMeshShape._retn(); + } } return GEOM::GEOM_Object::_nil(); diff --git a/src/SMESHFiltersSelection/SMESH_NumberFilter.hxx b/src/SMESHFiltersSelection/SMESH_NumberFilter.hxx index c4d3d8418..a1d96c310 100644 --- a/src/SMESHFiltersSelection/SMESH_NumberFilter.hxx +++ b/src/SMESHFiltersSelection/SMESH_NumberFilter.hxx @@ -31,6 +31,8 @@ #include #include CORBA_SERVER_HEADER(GEOM_Gen) +#include + class SUIT_DataOwner; /*! @@ -77,7 +79,7 @@ class SMESH_NumberFilter : public SUIT_SelectionFilter GEOM::GEOM_Object_ptr getGeom (const SUIT_DataOwner*, const bool extractReference = true ) const; private: - char* myKind; + std::string myKind; TopAbs_ShapeEnum mySubShapeType; int myNumber; bool myIsClosedOnly;