# ThreadProfile
**Repository Path**: aaabbccd/ThreadProfile
## Basic Information
- **Project Name**: ThreadProfile
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: LGPL-2.1
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-02-24
- **Last Updated**: 2026-02-24
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# ThreadProfile Workbench
## Toolbar Icon
Download the SVG Toolbar Icon
## Installation
Can be installed via the AddonManager in Tools menu -> AddonManager.
## Overview
Use the 2d profile object created with this workbench to create threads by sweeping it along a helix of the appropriate height and pitch. It is compatible for use in both the Part and Part Design workbenches in FreeCAD. To use in Part Design if there is an active body the ThreadProfile object will be created inside the body. Then select the ThreadProfile object and click the Make Helix toolbar icon to create a helix. A new shapebinder will be created linking the helix, and the helix will be hidden. You can then sweep it as you would a sketch using either the Additive Pipe (for external threads) or the Subtractive Pipe (for internal threads). In Part workbench you would use the Sweep tool, which would then need to be cut (if an internal thread) from a suitable object, such as an extruded hexagon.
## See also
Threadmaker macro
## Advantages
There are a number of advantages to using ThreadProfile objects in your threads:
* It's quicker and easier than sketching your own traditional thread profile.
* It's possible to make custom threads of any desired diameter and pitch, including ANSI, such as 1/4" 20 TPI.
* All of the threads I've made so far in testing have passed Check Geometry with BOP Check enabled.
## Details
The ThreadProfile object is really just a glorified rebranded Draft BSpline object. In fact, the template code for producing it was unabashedly copied directly from the Draft workbench for use as a starting point, which I then modified to meet my needs. In particular, the necessary properties, such as Pitch and Minor Diameter were added, along with the code necessary to produce the desired BSpline object.
## Create V thread profile Command
This creates the V thread ThreadProfile object with default properties. Create it first, and then set the desired properties in the data tab of the combo view. There are a number of presets available, but you should double-check these by taking a cross-section of both parts to check the fit, then adjust the minor diameter accordingly. If there is an active Part Design Body, the object will be placed inside it. Failing that, if there is an active Part container the object will be placed into that.
New for v1.75 there is a Variants property in V thread types (hidden for other types) that allows 4 options: "60" -- the standard v thread, "45" -- a non-standard experimental 45 degree variant hopefully more 3D printer friendly, "2-Start" -- a 2-start v thread, and "3-Start" a 3-start v thread. (Variants was previously called "Angle" in v1.74, so any objects created with that version will probably be broken and will need to be rebuilt.)
## Create Buttress thread profile Command
This creates the Buttress thread ThreadProfile object with default properties. Create it first, and then set the desired properties in the data tab of the combo view. If there is an active Part Design Body, the object will be placed inside it. Failing that, if there is an active Part container the object will be placed into that.
These are ANSI B1.9-1973 (R2007), Class 2 -- Standard Grade, 7 degree / 45 degree flat-rooted buttress threads. (Class 3 -- Precision Grade would have 2/3 the tolerance of these for a tighter fit.) The tolerance is based on a thread length engagement of 10 threads. Shorter engagements could use a tighter fit and still work, longer engagements might require more tolerance. You can adjust the tolerance by adjusting the minor diameter after selecting one of the presets. Make the external minor diameter larger and the internal minor diameter smaller if you want a tighter fit, and vice versa for a looser fit.
There are other diameter / pitch combinations in the standard than are provided in the presets. The ones provided are only the recommended combinations. You can set the minor diameter and pitch to any values you want, but you'll need to work out the tolerances for yourself.
## Create Bottle thread profile Command
![]()
This creates a bottle thread object (SP4xx M type) 45 degree / 10 degree buttress thread.
## Make Helix Command
The Make Helix command creates a Helix and sets its Pitch property to match the Pitch property of the ThreadProfile object. This property is linked parametrically, thus any change to the ThreadProfile.Pitch property will also cause the Helix.Pitch property to update itself. We also set the Helix.Height property to ThreadProfile.Pitch * ThreadProfile.ThreadCount, thus ensuring the Helix.Height property is such that the thread produced in the sweep will have Thread Count threads. This is also parametrically linked. As of v1.70 the helix will be attached to the object the thread profile is attached to via expressions. That way if you attach the thread profile to something else after creating the helix the helix will also attach itself to the same object in the same map mode.
If there exists an active Part Design body when the helix is created, then the helix will be placed in the active body. This seems to work fine, so no more need for adding a shapebinder.
## Do Sweep Command
The Do Sweep command will perform the sweep for you. To use it you must first select the ThreadProfile object to sweep and the helix to sweep it along, then activate the command either from the toolbar or menu.
If a helix is selected, then the operation performed is a Part workbench Sweep, with solid = True and Frenet = True. This happens even if there is an active body and even if the ThreadProfile object is in the active body. If there is an active body, then an AdditivePipe is performed unless the InternalOrExternal property is set to "Internal", in which case the Part Design Subtractive Sweep is used.
Be wary of coplanar issues when cutting internal threads out of existing material. If the Cut (or SubtractivePipe) seems to have failed it could be because of the issues FreeCAD has with coplanar boolean operations. The solution for this is to move either the base object or the cutting tool slightly.
## Open Online Calculator Command
Opens on online calculator for the metric sizes or for the ANSI UN and UNR inch sizes or for the ANSI Buttress sizes in the default browser. It is possible (I think) that FreeCAD might not have permission to do this. If so, then it will likely fail. Use the calculator to get the minor diameter for the thread you wish to make. For inch sizes, the 2A and 2B tolerances are for the normal fit. For Buttress threads class 2 is normal, class 3 is tighter fit. For metric size v threads the 6g tolerance is for normal fit. Typically there will be 2 minor diameters to select from: a minimum and a maximum. If you make the internal thread a little bit smaller the fit will be tighter. If you make the external thread a little bit smaller the fit will be looser. A good way to check the fit is to make the nut and the screw at the same time, then use the Part workbench cross-section tool to check the fit.
## Parameterization Property
This property can change the shape of the threadprofile object. If you are not satisfied with the looks of the threads when viewed up close after zooming in, you can try modifying this property to see what difference it makes. Default is 1.0. It's value can range from 0.0 to 1.0.
## Quality Property
The ThreadProfile object appears at first glance to be a simple circle, but it's not. As mentioned above, it's a BSpline. Think of it as a circle with a varying radius around the circumference. For every degree there are 2 points used to define the curve, 720 points in all. Quality 2 profiles use only every other point, in other words 360 points or 1 point per degree. Quality 3 uses only every 3rd point, and so on, up to 240 Quality settings at this time. Previously I thought Quality 1 was always better because there were more points defining the curve, but counter-intuitively this is not the case. More is not always better. I've set new defaults for this property for the different profile types. Examine your threads up close by zooming in. If they appear rough try experimenting with different Quality values.
See also Deviation property, which now defaults to 0.1 for better looking rendering of the threads.
## Deviation Property
This sets the ViewObject.Deviation property of the Body if in Part Design or the Sweep object if in Part workbench to default of 0.1. This makes the threads look much better on the screen when being rendered, but can also slow down FreeCAD. Setting this to 0.5 will speed things up some, but at the expense of not as good looking threads. I believe FreeCAD default for this is 0.2. Set this to 0 if you want to set the deviation value of the body or sweep and have it not changed on recomputes.
## Pitch Property
This is the pitch for the thread. You also need to set this in the Helix Pitch property. If you wish to make ANSI threads, such as 1/4-20, for example, you would set this value to 25.4/20 if you are in mm units or 1/20 if you are using inch units. I keep FreeCAD in mm units, so I would use 25.4/20 for the Pitch for that thread.
## Minor Diameter
This is the minor diameter of your thread. This is *NOT* the nominal diameter. You need to look this value up and use the one for your desired nominal diameter, pitch, and fit tolerance. Here are links to online calculators for Unified Inch Screwthreads, Metric, and for ANSI Buttress
## Continuity
What is this? This is a property of the underlying BSpline object. This is readonly and is only included for informational purposes. Normally, this should be C2 continuity. You can read more about smoothness here.
## Height
This is the height of the sweep object (in mm). Adjusting this adjusts the ThreadCount property to set the height.
## Version
This is the version of the ThreadProfile workbench used to create the ThreadProfile object, not the version of the ThreadProfile workbench currently installed.
## Thread Count
When a Helix is created using the Make Helix command the Height property of the Helix is set to a height such that Thread Count number of threads will be created. As of v1.77 this is now readonly. Use the Height property instead.
## Presets
These are some presets I added to version 1.30 (likely to be expanded some in future versions). I'm not entirely sure how accurate the data is. Do not blindly rely on it. You should still lookup the minimum and maximum minor diameters for your desired fit tolerance. If you are
modeling both the internal and the external threads for a project it is a good idea to take cross sections of both so you can inspect the fit on the screen.
## FAQ
* When zooming in close the thread surface looks very rough. What can be done about this?
** I believe this only affects the way the object appears on the screen. Here are some things you can do to try to improve the appearance. Switch to the view tab of the sweep object (or body if in Part Design) and adjust the Deviation property to something like 0.1. The Angular Deflection property might also have an effect. This should smooth the surface rendering, but at the expense of longer processing times. Check the Quality property of the ThreadProfile object and see if changing that up or down can help the appearance. Check the Parameterization property and try different settings for it, for example, 0.25 instead of 1.0.
* Why is there a line running up the thread?
** There are actually multiple lines. One is is the BSpline's seamline. If you Pad / Extrude the profile you can see this seamline as a straight edge, similar to what you see in cylinders and extruded / padded circles. The others are the seamlines from the helix.
* My internal threads are always external. What am I doing wrong?
** Use subtractive pipe in Part design to cut the internal thread out of an existing shape, e.g. a Pad. In Part workbench use the Sweep object as a cutting tool to cut it out of an existing shape, e.g. an extruded hexagon. (Ensure you have selected "Internal" in the "Internal Or External" ThreadProfile property when making internal threads.)
* Is it possible to access this via Python scripting?
** Yes. Use:
import ThreadProfileCmd ThreadProfileCmd.ThreadProfileCreateObjectCommandClass().makeThreadProfile() or ThreadProfileCmd.ThreadProfileCreateButtressObjectCommandClass().makeButtressThreadProfile()
def cd(txt, tpi, nominal): #cd = calculate diameters
pitch = 25.4/tpi
length_of_engagement = 10 * pitch #10 * pitch, longer engagements should have more tolerance
nom = nominal * 25.4
minor = nom - 0.66271 * pitch
tolerance = 0.002 * (nom)**(1/3) + .00278 * length_of_engagement**(1/2) + 0.00854 * pitch**(1/2)
return[txt, pitch, minor - tolerance, minor + tolerance]