add_thread
Generate real helical ISO 60° thread geometry as a solid for FreeCAD, producing external studs or internal taps with specified diameter, pitch, and length.
Instructions
Generate a REAL helical ISO-style 60-degree thread as a static solid.
Unlike hole/list_thread_options (which only flag a thread as metadata),
this cuts actual helical geometry: a truncated triangular rib swept along a
helix and fused to a core cylinder.
All lengths in mm, angles in degrees. diameter: nominal MAJOR (crest) diameter, mm. For internal=True this is the bore the tap fits. pitch: thread pitch, mm per turn (e.g. M8 coarse = 1.25). length: threaded length along +Z from z=0, mm. internal: False (default) -> a finished externally-threaded stud. True -> a TAP/insert cutting-tool solid sized to the bore; fuse it into (or cut it from) a bored hole in your part to produce a threaded bore. starts: number of thread starts, >=1. Multi-start repeats the helix rotated by 360/starts and uses lead = pitch*starts. grade: optional material / property class as ordered ("8.8", "A2"). Changes no geometry; it completes the DIN 976-1 threaded-rod designation stamped on an EXTERNAL single-start thread — that solid is studding, a thing you buy by the metre. An internal thread is a tap-shaped cutting tool and a multi-start is not a stock item, so neither is designated at all. placement: optional [x, y, z] mm translation of the solid's base (default at the origin, axis along +Z). name: optional object name.
Geometry note: the modeled minor (root) uses the ISO 5H/8 truncation; the reported minor_diameter uses the standard ISO formula diameter - 1.0825*pitch. Fallback behaviour: if the helical sweep cannot produce a valid solid the tool returns a plain cylinder tagged with the thread spec and modeled=False (this is rare for sane M-series inputs); always check the modeled flag.
Returns {handle, name, volume (mm^3), major_diameter (mm), minor_diameter
(mm), pitch (mm), length (mm), starts (int), internal (bool), modeled (bool),
designation, orderable, catalog}. Studding is bought by the bar and cut, so any
length up to the longest stock bar reads as stocked with a note that it is a
cut.
Mating numbers: drill/bore minor_diameter to tap an internal thread; clear a
major_diameter (+clearance) hole to pass an external stud.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Thread | |
| grade | No | ||
| pitch | Yes | ||
| length | Yes | ||
| starts | No | ||
| diameter | Yes | ||
| internal | No | ||
| placement | No |