diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index b67187db38..d8d0531751 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -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()) {