From 33251daa12146a8c76dc976cbf09da2524809945 Mon Sep 17 00:00:00 2001 From: Alfredo Monclus Date: Sat, 3 Aug 2024 19:18:32 -0300 Subject: [PATCH] feat(PD): tapered threads support, NPT and BSPT are now possible --- src/Mod/PartDesign/App/FeatureHole.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/PartDesign/App/FeatureHole.cpp b/src/Mod/PartDesign/App/FeatureHole.cpp index 1e84a16f2e..3cafc412cf 100644 --- a/src/Mod/PartDesign/App/FeatureHole.cpp +++ b/src/Mod/PartDesign/App/FeatureHole.cpp @@ -2297,7 +2297,9 @@ TopoDS_Shape Hole::makeThread(const gp_Vec& xDir, const gp_Vec& zDir, double len helixLength = holeDepth + Pitch / 8; } } - TopoDS_Shape helix = TopoShape().makeLongHelix(Pitch, helixLength, Dmaj, 0.0, leftHanded); + double helixAngle = + Tapered.getValue() ? TaperedAngle.getValue() - 90 : 0.0; + TopoDS_Shape helix = TopoShape().makeLongHelix(Pitch, helixLength, Dmaj, helixAngle, leftHanded); gp_Pnt origo(0.0, 0.0, 0.0); gp_Dir dir_axis1(0.0, 0.0, 1.0); // pointing along the helix axis, as created.