From: dmv Date: Fri, 27 Nov 2009 09:12:06 +0000 (+0000) Subject: 0020598: EDF 1191 GEOM : Creation of hexa block from two faces X-Git-Tag: V5_1_3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2ed8fb124a2823ca30ea1a5279a9e2f92dda352d;p=modules%2Fgeom.git 0020598: EDF 1191 GEOM : Creation of hexa block from two faces --- diff --git a/src/GEOMBase/GEOMBase_Helper.cxx b/src/GEOMBase/GEOMBase_Helper.cxx index 926868a41..70c5ebd6d 100755 --- a/src/GEOMBase/GEOMBase_Helper.cxx +++ b/src/GEOMBase/GEOMBase_Helper.cxx @@ -1084,23 +1084,23 @@ void GEOMBase_Helper::addSubshapesToFather( QMap GEOM::GEOM_IGroupOperations_var anOp = getGeomEngine()->GetIGroupOperations( getStudyId() ); - for( QMap::Iterator it = theMap.begin(); it != theMap.end(); it++ ) - { - if ( !anOp->_is_nil() ) { - GEOM::GEOM_Object_var aFatherObj = anOp->GetMainShape( it.value() ); - if ( !aFatherObj->_is_nil() ) { - GEOM::GEOM_Object_var aFindedObject = findObjectInFather(aFatherObj, it.key().toLatin1().data() ); - - //Add Object to study if its not exist - if ( aFindedObject == GEOM::GEOM_Object::_nil() ) - GeometryGUI::GetGeomGen()->AddInStudy(GeometryGUI::ClientStudyToStudy(aDStudy), - it.value(), it.key().toLatin1().data(), aFatherObj ); - } - } - else { - //cout << " anOperations is NULL! " << endl; + for( QMap::Iterator it = theMap.begin(); it != theMap.end(); it++ ) { + if ( !anOp->_is_nil() ) { + GEOM::GEOM_Object_var aFatherObj = anOp->GetMainShape( it.value() ); + if ( !aFatherObj->_is_nil() ) { + std::string aFatherEntry = getEntry( aFatherObj ); + if ( aFatherEntry != "") { // additional checking that object is valid 0020598 EDF 1191 + GEOM::GEOM_Object_var aFindedObject = findObjectInFather(aFatherObj, it.key().toLatin1().data() ); + //Add Object to study if its not exist + if ( aFindedObject == GEOM::GEOM_Object::_nil() ) + GeometryGUI::GetGeomGen()->AddInStudy(GeometryGUI::ClientStudyToStudy(aDStudy), + it.value(), it.key().toLatin1().data(), aFatherObj ); + } } + } else { + //cout << " anOperations is NULL! " << endl; } -} + } +}