Commit Graph

1708 Commits

Author SHA1 Message Date
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
9283aa0f72 [PD] revert a part of commit 1da079b34
as discussed and polled in https://forum.freecadweb.org/viewtopic.php?f=8&t=64000
2021-11-25 03:19:31 +01:00
Chris Hennes
c9a74d40d2 Revert "Merge pull request #4626 from pavltom/GUI_TreeView_Item_Ordering"
This reverts commit c62239d0ba, reversing
changes made to bef1df4d40.

See forums discussion: https://forum.freecadweb.org/viewtopic.php?p=549120
2021-11-24 09:03:35 -06: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
d34a5616a2 PD: If pad/pocket is directly used on several faces then determine the normal of the first face 2021-11-22 11:52:17 +01:00
Ajinkya Dahale
ab26d4d0d2 [PD] Change some strings and comments in loft code
Suggestions by @donovaly.
2021-11-22 04:16:02 +01:00
Ajinkya Dahale
ea10dfd85d [PD] Allow sketch point profile in selection-based loft workflow 2021-11-22 04:16:02 +01:00
Ajinkya Dahale
4483c7afd1 [PD] Refactor Loft::execute() and support points for sections
This is a combination of 4 commits. Original commit messages follow.

[PD] Initial support for point sections in loft

This commit allows the last section in a loft to be a single vertex of a solid.
Currently single vertices of sketches or datum points are NOT supported.

[PD] Allow loft "profiles" to be points

Most reliably done in dialog-based workflow.

[PD] Allow loft last section to be sketch point

[PD] Refactor `Loft::execute`

Makes it easier to support adding a single-vertex sketch in profile or sections
field when selecting the sketch in tree (i.e. without selecting subelements).

[PD] Refactoring after PR #5176 is merged
2021-11-22 04:16:02 +01:00
Ajinkya Dahale
71e70c876b [PD] Use PropertyLinkSubList for loft and sweep sections
This change is necessary since we restrict part-design features to only use
other features from the same body.
2021-11-20 21:37:14 +01:00
wmayer
4fa4446f01 PD: [skip ci] code clean-up in pad and pocket feature 2021-11-20 12:01:55 +01:00
wmayer
ab480df745 PD: move duplicated code to common base class 2021-11-20 11:45:13 +01:00
wmayer
9ee60fd585 PD: Add common base class for Pad/Pocket 2021-11-20 10:34:01 +01:00
wmayer
3dc9acef62 PD: [skip ci] fix warning -Wunused-variable 2021-11-17 19:06:35 +01:00
Yorik van Havre
a26fb4db1a Merged crowdin translations 2021-11-16 17:30:39 +01:00
wmayer
cd2955f3d3 PD: simplify Pad/Pocket commands 2021-11-16 00:58:55 +01:00
wmayer
a8cb5ed419 PD: [skip ci] for pockets use opposite direction of reference axis 2021-11-16 00:35:57 +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
61481dc9c5 [PD] uniform pad and pocket handling
- since pockets now can have a certain direction, also handle the reference axis like for pad
- uniforms initial length to 10.0
2021-11-15 15:32:56 +01:00
Uwe
414f4d706e [PD] uniform Pad/pocket UI
now that pockets have the same functionality as pads, the UIs can be unified:

- the position of the Offset widget in the UI is better in pocket, thus use it for pad too
- add missing tabstops for pad
- add missing tooltip for pocket
- update tabstops for pocket
2021-11-14 03:58:21 +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
640ecca830 [PD] fix typos 2021-11-13 00:29:33 +01:00
wmayer
96512c1e01 PD: [skip ci] add PartDesignGlobal.h with export/import macros 2021-11-12 18:25:41 +01:00
Ajinkya Dahale
5aaf6e68b4 [PD] Allow body faces when making loft by pre-selection 2021-11-12 01:33:46 +01:00
Uwe
0b3839f0f6 [PD] TaskDlgPipeParameters - refactor comments
update/refactor comments after today's changes
2021-11-12 00:44:35 +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
wmayer
126fadd2d6 PD: make sure to switch off Profile and Section highlighting when closing sweep dialog 2021-11-11 20:33:27 +01:00
wmayer
fb9a3eecff PD: change visibility handling of sweep to support undo/redo 2021-11-11 20:21:47 +01:00
Chris Hennes
c62239d0ba Merge pull request #4626 from pavltom/GUI_TreeView_Item_Ordering
[Gui] Issue #3923 - Add arbitrary Tree View item ordering
2021-11-10 23:35:05 -06:00
Chris Hennes
bef1df4d40 Merge pull request #5163 from donovaly/PD-sweep-section-visibility2
[PD] fix sweep visibility bug
2021-11-10 22:43:49 -06:00
Uwe
969556573b [PD] code improvement for FeaturePad
as noted by @chennes in PR #5164, we should follow the C++ style guidelines:
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Res-if
2021-11-11 02:26:42 +01:00
Uwe
8173f79dc7 [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
Uwe
cc242aae7d [PD] handle changed property for loft and pipe
- this was missing in PR #5155
2021-11-11 01:24:53 +01:00
Ajinkya Dahale
a4fa45b589 [PD] Check if property is named before strcmp 2021-11-11 01:13:17 +01:00
Uwe
6069d48b6d [PD] fix sweep visibility bug
Currently:

    only sweep path is toggled correctly in its visibility, the profile is never shown
    the sections are always shown

This PR fixes this inconsistency reported here: https://forum.freecadweb.org/viewtopic.php?f=19&t=63544
2021-11-11 00:00:58 +01:00
Ajinkya Dahale
37df050d59 [PD] Clear other taskbox buttons in loft and pipe when one pressed 2021-11-10 17:59:45 +01:00
Uwe
e06034e772 [PD] fix a typo
- also some sorting
2021-11-10 03:26:23 +01:00
Ajinkya Dahale
314ff0053c [PD] Fixed loft and sweep breaking on section deletion
Item removal in `onDeleteSection()` was also clearing subname details so if one
of the remaining sections was a face this caused a failure.
2021-11-09 23:05:29 +01:00
Ajinkya Dahale
03a8ff7841 [PD] Support adding solid faces for loft and pipe sections
With these changes, one face per solid can be added as either the first
"profile" or subsequent sections in loft and pipe.

This commit depends on `App::PropertyXLinkSubList` preserving the order in which
sections are added.

A minor change this also adds is that when a solid's face is selected that face
is mentioned in the fields instead of the solid (eg `Box:Face1` instead of
`Box`).
2021-11-09 23:05:29 +01:00
wmayer
5c77af421d PD: [skip ci] fix crash in ReferenceSelection::allow 2021-11-09 18:37:54 +01:00
Uwe
0b77c2b2b5 [PD] fixes loft visibility on creation and modification
- the PR fixes the issue reported here: https://forum.freecadweb.org/viewtopic.php?f=3&t=63252

- (also a MSVC code formatting fix)
2021-11-07 21:57:00 +01:00
Uwe
0b4405e935 [PD] simplify Loft code
- also two automatic style fixes made by MSVC
2021-11-07 19:04:38 +01:00
wmayer
84274f5c80 PD: [skip ci] fix ambiguous shortcut overload in TaskDlgPipeParameters 2021-11-07 08:27:33 +01:00
Ajinkya Dahale
e30efba754 [PartDesign] Fix typo in method name 2021-11-06 00:03:48 +01:00
wmayer
8366028e6f PD: [skip ci] open a transaction when creating a new body with DlgActiveBody 2021-11-04 23:21:14 +01:00
Chris Hennes
d8f38a886a Merge pull request #5128 from luzpaz/freecad-translation-6
PD: Expose missing commands to translation in Measure dropdown menu
2021-11-01 00:22:28 -05:00
wmayer
a3a7b5a6a6 PD: [skip ci] if no active body exists then by default pre-select the first option to create a new body 2021-10-31 12:33:48 +01:00
0penBrain
0bd0ec5ed2 [PartDesign] Remove useless function overriding
Double-click is already handled by PartDesign::ViewProvider::doubleClicked()
 Overridings in Loft & Pipe brings no specific behavior
 By removing overridings, behavioral consistency is improved both in ...
 ... undo commands & body activation management when PartDesign items ...
 ... are double-clicked
2021-10-29 17:30:06 +02:00
Tomas Pavlicek
345dcd5252 [Gui] Issue #3923 - Arbitrary Tree item ordering + tests 2021-10-26 19:09:34 +02:00