FreeCAD: master cf11f388

Author Committer Branch Timestamp Parent
uwestoehr wmayer master 2020-09-23 23:56:24 master 5e90c073
Changeset [PD] add along length option for pad

- as discussed here: https://forum.freecadweb.org/viewtopic.php?f=17&t=50466&start=10#p433327
this PR is the first step for new Pad features.
It implements 3 features requested by users:
1. an option to measure the pad length along its direction if there is a custom direction
2. when there are two lengths, the reverse feature should be active
3. the pad dialog shows now always the used pad direction, no matter if it is a custom one or the sketch's normal

- Furthermore there are some code improvements (avoid rounding and blocking signals)

- Also adapt TestPad.py because its test used the case two lengths + reversed but this was not possible before this PR - the reverse option was not take into account for two lengths in FeatureSketchBased.cpp)
Now it is and therefore the test must be updated:
In the test the second sketch has the normal vector 0, -1, 0. As the reverse option is set the pad direction is 0, 1, 0. So in y direction is the length (1mm) and in -y direction is length2 (2mm). This gives together with the other pad of volume 1, a total volume of 4.

- fix UI issue: either reversed or midplane
As noticed by @chennes, when the pad uses symmetric, reversed is not sensible and vice versa.
This commit fixes the missing Gui side for the case midplane is checked and the App side.

- the PR also fix two typos
mod - src/Mod/PartDesign/App/FeaturePad.cpp Diff File
mod - src/Mod/PartDesign/App/FeaturePad.h Diff File
mod - src/Mod/PartDesign/App/FeatureSketchBased.cpp Diff File
mod - src/Mod/PartDesign/Gui/TaskPadParameters.cpp Diff File
mod - src/Mod/PartDesign/Gui/TaskPadParameters.h Diff File
mod - src/Mod/PartDesign/Gui/TaskPadParameters.ui Diff File
mod - src/Mod/PartDesign/PartDesignTests/TestPad.py Diff File