Commit Graph

84 Commits

Author SHA1 Message Date
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
8af563804c SPDX [ 49 ][ Src / Mod / PartDesign ] (#26715) 2026-02-07 22:53:31 -06:00
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
Markus Reitböck
5b6a0b1852 PartDesign: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
 should be considered an optimization, not a requirement. In particular, do not explicitly include a
 precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
 generated precompile header on the compiler command line instead. This is more portable across
 the major compilers and is likely to be easier to maintain. It will also avoid warnings being
 generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-23 22:39:36 +02:00
PaddleStroke
a346c266e7 PartDesign: Extrude 2 sides (#21794)
* PartDesign: extrude 2 sides

* Part: OpCodes XOR

* PartDesign: Remove deprecated generatePrism functions

* PartDesign: Extrude : Update Sides combobox strings

* Change "Sides" to "Mode"

* Use OpCodes::Extrude instead of Prism.
2025-08-25 17:17:23 +00:00
Kacper Donat
802af4c464 PartDesign: Add preview TaskBox to all feature task dialogs 2025-08-07 00:37:46 +02:00
Max Wilfinger
bee89d0447 PartDesign: Update UI strings for consistency and correct for new fuctions and typos
Closes: #22128
2025-08-04 20:15:04 +02:00
Benjamin Bræstrup Sayoc
ee90eb6ebc PartDesign: Use QStringLiteral 2025-02-10 18:34:57 +01:00
wmayer
5731a27609 PD: Add template helper functions to safely access feature or view provider
In subclasses of TaskFeatureParameters use the new helper functions and check for null pointer. This fixes #15453
2024-07-18 13:40:08 +02:00
Kacper Donat
b68da9d844 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
wmayer
ca1cb21498 PD: modernize C++: use equals default 2023-08-22 13:31:17 +02:00
Uwe
59c1741559 [PD] Pad/pocket: fix wrong error message
- the error can also occur when the mode it not UpToFace (ToFirst or ToLast)
- also add note when Reversed checkbox is enabled since this is no obvious (as discussed in the forum)
- also some whitespace unification and include sorting
2022-12-04 05:37:11 +01:00
Uwe
98dae1b217 [PD] TaskExtrudeParameters: simplify code
to avoid several time the same translatable string
2022-07-20 03:16:56 +02:00
adrianinsaval
0e22ada9dd [PD Pad/Pocket] Fix bug with midplane usage in TwoLengths mode (#7216)
* [PD Pad/Pocket] Fix bug with midplane usage in TwoLengths mode
2022-07-20 03:13:01 +02:00
Uwe
e4dfc42f33 [PD] improve face selection for Pad/Pocket
- this PR extends PR #7191 as described in this forum thread: https://forum.freecadweb.org/viewtopic.php?f=3&t=70327
2022-07-17 18:35:34 +02:00
Uwe
094ae93678 [PD] fix Pad/Pocket logic issue
- fixes the bug reported in https://forum.freecadweb.org/viewtopic.php?f=3&t=70266
  as Method #2
  -> When switching to two dimensions, symmetric must be unchecked if it is checked
2022-07-17 02:03:35 +02:00
Uwe
61d54b6078 [PD] Pad and Pocket: remove unused includes 2022-02-19 17:57:11 +01:00
Uwe
cfdf334b7f [PD] add option to create tapered Pad / Pocket
This PR adds the same functionality as provided by Part Extrude.
The used code parts are sorted out to a new helper function that is used by Part and PartDesign.
2022-02-02 01:04:06 +01:00
wmayer
ad7ab573eb PD: PrefQuantitySpinBox now requires an explicit entry name for the parameter group 2022-01-31 16:47:08 +01:00
Uwe
66864bbe7b [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
Uwe
626425526b [PD] sort out more Pad/Pocket code
as suggested in #5349
2022-01-10 14:33:02 +01:00
Uwe
5aadc54d18 [PD] Pad/Pocket: fix reverse behavior
- bring back intended behavior as in FC 0.19:
 - if 2 lengths, then midplane is invisible
 - if reversed checked, then no symmetric and if symmetric then no reverse
- unify the code for Pad and Pocket (reversed is always visible)
- fix a typo in a bool name
2022-01-08 01:15:23 +01:00
Uwe
7c158a3751 [PD] rename a UI file
Pad and Pocket share the same UI file therefore change the name to make this clear that changes in that file must be handled for Pad and Pocket
2022-01-07 20:36:29 +01:00
wmayer
cb8330d5bd PD: code-refactoring of TaskExtrudeParameters 2021-11-27 01:45:08 +01:00
wmayer
e412c3f4cc PD: add enum class to TaskPadParameters to avoid to work with magic numbers 2021-11-26 16:58:59 +01:00
wmayer
828b1b6d0a PD: add enum class to TaskPocketParameters to avoid to work with magic numbers 2021-11-26 16:46:58 +01:00
wmayer
6a0cf8233a PD: create a common base class of TaskPocketParameters and TaskPocketParameters to reduce code duplications 2021-11-26 16:23:45 +01:00
Uwe
1da079b34b [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
4c72df3480 [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
wmayer
3dc9acef62 PD: [skip ci] fix warning -Wunused-variable 2021-11-17 19:06:35 +01:00
Uwe
838bdf93bc [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
Uwe
4a4db353a5 [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
0995c81240 [PD] add feature to set direction for pockets
This PR adds the functionality of pads to pad along either a custom direction or along an edge to pockets.

So with this PR Pad and Pocket are on the same level of functionality.
2021-11-11 15:55:42 -06:00
Uwe
e06034e772 [PD] fix a typo
- also some sorting
2021-11-10 03:26:23 +01:00
0penBrain
586955e31b [PartDesign] Enable reverse ability for Pocket/UpToFace mode as it makes sense for curved faces 2021-08-17 12:07:02 +02:00
0penBrain
39ca142d5f [PartDesign] Restore 'Reversed' ability into Pocket/2dims mode 2021-08-17 12:07:02 +02:00
donovaly
2ac84872ec [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
acecdd8c57 [PD] allow expression for pocket offset
- also disable KeyboardTracking for some fields to avoid unnecessary and often time consuming recomputes while typing in
2020-08-10 13:39:50 +02:00
Zheng, Lei
11a93a0578 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
Abdullah Tahiri
663e4ee369 PartDesign: Extension of Pocket Feature to have two dimensions
fixes #2915
2018-01-20 16:15:38 +01:00
wmayer
f6ff4ed590 improve UpToFace option of pad/pocket for datum planes 2018-01-06 17:36:14 +01:00
luzpaz
56af703746 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
Kunda
99c99006b8 source typo fixes pt4 (only on py3 merged code) 2017-03-02 13:47:21 +01:00
wmayer
de7978434d fix Coverity issues 2016-08-19 22:51:33 +02:00
Mateusz Skowroński
b5519922d8 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
d43525370c 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
c782a11aab 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
5ee0cea467 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
0ca40ed48b 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
11a71d46e3 PartDesignGui: move signal connections in several parameter dialogs after ui initialization 2016-04-12 18:12:15 +02:00
Alexander Golubev
f16829baee PartDesignGui: Make DressUp and SketchSupport propertie dialogs use common accept() structure 2016-04-12 18:12:15 +02:00