Commit Graph

26 Commits

Author SHA1 Message Date
Jonas Bähr
5266ecf36f PD: Use the helix property docs as tooltip in the task panel
By reusing the property docs as tooltip we avoid maintaining the same
information in two places. The propery descriptions have been made
translatable, too, to ensure a fully translatable UI.
The ground work for this was layed by the work on Issue 0002524, long
time ago: https://tracker.freecadweb.org/view.php?id=0002524
2022-01-03 11:40:29 +01:00
wmayer
2c8ae49f48 PD: [skip ci] improve readability of argument list 2021-12-19 22:02:08 +01:00
Uwe
b0bf7f5e5f [PD] style improvements for Helix
all done automatically by MSVC
2021-12-19 17:52:33 +01:00
Jonas Bähr
cfb3e7eaf6 PD: Fix assignment of Angle/Growth properties
Depending on the input mode, either `Growth` or `Angle` is used to create
a conical or flat spiral. The respective other can easily be calculated
to give consistent view. This is already done for the other properties,
e.g. `Height` is calculated from `Pitch` and `Turns`.
With this patch, the same is done for `Angle` and `Growth`.
2021-12-19 16:21:51 +01:00
wmayer
90db4c885b PD: eliminate the boolean argument from TaskSketchBasedParameters::onSelectReference 2021-12-07 11:04:22 +01:00
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
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
wmayer
b165947625 PD: cleanup the mess with boolean arguments and replace them with a bitmask 2021-12-03 14:46:19 +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
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
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
donovaly
b868dbbe7f small fixes as suggested by @chennes
therefore also in the helix code
2021-09-20 00:59:17 +02:00
wmayer
2df88592ec PD: replace error-prone strings with enum to handle different helix modes 2021-03-28 13:37:13 +02:00
David Osterberg
f824603614 PartDesign: New input mode, and allow spirals to be created 2021-03-10 15:36:40 +01:00
wmayer
215eeb0afa PD: [skip ci] in the helix dialog use step size of 5 degree for the angle 2021-03-04 11:09:54 +01:00
wmayer
cffe8d19fd PD: [skip ci] in the helix task dialog use the value range defined in the helix feature 2021-03-03 17:40:11 +01:00
David Osterberg
34a44073c1 PartDesign: Allow customization of Helix preview modes 2021-03-03 17:15:08 +01:00
David Osterberg
c862ec458c PartDesign: Allow use of circle edge as axis in ProfileBased 2021-03-01 14:48:24 +01:00
David Osterberg
b0773e2b99 PartDesign: Helix: fix preview 2021-02-17 13:19:06 +01:00
donovaly
bcadbe3b1b [PD] rename icons to match Wiki files
For the What#s this feature we need to have a uniform naming of the features and its icons. For some PD icons this is not the case and since we are in feature freeze, this is the right time to address this.
(I see the same is already done for Mesh.)
2021-02-11 12:47:25 +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
David Osterberg
cb2da22e86 PartDesign: New features AdditiveHelix and SubtractiveHelix
These features, based on the code for the Pipe class, allow the user
to simply create a helical sweep within PartDesign workbench.

Sample application is threads, springs, coils, augers, etc.

Also, remove needless requirement for positive cone angle on helixes.

Thanks to @bitacovir for helping with the icons
Thanks to @chennes for review
Thanks to @vosk for review
Thanks to @wwmayer for review

Enforce that links stay within scope for ProfileBased features
This also ensures that the Body itself is not used for creating features within
the body, causing a "Graph not a DAG" error.
2021-02-04 13:01:12 +01:00