From 3cff3202efacf87e146e1b445ed5b702b6cfa2df Mon Sep 17 00:00:00 2001 From: Uwe Date: Fri, 24 Dec 2021 01:10:21 +0100 Subject: [PATCH] [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. --- src/Mod/PartDesign/App/FeatureHelix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Mod/PartDesign/App/FeatureHelix.cpp b/src/Mod/PartDesign/App/FeatureHelix.cpp index d983991a97..57ccfe8a0d 100644 --- a/src/Mod/PartDesign/App/FeatureHelix.cpp +++ b/src/Mod/PartDesign/App/FeatureHelix.cpp @@ -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) {