Commit Graph

71 Commits

Author SHA1 Message Date
Uwe
e27270e615 [PD] fix pad/pocket direction issue
- the info if a custom direction is used, was incorrectly determined by checking a checkbox that only displays the vector value, no matter if it is a custom vector or not
2021-11-13 04:03:04 +01:00
Uwe
aa0f0cd3bb [PD] code improvements for TaskPadParameters
as requested by @chennes in PR #5164, the code can be simplified:

- remove a redundant type cast, a redundant qualifier and an inconsistent and unnecessary check
2021-11-11 02:08:57 +01:00
wmayer
27d65eca51 PD: do not enforce a reference axis when no profile is used to pad a face 2021-10-08 18:21:42 +02:00
donovaly
7921c3f5fa [PD] fixes for padding along edge
- handle custom direction like all other directions
- allow to view the direction vector for all directions, but only to edit for custom
- fix enabling of the length alongNormal option
- also fix a translation issue
2021-09-29 01:11:50 +02:00
donovaly
6c3661d3d9 rebase to master 2021-09-20 01:37:47 +02:00
donovaly
b868dbbe7f small fixes as suggested by @chennes
therefore also in the helix code
2021-09-20 00:59:17 +02:00
donovaly
7bfede97b7 [PD] add feature to select pad direction via an edge
This was requested by users in the forum and is indeed very valuable for the usability.
2021-09-20 00:59:16 +02:00
Yorik van Havre
f76abee290 Merge pull request #4872 from berberic2/PD_pad_ui_change
PartDesign: Hide the custom direction fields in Pad if no custom direction is used
2021-08-23 14:28:03 +02:00
0penBrain
519dc3ac0a [PartDesign] Add reverse ability for Pad/UpToFace mode as it makes sense for curved faces
And does not hurt/break in case face is reachable in only one direction
2021-08-17 12:07:02 +02:00
0penBrain
7459bbb14d [PartDesign] Fix 'Reversed' no more available in Pad 'toFirst/toLast'
While useless 'Midplane' was still visible
 Bug introduced in commit #695abed1, not fixed by commmit #7d9fd5e4
 Also fixing some typos
2021-08-17 12:07:02 +02:00
M G Berberich
5ae0ab80c8 PartDesign Pad UI-fix
hide the custom direction fields if no custom direction is used, to
unclutter the UI.
2021-08-16 19:38:05 +02:00
donovaly
00a7221a95 [PD] some fixes for the new pad length feature
- disable 2 properties when no custom direction is used
- rename a property because its name is the opposite of what it is doing
2021-03-25 17:44:30 +01:00
wmayer
09f93b2e8d 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
2021-03-22 16:40:15 +01:00
donovaly
2d447d2560 [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
2021-03-22 16:36:04 +01:00
donovaly
b483fc0518 [PD] make pointers to the UI std::unique_ptr
Same as PR #4293, just for PartDesign

as noted in https://github.com/FreeCAD/FreeCAD/pull/4271#discussion_r554673632
the pointer to the UI should be a unique pointer.

This PR does this for all PartDesign dialogs that don't already use a unique_ptr.
2021-02-05 18:01:57 +01:00
donovaly
91ef59fdbe [PD] allow to pad in any direction
It saves a lot of work if one can directly pad in any direction and OCC allows this.

This PR adds the possibility to define a custom vector for the padding direction.
2020-09-12 16:33:44 +02:00
donovaly
ca03e64776 [PD] bind expression to pad offset
It is strangely not possible to use an expression for a pad offset, but this works fine, see the forum for an example.

Thus allow this.
2020-08-08 13:04:34 +02:00
Zheng, Lei
cd2b7e297c PartDesign changes
* Mostly for supporting in-place editing

* Add new SubShapeBinder that support cross coordinate system,
  external, and sub-object binding
2019-08-17 15:15:47 +02:00
wmayer
e68021029d improve UpToFace option of pad/pocket for datum planes 2018-01-06 17:36:14 +01:00
luzpaz
8200c97ed2 Fix Techdraw UI typo found via crowdin + misc. typos
Ref: https://crowdin.com/translate/freecad/27911/en-eu#6503377
2017-11-26 15:48:20 +01:00
wmayer
dd7c91ddcf fix -Wextra in PartDesign 2016-09-22 18:34:56 +02:00
Mateusz Skowroński
a8d37dabbe QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-04-15 11:55:12 +02:00
Alexander Golubev
e8b323ba20 PartDesignGui: small rework to sketch-based task parameters
This done mostly for thurther unification them with other task
parameters/dialogs.
2016-04-12 18:12:21 +02:00
Alexander Golubev
9347f66a9e PartDesign/Gui: Move various utility stuff from Workbench to a separate file
Also do some header cleanup.
2016-04-12 18:12:17 +02:00
Alexander Golubev
5239f3447c PartDesign/Gui: start to unify view providers code
- Moved all common code for part design features view providers to a base
   class.
 - Move shared code for Sketch based features to newly created
   ViewProviderSketchBased class
 - Add ViewProviderSketchBased to initialization
 - Make Pad and Pocket ViewProviders to use the shared code
 - Minor fixes to TaskFeatureParameters and some derived classes
2016-04-12 18:12:15 +02:00
Alexander Golubev
984b0dd715 PartDesign/Task{Pad,Pocket}Parameters: massive refactoring
Give a massive refactoring to Task dialogs for pocket and pad.
This commit features:
 * Make Task dialogs for pocket and pad look nice in side-by side diff and
   cross import features missing in each other.
 * As a result it fixes several minor bugs.
 * Gives a rework to the UpdateUI function.
 * This one also fixes offset option support and migrates it to use unit
   framework.
2016-04-12 18:12:15 +02:00
Alexander Golubev
595f1e19f4 PartDesignGui: move signal connections in several parameter dialogs after ui initialization 2016-04-12 18:12:15 +02:00
Alexander Golubev
180985cec0 PartDesignGui: Make DressUp and SketchSupport propertie dialogs use common accept() structure 2016-04-12 18:12:15 +02:00
Alexander Golubev
6778c548f4 PartDesign: move common code for TaskDlg{SketcherBased,DressUp}Parameters into new base class
Added a new class: TaskDlgFeatureBased which currently contains common
code for TaskDlgSketcherBasedParameters::reject() as well as the same
methode for TaskDlgDressUpParameters.
It's likely that other Feature task dialogs will inherit this class too.
2016-04-12 18:12:15 +02:00
Alexander Golubev
b9983d5d2d PartDesign/Gui/TaskDlgSketchBasedParameters: emhance object hiding/unhiding on reject() 2016-04-12 18:12:14 +02:00
jrheinlaender
12bf1d58f6 Allow extruding from a datum plane to another face or plane, optionally with an offset 2016-04-12 18:11:53 +02:00
jrheinlaender
dfd27740a9 Some code unification for sketchbased features 2016-04-12 18:11:51 +02:00
jrheinlaender
2732f44b42 Miscellaneous fixes 2016-04-12 18:11:51 +02:00
jrheinlaender
54895922a4 Miscellaneous fixes 2016-04-12 18:11:50 +02:00
jrheinlaender
e78b43d7db bugfix for extrude to datum plane 2016-04-12 18:11:50 +02:00
jrheinlaender
de17a3ede4 Pad/Pocket: Allow extrude up to a datum plane 2016-04-12 18:11:50 +02:00
jrheinlaender
bf973e06c0 Refactored code of SketchBased features to have common code in an abstract superclass 2016-04-12 18:11:50 +02:00
jrheinlaender
4f643b2218 Made the rest of the PartDesign features aware of the Body 2016-04-12 18:11:49 +02:00
jrheinlaender
90d2508efb More bug fixes for Body insertion/deletion of features 2016-04-12 18:11:48 +02:00
jrheinlaender
0cd8fc816b Bug fixes for Body feature insert/remove functionality 2016-04-12 18:11:48 +02:00
jrheinlaender
fb85cd2899 Enhanced Pick dialog for PartDesign feature's sketches 2016-04-12 18:11:47 +02:00
wmayer
df05844d32 + in pad dialog make sure not to compare quantities with different units 2016-02-23 11:34:04 +01:00
Mateusz Skowroński
c275b35d48 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
Eivind Kvedalen
8e112bd2db PartDesign: Added support for expressions. 2015-09-21 14:51:09 +02:00
wmayer
3cd024fa71 + fixes #0001721: PartDesign Pad 'Up to face' face selection in the 3D view not working 2015-01-06 18:38:33 +01:00
wmayer
e9370e8096 + fixes #0001849: Enable Spin Boxes support for Pad, Fillet and Chamfer 2014-12-11 18:25:30 +01:00
wmayer
83b0654882 + select value in task pad panel 2014-06-10 12:33:56 +02:00
wmayer
b69b9ad6d9 + allow to always run macros, fix disappearing grid in sketcher 2014-05-13 16:20:51 +02:00
wmayer
55984a200f + fix flaws found with code analyzer tool 2014-05-07 13:09:44 +02:00
wmayer
54dd200b67 + Avoid to open two transactions when creating a pad 2014-02-28 10:02:59 +01:00