+//=================================================================================
+// function : execute
+// purpose :
+//=================================================================================
+bool OperationGUI_PartitionDlg::execute( ObjectList& objects )
+{
+ bool res = false;
+
+ GEOM::GEOM_Object_var anObj;
+ QString msg;
+
+ int aLimit = GetLimit();
+ int aConstructorId = getConstructorId();
+ int aKeepNonlimitShapes = 0;
+
+ if ( aConstructorId == 1 ) {
+ aLimit = GEOM::SHAPE;
+ }
+ else {
+ if ( GroupPoints->CheckButton1->isChecked() ) {
+ aKeepNonlimitShapes = 1;
+ }
+ else {
+ aKeepNonlimitShapes = 0;
+ }
+ }
+
+ if ( isValid( msg ) ) {
+ anObj = GEOM::GEOM_IBooleanOperations::_narrow( getOperation() )->
+ MakePartition( myListShapes, myListTools,
+ myListKeepInside, myListRemoveInside,
+ aLimit, false, myListMaterials, aKeepNonlimitShapes );
+ res = true;
+ }
+
+ if ( !anObj->_is_nil() )
+ objects.push_back( anObj._retn() );
+
+ return res;
+}
+
+//=================================================================================
+// function : restoreSubShapes
+// purpose :
+//=================================================================================
+void OperationGUI_PartitionDlg::restoreSubShapes( SALOMEDS::Study_ptr theStudy,
+ SALOMEDS::SObject_ptr theSObject )
+{
+ if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
+ // empty list of arguments means that all arguments should be restored
+ getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
+ /*theFindMethod=*/GEOM::FSM_GetInPlaceByHistory,
+ /*theInheritFirstArg=*/myListShapes.length() == 1 ); // ? false
+ }
+}
+