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;
+ if (!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());
+ if (strlen(aRes.in())) {
+ msg = QObject::tr(aRes.in()).arg(GEOMBase::GetName(myShells[i].get()));
+ ok = false;
+ }
}
}
return ok;
# @return New GEOM.GEOM_Object, containing the created solid.
#
# @ref tui_creation_solid "Example"
- def MakeSolid(self,theShells):
+ def MakeSolid(self, theShells):
"""
Create a solid, bounded by the given shells.
New GEOM.GEOM_Object, containing the created solid.
"""
# Example: see GEOM_TestAll.py
+ if len(theShells) == 1:
+ descr = self.MeasuOp.IsGoodForSolid(theShells[0])
+ #if len(descr) > 0:
+ # raise RuntimeError, "MakeSolidShells : " + descr
+ if descr == "WRN_SHAPE_UNCLOSED":
+ raise RuntimeError, "MakeSolidShells : Unable to create solid from unclosed shape"
anObj = self.ShapesOp.MakeSolidShells(theShells)
RaiseIfFailed("MakeSolidShells", self.ShapesOp)
return anObj