Generate standardized ISO metric thread profiles optimized for 3D printing in XML format.
The browser generator is in web/index.html and is deployed through GitHub Pages.
-
Live URL: https://eckphi.github.io/CustomThreads/
-
Local preview:
cd web
python3 -m http.server 8080- Open
http://localhost:8080 - Generate and download
3DPrintedMetricThreads.xml - Use Copy Share Link to share a prefilled generator configuration via URL
The latest XML thread profiles are automatically generated and available as GitHub Releases:
Simply download the 3DPrintedMetricThreads.xml file and follow the installation instructions below.
- Download
3DPrintedMetricThreads.xmlfrom the latest release - Save it to your Fusion 360 thread data directory:
- Windows:
%localappdata%\Autodesk\webdeploy\Production\<version>\Fusion\Server\Fusion\Configuration\ThreadData - macOS:
~/Library/Application Support/Autodesk/Webdeploy/production/<version>/Autodesk Fusion 360/Contents/Libraries/Applications/Fusion/Fusion/Server/Fusion/Configuration/ThreadData
- Windows:
- Restart Fusion 360
- When creating threads, select "3D-Printed Metric Threads V3" from the thread type dropdown
Note: You can automate this installation with the ThreadKeeper plugin, which reinstalls profiles automatically after each Fusion 360 update.
.
βββ .github/workflows/ # CI/CD pipeline
β βββ generate-xml-release.yml
β βββ deploy-pages.yml
βββ src/customthreads/ # Python package (core logic)
β βββ __init__.py
β βββ models.py # Thread model classes
β βββ generator.py # XML generation utilities
β βββ cli.py # Command-line interface
βββ tests/ # Test suite
β βββ test_main.py
βββ web/ # GitHub Pages generator app
βββ pyproject.toml # Poetry configuration
βββ README.md
βββ .gitignore
Install dependencies with Poetry:
poetry installRun the thread generator:
poetry run python -m customthreads.cliThis creates 3DPrintedMetricThreads.xml with:
- Diameters: 8-50mm
- Pitches: 1.0mm to 6.0mm (0.5mm steps)
- Tolerance Classes: O.0, O.1, O.2, O.4, O.8
Edit src/customthreads/cli.py to customize parameters:
- Pitch range (pitch_start, pitch_end, pitch_step)
- Thread sizes (thread_sizes)
- Tolerance offsets (tolerance_offsets)
- Output filename (output_filename)
- Thread metadata (thread_name, unit, thread_angle, thread_form)
poetry run pytest -vAll 12 tests should pass β
from customthreads import generate_xml
# Generate custom thread profiles
generate_xml(
output_filename="custom_threads.xml",
thread_name="My Custom Threads",
unit="mm",
thread_angle=60.0,
thread_form=8,
pitch_start=1.0,
pitch_end=6.0,
pitch_step=0.5,
thread_sizes=list(range(8, 51)),
tolerance_offsets=[0.0, 0.1, 0.2, 0.4, 0.8],
)This project uses GitHub Actions to automatically generate and publish thread profiles as releases.
Workflow File: .github/workflows/generate-xml-release.yml
Trigger Events:
- β
Every push to
masterbranch - β Manual trigger via GitHub Actions UI (workflow_dispatch)
Pipeline Steps:
- Set up Ubuntu environment with Python 3.11
- Install dependencies using Poetry
- Run test suite to verify code quality
- Generate XML thread profiles
- Create a GitHub Release with datetime-based version
- Upload XML file as release artifact
- Format:
v{YYYY}.{MM}.{DD}-{HHMMSS}-r{RUN_NUMBER}(UTC time + workflow run number) - Examples:
v2026.03.29-100000-r5= March 29, 2026 at 10:00:00 UTC, run 5v2026.03.29-124530-r9= March 29, 2026 at 12:45:30 UTC, run 9
- β No committed XML files β generated automatically on every push
- β Version history β easy to compare profiles across releases
- β Quality assured β tests run before each release
- β One-click downloads β users get latest profiles from Releases page
To switch to manual-only releases:
- Edit
.github/workflows/generate-xml-release.yml - Change the trigger to:
on: workflow_dispatch: # Manual trigger only
- Commit and push
- Releases can now be triggered manually from the Actions tab
These offset values from nominal dimensions allow fine-tuning for different printing conditions:
| Class | Offset | Use Case |
|---|---|---|
| O.0 | 0.0mm | Tightest fit, best accuracy |
| O.1 | +0.1mm | Standard fit, most prints |
| O.2 | +0.2mm | Loose fit, easier to print |
| O.4 | +0.4mm | Very loose, coarse prints |
| O.8 | +0.8mm | Safety margin, worst-case prints |
| Parameter | Value |
|---|---|
| Diameters | 8-50mm (all integer values) |
| Pitches | 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0mm |
| Thread Type | ISO Metric (60Β° flank angle) |
| Optimized for | FDM 3D printing (0.2-0.3mm layer height) |
The web app is deployed by .github/workflows/deploy-pages.yml.
- Trigger: push to
masterwhen files under web change - Source artifact: web
- Publish target: GitHub Pages environment
If Pages is not enabled yet in repository settings, enable it once and keep source as GitHub Actions.
See LICENSE file for details