[PD] fix Helix creation bug

Helices with zero height and zero growth are valid as long as there are no more than 1.0 turns.
This commit is contained in:
Uwe
2021-12-24 01:10:21 +01:00
parent 4ca362df0a
commit 3cff3202ef

View File

@@ -161,7 +161,8 @@ App::DocumentObjectExecReturn* Helix::execute(void)
if (Turns.getValue() < Precision::Confusion())
return new App::DocumentObjectExecReturn("Error: turns too small!");
if ((Height.getValue() < Precision::Confusion())
&& (abs(Growth.getValue()) < Precision::Confusion()))
&& (abs(Growth.getValue()) < Precision::Confusion())
&& Turns.getValue() > 1.0)
return new App::DocumentObjectExecReturn("Error: either height or growth must not be zero!");
Pitch.setValue(Height.getValue() / Turns.getValue());
if (Height.getValue() > 0) {