From 9dcc20344bb3f8900b98fa65286bd14f468ca910 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 30 Sep 2013 13:18:32 +0200 Subject: [PATCH] + Apply patch for helix but deactivate it for the moment --- src/Mod/Part/App/TopoShape.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 1ff3c409f..2debe2132 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -1540,12 +1540,11 @@ TopoDS_Shape TopoShape::makeHelix(Standard_Real pitch, Standard_Real height, if (height < Precision::Confusion()) Standard_Failure::Raise("Height of helix too small"); - if (radius < Precision::Confusion()) - Standard_Failure::Raise("Radius of helix too small"); - gp_Ax2 cylAx2(gp_Pnt(0.0,0.0,0.0) , gp::DZ()); Handle_Geom_Surface surf; if (angle < Precision::Confusion()) { + if (radius < Precision::Confusion()) + Standard_Failure::Raise("Radius of helix too small"); surf = new Geom_CylindricalSurface(cylAx2, radius); } else { @@ -1568,6 +1567,15 @@ TopoDS_Shape TopoShape::makeHelix(Standard_Real pitch, Standard_Real height, Handle(Geom2d_Line) line = new Geom2d_Line(aAx2d); gp_Pnt2d beg = line->Value(0); gp_Pnt2d end = line->Value(sqrt(4.0*M_PI*M_PI+pitch*pitch)*(height/pitch)); +#if 0 // See discussion at 0001247: Part Conical Helix Height/Pitch Incorrect + if (angle >= Precision::Confusion()) { + // calculate end point for conical helix + Standard_Real v = height / cos(angle); + Standard_Real u = (height/pitch) * 2.0 * M_PI; + gp_Pnt2d cend(u, v); + end = cend; + } +#endif Handle(Geom2d_TrimmedCurve) segm = GCE2d_MakeSegment(beg , end); TopoDS_Edge edgeOnSurf = BRepBuilderAPI_MakeEdge(segm , surf);