Commit Graph

36 Commits

Author SHA1 Message Date
wmayer
b1029bc682 PD: Replace helper functions in subclasses of TaskDlgFeatureParameters with a template function 2024-07-18 00:02:07 +02:00
Kacper Donat
988d31bed8 GUI: Add UI for Up To Shape feature
Add UI for Up To Shape feature and overall refactor of Pad / Pocket.
2024-06-10 18:05:21 +02:00
berniev
180edfa3cc Mod: Single arg ctors must be explicit 2022-08-24 16:55:20 +02:00
berniev
71dc5ead2f Mod: Use override etc 2 2022-08-09 12:52:26 +02:00
Uwe
4cd69ee774 [PD] Task dialogs: remove unused headers 2022-03-23 19:43:47 +01:00
wmayer
d1d4b996e7 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
34ea32928b [PD] Pad and Pocket: remove unused includes 2022-02-19 17:57:11 +01:00
Uwe
1e9ddc5302 [PD] Pad/Pocket: sort out duplicated code
the checkboxes are almost identical and it avoids work to have them in one location
2022-01-14 13:17:25 +01:00
wmayer
87c3b522d0 PD: add enum class to TaskPadParameters to avoid to work with magic numbers 2021-11-26 16:58:59 +01:00
wmayer
a58846c460 PD: create a common base class of TaskPocketParameters and TaskPocketParameters to reduce code duplications 2021-11-26 16:23:45 +01:00
Uwe
a09e18b3bb [PD] better solution for reversed pad/pocket handling
- let FeatureExtrude set the right direction
- use the UI as once intended: custom vector values are always taken as they are, so reversing a custom direction will not lead to a negation of the custom vector in the UI. The logic is: "take the vector as it is, and when Reversed is on, negate it additionally"
2021-11-23 04:22:37 +01:00
Uwe
165a09b3ed [PD] fix pad/pocket UI issues
- update the preview when the direction is changed in the dialog
- don't uncheck the direction viewbox without any reason
- only recompute once
- update the direction information on reversion
- only pocket: add missing code we have in pad (proper code merging will follow the next days)
2021-11-23 02:48:25 +01:00
Uwe
cf9e5a3f33 [PD] fix issue 0004785
- then the profile of a pad/pocket was a face, the direction handling was completely broken
2021-11-15 15:44:28 +01: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
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
Ian Rees
7e1cb6b445 Clean up warnings due to missing 'override'. 2016-06-16 14:14:52 +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
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
180985cec0 PartDesignGui: Make DressUp and SketchSupport propertie dialogs use common accept() structure 2016-04-12 18:12:15 +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
bf973e06c0 Refactored code of SketchBased features to have common code in an abstract superclass 2016-04-12 18:11:50 +02:00
wmayer
6a3d7fac55 + fix documentation of task dialog 2015-11-09 19:22:19 +01:00
Eivind Kvedalen
8e112bd2db PartDesign: Added support for expressions. 2015-09-21 14:51:09 +02:00
jriegel
7a7710873e Fully implement Units in PartDesign Pad 2014-02-09 16:23:06 +01:00
jrheinlaender
1d0be7954e PartDesign, 758, 766, 773, 775: several improvements, fixes and code refactoring for Pad and Pocket 2012-11-03 23:07:48 +01:00
wmayer
03f465faf6 0000865: Document.xml in project file contains invalid string 2012-11-02 12:46:42 +01:00
wmayer
52178f939b Add a check box to update 3d view or not 2012-08-17 15:36:13 +02:00
jrheinlaender
5ecef4adeb Pad feature: Midplane, two-sided dimensions, up to first/last/face options 2012-06-08 17:32:54 +02:00
wmayer
d6a0e3cf14 + 0000454: Illegal storage access crash when canceling pad
+ live update of changes on pad task panel

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5053 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-22 11:56:38 +00:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00