From 7a201f9b7490e27d8bf04ac8b1dd1518061dfc36 Mon Sep 17 00:00:00 2001 From: WandererFan Date: Mon, 17 Nov 2014 17:03:41 -0500 Subject: [PATCH] Work around for Mantis issue 0954 on Helix Primitive To be removed after OCC helix bug corrected. --- src/Mod/Part/App/PrimitiveFeature.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Mod/Part/App/PrimitiveFeature.cpp b/src/Mod/Part/App/PrimitiveFeature.cpp index 2928c041c..5e357fe72 100644 --- a/src/Mod/Part/App/PrimitiveFeature.cpp +++ b/src/Mod/Part/App/PrimitiveFeature.cpp @@ -771,10 +771,14 @@ App::DocumentObjectExecReturn *Helix::execute(void) Standard_Boolean myLocalCS = LocalCoord.getValue() ? Standard_True : Standard_False; Standard_Boolean myStyle = Style.getValue() ? Standard_True : Standard_False; TopoShape helix; - if (myHeight / myPitch > 50.0) - this->Shape.setValue(helix.makeLongHelix(myPitch, myHeight, myRadius, myAngle, myLocalCS)); - else - this->Shape.setValue(helix.makeHelix(myPitch, myHeight, myRadius, myAngle, myLocalCS, myStyle)); + // work around for OCC bug #23314 (FC #0954) + // the exact conditions for failure are unknown. building the helix 1 turn at a time + // seems to always work. + this->Shape.setValue(helix.makeLongHelix(myPitch, myHeight, myRadius, myAngle, myLocalCS)); +// if (myHeight / myPitch > 50.0) +// this->Shape.setValue(helix.makeLongHelix(myPitch, myHeight, myRadius, myAngle, myLocalCS)); +// else +// this->Shape.setValue(helix.makeHelix(myPitch, myHeight, myRadius, myAngle, myLocalCS, myStyle)); } catch (Standard_Failure) { Handle_Standard_Failure e = Standard_Failure::Caught();