Commit Graph

30 Commits

Author SHA1 Message Date
wmayer
3608ee7f51 PD: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
Uwe
802aa53aa1 [PD] [skipCI] minor header fixes 2022-03-23 01:37:46 +01:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
c6b719a45c [PD] Helix: remove unused includes 2022-02-19 17:18:45 +01:00
Jonas Bähr
88063627d2 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
6d4d433080 PD: [skip ci] improve readability of argument list 2021-12-19 22:02:08 +01:00
Uwe
3d03f0a468 [PD] style improvements for Helix
all done automatically by MSVC
2021-12-19 17:52:33 +01:00
Jonas Bähr
bb3d02298d 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
a27b3067ba PD: eliminate the boolean argument from TaskSketchBasedParameters::onSelectReference 2021-12-07 11:04:22 +01:00
Uwe
1e4c7a2de9 [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
3cef5da1ad [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
3ee1d91b88 PD: cleanup the mess with boolean arguments and replace them with a bitmask 2021-12-03 14:46:19 +01:00
luz paz
0042f58e4c 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
3cddf78b5e PD: refactoring of TaskHelixParameters 2021-11-30 11:47:06 +01:00
wmayer
46e516f5d3 PD: fix crash in TaskHelixParameters::updateStatus() 2021-11-30 10:36:36 +01:00
wmayer
ffe240a539 PD: refactoring of TaskHelixParameters, update status after each recompute 2021-11-29 22:14:14 +01:00
wmayer
41efee1b4c PD: handle language change in TaskHelixParameters 2021-11-29 20:14:29 +01:00
Uwe
955af2fa8d [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
169c38622c [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
6ce6a8a1e0 small fixes as suggested by @chennes
therefore also in the helix code
2021-09-20 00:59:17 +02:00
wmayer
ac3ce00b63 PD: replace error-prone strings with enum to handle different helix modes 2021-03-28 13:37:13 +02:00
David Osterberg
98b52b09d6 PartDesign: New input mode, and allow spirals to be created 2021-03-10 15:36:40 +01:00
wmayer
55896f316e 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
ac23438eb6 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
318972ce70 PartDesign: Allow customization of Helix preview modes 2021-03-03 17:15:08 +01:00
David Osterberg
f1d6c78cbe PartDesign: Allow use of circle edge as axis in ProfileBased 2021-03-01 14:48:24 +01:00
David Osterberg
8e16225b03 PartDesign: Helix: fix preview 2021-02-17 13:19:06 +01:00
donovaly
2834075d6a [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
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
David Osterberg
59ec3cb141 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