Commit Graph

21 Commits

Author SHA1 Message Date
wmayer
d4f0eb5bfb PD: fix ProfileBased::getAxis
Introduce an enum to verify the axis depending on the used context.
* For helix no restriction is needed
* For Pad/Pocket the axis must not be parallel with the sketch plane
* For Revolve/Groove the axis must not be perpendicular with the sketch plane
2021-12-02 17:24:18 +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
4a3d211378 [PD] prevent invalid helix geometry
in the height-turns-growth model height and growth must not be equally zero
2021-11-29 01:34:03 +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
wmayer
fa86b0216e Mod: make sure to call the base class' handleChangedPropertyType 2021-09-15 14:07:32 +02:00
donovaly
8e3ebc07ed [PD] fix property issues
- Helix: the property Turns has the App::PropertyFloatConstraint thus also the pointer to it must have the same property

- LinearPattern and Helix: make constraints static class member (forgot this in commit 114bdf6b)

- Draft: make the constraint const

- PolarPattern and LinearPattern assure that the header file is loaded at last to avoid potential troubles
2021-07-11 01:43:38 +02:00
wmayer
27049b3e54 PD: remove superfluous code block from Helix::execute 2021-03-28 13:38:53 +02:00
wmayer
2df88592ec PD: replace error-prone strings with enum to handle different helix modes 2021-03-28 13:37:13 +02:00
tomate44
1a8b840709 PartDesign Helix: update NbTurns in Pitch-Height-Angle mode 2021-03-28 13:13:10 +02:00
David Osterberg
f824603614 PartDesign: New input mode, and allow spirals to be created 2021-03-10 15:36:40 +01:00
donovaly
feabd1af30 [PD] use same helix angle step as for other features
All other PD features use a step size of 1.0 for angles.

(Personally also for me a step of 5 is not convenient)
2021-03-04 11:08:41 +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
donovaly
fc36ab6c64 [PD] set constraints for helix properties
at the moment it is possible by a click to set e.g. -1 turn which would cause an error
2021-03-03 17:25:40 +01:00
David Osterberg
0e8e5c8d49 PartDesign: Fix helix for OCC versions < 7.5.0 2021-02-19 20:02:11 +01:00
David Osterberg
fc6b98e4d7 PartDesign: Mild code cleanup of Helix 2021-02-18 21:51:44 +01:00
David Osterberg
86f148175f PartDesign: Improve Helix parameter proposals
The previous initial proposed parameters could cause self intersection
when the user switches axis
2021-02-15 16:48:42 +01:00
David Osterberg
bad8257370 PartDesign: Fix sign error in Helix 2021-02-06 08:22:37 +01:00
David Osterberg
a819a89ede PartDesign: fix regression in Helix 2021-02-05 20:55:34 +01:00
David Osterberg
a45e6038b7 PartDesign: [Helix] Fix helix starting point bug 2021-02-05 19:17:00 +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