X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FBuildGUI%2FBuildGUI_SolidDlg.cxx;h=adcee4f04f4d544f15dd4dc33f886f97fa0c0a50;hb=4598d83cc4bb23677f77242525b13228145f468e;hp=d564e61ceccbe03318adcff29197b78b32bf8de3;hpb=bd2042b4d19d69deaf182edda40bbff83e53490a;p=modules%2Fgeom.git diff --git a/src/BuildGUI/BuildGUI_SolidDlg.cxx b/src/BuildGUI/BuildGUI_SolidDlg.cxx index d564e61ce..adcee4f04 100644 --- a/src/BuildGUI/BuildGUI_SolidDlg.cxx +++ b/src/BuildGUI/BuildGUI_SolidDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -296,7 +296,7 @@ void BuildGUI_SolidDlg::EnableNameField( bool toEnable ) //================================================================================= GEOM::GEOM_IOperations_ptr BuildGUI_SolidDlg::createOperation() { - return getGeomEngine()->GetIShapesOperations( getStudyId() ); + return getGeomEngine()->GetIShapesOperations(); } //================================================================================= @@ -308,7 +308,7 @@ bool BuildGUI_SolidDlg::isValid (QString& msg) bool ok = !myShells.isEmpty(); GEOM::MeasureOpPtr anOp; - anOp.take(myGeomGUI->GetGeomGen()->GetIMeasureOperations(getStudyId())); + anOp.take(myGeomGUI->GetGeomGen()->GetIMeasureOperations()); if (getConstructorId() == 0 && (!GroupSolid->CheckButton1->isChecked() || myShells.count() == 1)) { for (int i = 0, n = myShells.count(); i < n && ok; i++) { CORBA::String_var aRes = anOp->IsGoodForSolid(myShells[i].get()); @@ -336,7 +336,7 @@ bool BuildGUI_SolidDlg::isClosed( GEOM::GEOM_Object_ptr shell ) if ( !CORBA::is_nil( shell ) ) { GEOM::MeasureOpPtr anOp; - anOp.take( myGeomGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() ) ); + anOp.take( myGeomGUI->GetGeomGen()->GetIMeasureOperations() ); // Detect kind of shape and parameters aKind = anOp->KindOfShape(shell, anInts, aDbls); @@ -371,24 +371,22 @@ bool BuildGUI_SolidDlg::execute( ObjectList& objects ) switch (getConstructorId()) { case 0: { - if ( GroupSolid->CheckButton1->isChecked() ) { - GEOM::ListOfGO_var objlist = new GEOM::ListOfGO(); - objlist->length( myShells.count() ); - for ( int i = 0; i < myShells.count(); i++ ) - objlist[i] = myShells[i].copy(); - - anObj = anOper->MakeSolidShells( objlist.in() ); - - if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); - } - else { - for ( int i = 0, n = myShells.count(); i< n; i++ ){ - anObj = anOper->MakeSolidShell( myShells[ i ].get() ); - - if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); - } - } - break; + if ( GroupSolid->CheckButton1->isChecked() ) { + GEOM::ListOfGO_var objlist = new GEOM::ListOfGO(); + objlist->length( myShells.count() ); + for ( int i = 0; i < myShells.count(); i++ ) + objlist[i] = myShells[i].copy(); + + anObj = anOper->MakeSolidShells( objlist.in() ); + if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); + } + else { + for ( int i = 0, n = myShells.count(); i< n; i++ ) { + anObj = anOper->MakeSolidShell( myShells[ i ].get() ); + if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); + } + } + break; } case 1: { @@ -397,9 +395,9 @@ bool BuildGUI_SolidDlg::execute( ObjectList& objects ) for ( int i = 0; i < myShells.count(); i++ ) objlist[i] = myShells[i].copy(); - anObj = anOper->MakeSolidFromConnectedFaces( objlist.in(), GroupFaces->CheckButton1->isChecked() ); + anObj = anOper->MakeSolidFromConnectedFaces( objlist.in(), GroupFaces->CheckButton1->isChecked() ); + if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); - if ( !anObj->_is_nil() ) objects.push_back( anObj._retn() ); break; } }