Skip to content

Commit

Permalink
Enhance makeHelix to also support helixes that spiral downwards.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlampert committed Nov 28, 2016
1 parent 3ce5ea6 commit fcc1878
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Mod/Part/App/TopoShape.cpp
Expand Up @@ -1659,12 +1659,15 @@ TopoDS_Shape TopoShape::makeHelix(Standard_Real pitch, Standard_Real height,
Standard_Boolean leftHanded,
Standard_Boolean newStyle) const
{
if (pitch < Precision::Confusion())
if (fabs(pitch) < Precision::Confusion())
Standard_Failure::Raise("Pitch of helix too small");

if (height < Precision::Confusion())
if (fabs(height) < Precision::Confusion())
Standard_Failure::Raise("Height of helix too small");

if ((height > 0 && pitch < 0) || (height < 0 && pitch > 0))
Standard_Failure::Raise("Pitch and height of helix not compatible");

gp_Ax2 cylAx2(gp_Pnt(0.0,0.0,0.0) , gp::DZ());
Handle_Geom_Surface surf;
if (angle < Precision::Confusion()) {
Expand Down

0 comments on commit fcc1878

Please sign in to comment.