+ mainFrame()->GroupBoxName->setEnabled( toEnable );
+}
+
+//=================================================================================
+// function : createOperation
+// purpose :
+//=================================================================================
+GEOM::GEOM_IOperations_ptr BuildGUI_SolidDlg::createOperation()
+{
+ return getGeomEngine()->GetIShapesOperations( getStudyId() );
+}
+
+//=================================================================================
+// function : isValid
+// purpose :
+//=================================================================================
+bool BuildGUI_SolidDlg::isValid (QString& msg)
+{
+ bool ok = !myShells.isEmpty();
+
+ GEOM::MeasureOpPtr anOp;
+ anOp.take(myGeomGUI->GetGeomGen()->GetIMeasureOperations(getStudyId()));
+
+ for ( int i = 0, n = myShells.count(); i < n && ok; i++ ) {
+ CORBA::String_var aRes = anOp->IsGoodForSolid(myShells[i].get());
+ if (strlen(aRes.in())) {
+ msg = QObject::tr(aRes.in()).arg(GEOMBase::GetName(myShells[i].get()));
+ ok = false;
+ }
+ }
+ return ok;
+}
+
+/*
+//=================================================================================
+// function : isClosed
+// purpose : Check the object 'i' in myShells list is closed or unclosed
+//=================================================================================
+bool BuildGUI_SolidDlg::isClosed( GEOM::GEOM_Object_ptr shell )
+{
+ bool ok = false;
+
+ GEOM::GEOM_IKindOfShape::shape_kind aKind;
+ GEOM::ListOfLong_var anInts;
+ GEOM::ListOfDouble_var aDbls;
+
+ if ( !CORBA::is_nil( shell ) ) {
+ GEOM::MeasureOpPtr anOp;
+ anOp.take( myGeomGUI->GetGeomGen()->GetIMeasureOperations( getStudyId() ) );
+
+ // Detect kind of shape and parameters
+ aKind = anOp->KindOfShape(shell, anInts, aDbls);
+
+ if ( anOp->IsDone() ) {
+ if ( anInts[0] == 1 )
+ ok = true;
+ else if ( anInts[0] == 2 )
+ ok = false;
+ }
+ else {
+ MESSAGE ("KindOfShape Operation is NOT DONE!!!");
+ }
+ }
+ else {
+ MESSAGE ("Shape is NULL!!!");
+ }
+
+ return ok;
+}
+*/
+
+//=================================================================================
+// function : execute
+// purpose :
+//=================================================================================
+bool BuildGUI_SolidDlg::execute( ObjectList& objects )
+{
+ GEOM::GEOM_IShapesOperations_var anOper = GEOM::GEOM_IShapesOperations::_narrow( getOperation() );
+
+ 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();
+
+ GEOM::GEOM_Object_var 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++ ) {
+ GEOM::GEOM_Object_var anObj = anOper->MakeSolidShell( myShells[ i ].get() );
+
+ if ( !anObj->_is_nil() )
+ objects.push_back( anObj._retn() );
+ }
+ }
+
+ return true;