PartDesign: clean redundant/incorrect length validation for pad & pocket
better validation is already done for both at FeatureExtrude::generatePrism instead
This commit is contained in:
committed by
Adrián Insaurralde Avalos
parent
e724d3e93c
commit
b2520d489a
@@ -69,13 +69,8 @@ Pad::Pad()
|
||||
|
||||
App::DocumentObjectExecReturn *Pad::execute()
|
||||
{
|
||||
// Validate parameters
|
||||
double L = Length.getValue();
|
||||
if ((std::string(Type.getValueAsString()) == "Length") && (L < Precision::Confusion()))
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Length of pad too small"));
|
||||
double L2 = Length2.getValue();
|
||||
if ((std::string(Type.getValueAsString()) == "TwoLengths") && (L < Precision::Confusion()))
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Second length of pad too small"));
|
||||
|
||||
// if midplane is true, disable reversed and vice versa
|
||||
bool hasMidplane = Midplane.getValue();
|
||||
|
||||
@@ -76,14 +76,8 @@ App::DocumentObjectExecReturn *Pocket::execute()
|
||||
(!UpToFace.getValue() && Length.getValue() > Precision::Confusion()))
|
||||
Type.setValue("Length");
|
||||
|
||||
// Validate parameters
|
||||
double L = Length.getValue();
|
||||
if ((std::string(Type.getValueAsString()) == "Length") && (L < Precision::Confusion()))
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Pocket: Length of pocket too small"));
|
||||
|
||||
double L2 = Length2.getValue();
|
||||
if ((std::string(Type.getValueAsString()) == "TwoLengths") && (L < Precision::Confusion()))
|
||||
return new App::DocumentObjectExecReturn(QT_TRANSLATE_NOOP("Exception", "Pocket: Second length of pocket too small"));
|
||||
|
||||
TopoDS_Shape profileshape;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user