mwganson / ThreadProfile

Create 2d thread profile for sweeping along helix in Part or Part Design workbenches
GNU Lesser General Public License v2.1
43 stars 8 forks source link

Add Profiles/Support for NPT or Other Tapered Threads #55

Open bearclaws8 opened 1 year ago

bearclaws8 commented 1 year ago

Is it possible to add support for NPT or other tapered threads (e.g. BSP)? I was not sure if it was possible for the current code to deal with a tapered thread/helix, such as passing the thread taper off to the helix as an angle, or if they had to be built manually. The thread taper angle for all NPT is constant across all sizes so it could be defined as a fixed parameter. I was starting to build my own using the Part Helix command based upon data at this link: https://www.machiningdoctor.com/charts/thread-npt-charts/. However, it would be very useful if some of these were available as presets. Thank you.

mwganson commented 1 year ago

Because of the way the threads are made using this workbench I haven't been able to come up with a way to do tapered threads. You can think of the thread profile object as basically spinning as it rises straight up and leaving a solid behind. The pitch of the helix is telling it how many spins to make per millimeter of rise. You would need to scale the profile smaller as it spins to get a taper. The underlying FreeCAD Sweep (Part WB) and Additive/Subtractive Pipe (PartDesign WB) tools, which the workbench uses, don't support that type of scaling. You can use a tapered helix in the traditional way of making threads, which is sweeping a profile (typically a triangle) along a helix, to achieve a tapered thread.

pitch-circle commented 1 year ago

Is it considered rude to suggest an alternative solution to this problem?

The Threadmaker macro appears to have the ability to make tapered (NPT) threads:

https://forum.freecad.org/viewtopic.php?t=67071

mwganson commented 1 year ago

Not rude at all, as far as I'm concerned. Thanks for providing that link.