Commit Graph

1242 Commits

Author SHA1 Message Date
Uwe
242531b1c2 [PD] improve selection mode exit for Helix
exit the selection mode if selection was got - like we do it for all other PD features
2021-12-07 04:18:33 +01:00
wmayer
a12695e44f Gui: move methods startDefaultEditMode() and addDefaultAction() to ViewProviderDocumentObject 2021-12-06 19:24:26 +01:00
wmayer
d360917583 PD: 0004742: Editing features by context menu may not be undoable 2021-12-06 14:11:10 +01:00
Uwe
dd639cbe8d [PD] fix division by zero in Helix
- when a helix is defined in the growth mode it can have a pitch of zero

This commit fixes the resulting division by zero by directly setting the known turns
2021-12-06 02:40:34 +01:00
Uwe
45db2195d3 [PD] add missing tooltips for Helix dialog 2021-12-05 19:21:27 +01:00
wmayer
b9d2aca09f PD: refactor ReferenceSelection 2021-12-03 21:38:28 +01:00
wmayer
0579052cbc PD: comment out dead code 2021-12-03 20:18:46 +01:00
0penBrain
2f8f4d6a7f [Gui] UserEditMode : fix operating on PartDesignObject 2021-12-03 16:53:30 +01:00
wmayer
945028847a PD: avoid include generated .ui file in header file 2021-12-03 15:59:15 +01:00
wmayer
e9c4f4acc1 PD: minor cleanup in view provider headers 2021-12-03 15:58:23 +01:00
wmayer
b165947625 PD: cleanup the mess with boolean arguments and replace them with a bitmask 2021-12-03 14:46:19 +01:00
Yorik van Havre
9135b5ec90 Merge pull request #5219 from luzpaz/gender-neutral-fixes
Make source code comments use gender neutral pronouns
2021-12-03 13:36:17 +01:00
wmayer
0711f6003b PD: use button group to make mid-plane and reversed option mutual exclusive 2021-12-03 00:01:49 +01:00
luz paz
d877ee4d47 Make source code comments use gender neutral pronouns
The changes also include some grammatical fixes as well.
2021-12-02 16:18:04 -05:00
wmayer
5e66475757 PD: fix build failure with C++20 2021-12-01 23:24:16 +01:00
wmayer
d56b05678f PD: refactoring of TaskHelixParameters 2021-11-30 11:47:06 +01:00
wmayer
1ecc59d6a4 PD: fix crash in TaskHelixParameters::updateStatus() 2021-11-30 10:36:36 +01:00
wmayer
0cd9ed7429 PD: refactoring of TaskHelixParameters, update status after each recompute 2021-11-29 22:14:14 +01:00
wmayer
3b4012719e PD: handle language change in TaskHelixParameters 2021-11-29 20:14:29 +01:00
Uwe
6051148b66 [PD] use existing definition for PI in Helix
- also a lot of style fixes kindly done by MSVC
2021-11-29 12:05:10 +01:00
Uwe
bd2dbeb906 [PD] allow negative helix growth
Helices that become smaller with every turn are geometrically perfectly valid. Therefore we cannot forbid this.

(For example when creating a helix from a face you often cannot move it so that you can apply a positive growth.)
2021-11-29 11:29:27 +01:00
Uwe
c302582823 [PD] allow to move sweep sections
Now that we have the feature that sweeps can have vertices as end or begin of a sweep, there is the need for the feature to move sections. For example vertices may only be the last section.
2021-11-29 00:13:23 +01:00
Uwe
42c3843bed [PD] fix increment of helix growth
- it is not sensible that all helix geometries use 1 as increment in the dialog but the growth uses 5. Looking at the PR that introduced this feature it seems that this was just a copy issue from the angle edit since this uses 5 as increment.

- the other changes are from Qt's Designer
2021-11-29 00:11:40 +01:00
Jonas Bähr
021cdd7acc [PD] Helix: Offer profile's normal as axis
Previously, only the vertical and horizontal axis of the profile was
selectable in the task panel of the additive/subtractive helix. Now the
profile's normal axis can be selected, too. This now allows to create
helical extrusions or "twisted pockets".

The order of the GUI entries was chosen to be in line with the order of
axis selection of the multi-transform parameters.
The actual feature's implementation needed adaption for this special case
as in some places a unit vector (`gp_Dir`) was derived from the cross-
product of axis and profile normal -- a null-vector when the axis *is*
the normal. This caused the gp_Dir's ctor to throw.
2021-11-28 23:57:41 +01:00
Ajinkya Dahale
5e3ad45ef4 [PD] Use compare to compare strings instead of substr
Used when finding subelements of a feature. Many of the comparisons used to also
check for string lengths, but as far as I can tell they are not strictly
necessary (see https://www.cplusplus.com/reference/string/string/substr/) and
just `substr` can be used without them. However, `compare` explicitly is for
comparing, and does not make a new object that `substr` does.
2021-11-28 22:05:46 +01:00
Ajinkya Dahale
2fcee8ea82 [PD] Support "punctual" sections for PD Pipe
Similar to PR #5170 for loft. This commit squashes the following commits.

[PD] Refactor `Pipe::execute` and support point sections

[PD] Allow point profile in selection-based pipe workflow

[PD] Only add sketch subs if it is vertex

[PD] Make both end faces of pipe regardless of point sections

Earlier we were checking if these faces correspond to point sections, but
apparently the end faces are independent of the order in which the sections are
added, so the "front" may be the face closest to the last added section, rather
than the "profile". Creating null faces and adding them for sewing together into
a solid does not appear to have side-effects so far.
2021-11-28 19:19:16 +01:00
wmayer
dd92764eb5 PD: fix bug in TaskExtrudeParameters
When switching from Custom direction to Select reference mode do not jump back to Custom direction mode after selecting an edge
2021-11-27 02:22:37 +01:00
wmayer
c20cfd5db6 PD: code-refactoring of TaskExtrudeParameters 2021-11-27 01:45:08 +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
26dd3ddeb3 PD: add enum class to TaskPocketParameters to avoid to work with magic numbers 2021-11-26 16:46:58 +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
Chris Hennes
ded7adb798 Revert "Merge pull request #4626 from pavltom/GUI_TreeView_Item_Ordering"
This reverts commit b0452667c72f330323f6b3366f45bf039d05feef, reversing
changes made to b2d99f3fa7b4c7c305aed4a8d975a8624a6d590f.

See forums discussion: https://forum.freecadweb.org/viewtopic.php?p=549120
2021-11-24 09:03:35 -06: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
Ajinkya Dahale
31bbabe817 [PD] Change some strings and comments in loft code
Suggestions by @donovaly.
2021-11-22 04:16:02 +01:00
Ajinkya Dahale
4d006a5098 [PD] Allow sketch point profile in selection-based loft workflow 2021-11-22 04:16:02 +01:00
Ajinkya Dahale
6f5159180b [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
039422572a PD: [skip ci] fix warning -Wunused-variable 2021-11-17 19:06:35 +01:00
Yorik van Havre
c4d4575eb3 Merged crowdin translations 2021-11-16 17:30:39 +01:00
wmayer
84e382a5a6 PD: simplify Pad/Pocket commands 2021-11-16 00:58:55 +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
Uwe
8b8b04cfde [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
c138b75af0 [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
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
Ajinkya Dahale
15225b3b09 [PD] Allow body faces when making loft by pre-selection 2021-11-12 01:33:46 +01:00
Uwe
5a2f962b05 [PD] TaskDlgPipeParameters - refactor comments
update/refactor comments after today's changes
2021-11-12 00:44:35 +01:00
Uwe
3eed892880 [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
e6fcfc47fb PD: make sure to switch off Profile and Section highlighting when closing sweep dialog 2021-11-11 20:33:27 +01:00
wmayer
308a5e4c63 PD: change visibility handling of sweep to support undo/redo 2021-11-11 20:21:47 +01:00
Chris Hennes
8d1735741b 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