From 2ed8fb124a2823ca30ea1a5279a9e2f92dda352d Mon Sep 17 00:00:00 2001 From: dmv Date: Fri, 27 Nov 2009 09:12:06 +0000 Subject: [PATCH] 0020598: EDF 1191 GEOM : Creation of hexa block from two faces --- src/GEOMBase/GEOMBase_Helper.cxx | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) 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; } -} + } +} -- 2.39.2