+ 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;