Work around for Mantis issue 0954 on Helix Primitive

To be removed after OCC helix bug corrected.
This commit is contained in:
WandererFan 2014-11-17 17:03:41 -05:00
parent 3904d0a8ee
commit 7a201f9b74

View File

@ -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();