PD: fix several issues in pad:

* pass boolean instead of int to setValue of PropertyBool
* support of symmetric option for two-length mode
* fix bug in TaskPadParameters::updateUI()
* remove strange acronyms from method names
This commit is contained in:
wmayer
2021-03-22 16:40:15 +01:00
parent 2d447d2560
commit 09f93b2e8d
4 changed files with 16 additions and 14 deletions

View File

@@ -70,7 +70,7 @@ Pad::Pad()
ADD_PROPERTY_TYPE(Length2, (100.0), "Pad", App::Prop_None,"Second Pad length");
ADD_PROPERTY_TYPE(UseCustomVector, (0), "Pad", App::Prop_None, "Use custom vector for pad direction");
ADD_PROPERTY_TYPE(Direction, (Base::Vector3d(1.0, 1.0, 1.0)), "Pad", App::Prop_None, "Pad direction vector");
ADD_PROPERTY_TYPE(AlongCustomVector, (1), "Pad", App::Prop_None, "Measure length along custom direction vector");
ADD_PROPERTY_TYPE(AlongCustomVector, (true), "Pad", App::Prop_None, "Measure length along custom direction vector");
ADD_PROPERTY_TYPE(UpToFace, (0), "Pad", App::Prop_None, "Face where pad will end");
ADD_PROPERTY_TYPE(Offset, (0.0), "Pad", App::Prop_None, "Offset from face in which pad will end");
static const App::PropertyQuantityConstraint::Constraints signedLengthConstraint = {-DBL_MAX, DBL_MAX, 1.0};

View File

@@ -590,6 +590,8 @@ void ProfileBased::generatePrism(TopoDS_Shape& prism,
Ltotal += L2;
if (reversed)
Loffset = -L;
else if (midplane)
Loffset = -0.5 * (L2 + L);
else
Loffset = -L2;
} else if (midplane)