# PathPilot to Fusion Tool Converter README

## Overview
This is a standalone tool to convert a Tormach PathPilot mill tool table CSV file into an Autodesk Fusion 360-compatible tool library CSV. It cleans up the data, infers tool types (e.g., end mill, drill), materials, flutes, and other parameters based on descriptions, and outputs a file ready for import into Fusion.

The tool is packaged as a self-contained executable (no Python installation required). It features a simple GUI for ease of use: select your input file, choose where to save the output, and convert.

**Key Features:**
- Automatically skips empty or zero-diameter tools.
- Infers tool types, materials (e.g., carbide/HSS), number of flutes, flute lengths, and corner radii from descriptions.
- Uses default feeds/speeds and other parameters inspired by Fusion samples.
- Outputs in inches (matching PathPilot defaults).

**Limitations:**
- Inferred values (e.g., flutes from "4fl" in description) may need manual review in Fusion.
- Z offsets are used as proxies for overall length; actual measurements should be verified.
- No support for holders or advanced presets—edit in Fusion post-import.
- Only tested on common tool descriptions; unusual ones may default to "flat end mill".

## Requirements
- Windows OS.
- No additional software required—the executable is self-contained.
- Your PathPilot CSV file (exported from Tormach PCNC 770 or similar).

## Download
This README is bundled with the executable. If you have the zip/package, extract it to access `convert_tools.exe` and this file.

1. Download the package from the provided link (e.g., GitHub release, Dropbox, or website).
2. Extract the contents to a folder on your computer (e.g., Downloads).
3. The package includes:
   - `convert_tools.exe`: The main tool.
   - `README.md`: This instruction file.

## Installation
No installation needed! Just extract and run the executable.

## Step-by-Step Usage Instructions
1. **Prepare Your Input File:**
   - Export your tool table from PathPilot (e.g., "tooltable-mill-YYYY-MM-DD.csv").
   - Place it in an easy-to-access folder (e.g., Desktop or Downloads).

2. **Run the Executable:**
   - Double-click `convert_tools.exe`.
   - If prompted by Windows (e.g., "Unknown Publisher" warning), click "More info" > "Run anyway" (it's safe, but always scan downloads).

3. **Select Input File:**
   - A file dialog will open: "Select Input PathPilot CSV".
   - Navigate to your PathPilot CSV file and select it.
   - Click "Open".

4. **Select Output File:**
   - Another dialog: "Save Output Fusion CSV".
   - Choose a save location and name (e.g., `fusion_tools.csv`).
   - Click "Save".

5. **Convert:**
   - The tool processes the file (takes seconds).
   - A success message pops up: "Converted X tools to [output_file]".
   - If an error occurs (e.g., invalid CSV), an error popup shows details.

6. **Import into Fusion 360:**
   - Open Fusion 360 > Manufacturing workspace > Manage > Tool Library.
   - Right-click a library (Local or Cloud) > Import Tool Library.
   - Select your output CSV.
   - Review/edit tools in Fusion (e.g., add feeds/speeds, holders).
   - If import fails, check the CSV in a spreadsheet for issues.

## Command-Line Mode (Advanced Users)
If you prefer no GUI:
1. Open Command Prompt (search for "cmd" in Start menu).
2. Navigate to the exe folder: `cd C:\path\to\folder`.
3. Run: `convert_tools.exe --nogui input.csv output.csv`.

## Troubleshooting
- **Window Closes Immediately:** Run from Command Prompt to see errors (e.g., missing files).
- **No GUI on Run:** Ensure the exe is not corrupted; re-download if needed.
- **Invalid CSV Error:** Ensure input is a valid PathPilot export (starts with "Mill Tool Table").
- **Inferred Values Wrong:** Edit the output CSV manually in Excel/Google Sheets before importing.
- **Antivirus Blocks:** Add an exception—it's a custom tool.
- **Large Files:** Handles up to 1000+ tools, but Fusion may have limits.
- **Updates:** Check the download source for new versions if issues arise.

## Support
- If the tool crashes or outputs unexpected results, note the error and contact the creator (e.g., via GitHub issues).
- Source code (if available): Modify and rebuild with PyInstaller for custom needs.

## Credits
Built with Python, Tkinter for GUI, and PyInstaller for packaging. Inspired by Tormach and Fusion tool workflows.

## Disclaimer
The author is not responsible for any issues, damages, or problems that may occur from using this tool. Use at your own risk. Always verify the output CSV and tool data in Fusion 360 before use in production.

Happy machining! 🚀