theR,theH,theA,Parameters = ParseParameters(theR, theH, theA)
if flag:
theA = theA*math.pi/180.
- anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
- RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
- anObj.SetParameters(Parameters)
- self._autoPublish(anObj, theName, "cylinder")
+ anObj = self.PrimOp.MakeCylinderPntVecRHA(thePnt, theAxis, theR, theH, theA)
+ if theA<=0. or theA>=2*math.pi:
+ raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
+ RaiseIfFailed("MakeCylinderPntVecRHA", self.PrimOp)
+ anObj.SetParameters(Parameters)
+ self._autoPublish(anObj, theName, "cylinder")
return anObj
## Create a cylinder with given radius and height at
if flag:
theA = theA*math.pi/180.
anObj = self.PrimOp.MakeCylinderRHA(theR, theH, theA)
+ if theA<=0. or theA>=2*math.pi:
+ raise ValueError("The angle parameter should be strictly between 0 and 2*pi.")
RaiseIfFailed("MakeCylinderRHA", self.PrimOp)
anObj.SetParameters(Parameters)
self._autoPublish(anObj, theName, "cylinder")
{
ok = GroupDimensions->SpinBox_DX->isValid( msg, !IsPreview() ) &&
GroupDimensions->SpinBox_DY->isValid( msg, !IsPreview() ) &&
- ( GroupDimensions->checkBox->isChecked() || GroupDimensions->SpinBox_DZ->isValid( msg, !IsPreview() ) );
+ ( !GroupDimensions->checkBox->isChecked() || GroupDimensions->SpinBox_DZ->isValid( msg, !IsPreview() ) );
if ( GroupDimensions->checkBox->isChecked() &&
( GroupDimensions->SpinBox_DZ->value() <= 0. || GroupDimensions->SpinBox_DZ->value() >= 360. ) ) {
msg += tr("GEOM_CYLINDER_ANGLE_ERR") + "\n";