randyzwitch/FretboardUtils

★ 0Forks 0PythonGitHub ↗Compare

README

Luthier's Toolkit

A comprehensive Fusion 360 add-in designed for guitar and instrument builders. This toolkit provides parametric tools for designing precision fretboards and calculating critical dimensions for stringed instruments.

Fusion 360 Platform Python

Features

Fretboard Generator

Generate complete, parametric fretboards with full 3D geometry:

  • Parametric Design: All dimensions are stored as user parameters for easy modification
  • Custom Scale Lengths: Support for any scale length (25.5", 24.75", multi-scale, etc.)
  • Variable Fret Count: Create fretboards with 12-24+ frets
  • Compound Radius: Define separate radii for nut and end positions
  • Binding Support: Optional binding with customizable width and automatic color coding
  • Precise Geometry: Mathematically accurate fret positioning using the 12th root of 2

Fret Calculator

Calculate and store fret positions without generating geometry:

  • Creates user parameters for all fret positions
  • Perfect for custom fretboard designs
  • Supports same parameter inputs as Fretboard Generator
  • Parameters accessible via Fusion 360's "Modify > Change Parameters" menu

Plane Inspector

Debug tool for inspecting construction planes in your design (useful for development and troubleshooting).

Installation

  1. Download or clone this repository
  2. Copy the entire LuthiersToolkit folder to your Fusion 360 add-ins directory:
    • Windows: %APPDATA%\Autodesk\Autodesk Fusion 360\API\AddIns\
    • macOS: ~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/AddIns/
  3. Launch Fusion 360
  4. Open the Scripts and Add-Ins dialog (Shift+S or Tools > Add-Ins)
  5. Select the Add-Ins tab
  6. Find Luthier's Toolkit in the list
  7. Click Run to start the add-in

Usage

Generating a Fretboard

  1. After loading the add-in, locate the Luthier's Toolkit panel in the Fusion 360 toolbar
  2. Click the Fretboard Generator icon
  3. Configure your parameters:
    • Nut Width: Width of the fretboard at the nut
    • Bridge Spacing: String spacing at the bridge
    • Number of Frets: Total frets to generate (typically 12-24)
    • Scale Length: Distance from nut to bridge (e.g., 25.5" for Stratocaster)
    • Fretboard Radius: Curvature at nut and end positions
    • Include Binding: Optional decorative edge binding
  4. Expand Optional Parameters for additional control:
    • Fretboard Overhang: Distance past the last fret
    • String Nut Inset: String spacing from edges
    • Fretboard Thickness: Overall thickness of the board
  5. Set component name and whether to overwrite existing components
  6. Click OK to generate the fretboard

The generated fretboard will include:

  • Complete 3D body with compound radius
  • Visible fret slot construction lines
  • Optional binding bodies (color-coded)
  • All dimensions stored as user parameters for easy modification

Using the Fret Calculator

  1. Click the dropdown arrow on the Luthier's Toolkit panel
  2. Select Fret Calculator
  3. Enter your fretboard parameters
  4. Click OK

The calculator will create user parameters in your design for all fret positions, which you can reference in sketches and features.

Default Values

The add-in uses standard guitar dimensions as defaults:

  • Nut Width: 1.650" (41.91 mm)
  • Bridge Spacing: 2.100" (53.34 mm)
  • Scale Length: 25.500" (64.77 mm) - Fender standard
  • Fretboard Radius: 9.500" (24.13 mm)
  • Number of Frets: 22
  • Fretboard Thickness: 0.250" (6.35 mm)
  • Binding Width: 0.060" (1.52 mm)

Technical Details

Fret Position Calculation

Fret positions are calculated using the standard formula:

distance_to_fret_n = scale_length - (scale_length / (2^(n/12)))

Where n is the fret number and 2^(n/12) is the 12th root of 2 raised to the nth power.

Project Structure

LuthiersToolkit/
├── LuthiersToolkit.py          # Main add-in entry point
├── LuthiersToolkit.manifest    # Add-in metadata
├── tools/
│   ├── fretboard_generator.py  # Fretboard generation tool
│   └── fret_calculator.py      # Fret calculation tool
├── utils/
│   ├── math_utils.py           # Fret position calculations
│   ├── sketch_utils.py         # Sketch creation utilities
│   ├── body_utils.py           # 3D body creation utilities
│   ├── component_utils.py      # Component management
│   ├── parameter_utils.py      # User parameter creation
│   ├── unit_utils.py           # Unit conversion helpers
│   └── constants.py            # Default values and constants
├── debug/
│   └── plane_inspector.py      # Plane debugging tool
└── Resources/                  # Icons and assets

Requirements

  • Autodesk Fusion 360 (current version recommended)
  • Windows or macOS
  • Active Fusion 360 license

Development

Setting Up Development Environment

The project includes VSCode configuration for debugging:

  1. Open the project folder in Visual Studio Code
  2. Install the Python extension
  3. Use the included launch configuration to debug the add-in

Code Quality

The project uses:

  • pylint for code linting
  • pyright for type checking

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

License

This project is provided as-is for use by the guitar building and luthier community.

Author

Randy Zwitch

Acknowledgments

  • Built for the luthier and guitar building community
  • Uses the Autodesk Fusion 360 API
  • Fret calculations based on equal temperament tuning mathematics

Support

For issues, questions, or feature requests, please open an issue on the GitHub repository.


Note: This add-in is designed for experienced Fusion 360 users familiar with parametric modeling. For best results, understand basic Fusion 360 concepts like components, sketches, and user parameters before use.

Contributors

randyzwitch

Issues