+ if (!GroupConstructors->isEnabled())
+ this->ActivateThisDialog();
+}
+
+
+//=================================================================================
+// function : createOperation
+// purpose :
+//=================================================================================
+GEOM::GEOM_IOperations_ptr OperationGUI_PartitionDlg::createOperation()
+{
+ return getGeomEngine()->GetIBooleanOperations( getStudyId() );
+}
+
+
+//=================================================================================
+// function : isValid
+// purpose :
+//=================================================================================
+bool OperationGUI_PartitionDlg::isValid( QString& msg )
+{
+ return (myListShapes.length() || myListTools.length() ||
+ myListKeepInside.length() || myListRemoveInside.length());
+}
+
+
+//=================================================================================
+// 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->radioButton4->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 : closeEvent
+// purpose :
+//=================================================================================
+void OperationGUI_PartitionDlg::closeEvent( QCloseEvent* e )
+{
+ GEOMBase_Skeleton::closeEvent( e );