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:
Adrián Insaurralde Avalos
2023-06-13 21:53:07 -04:00
committed by Adrián Insaurralde Avalos
parent e724d3e93c
commit b2520d489a
2 changed files with 0 additions and 11 deletions

View File

@@ -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();

View File

@@ -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 {