This project is a CLI tool for generating G-code for flattening wood slabs on a CNC machine. It allows users to specify the width, length, stepover, depth, and other parameters to generate G-code to flatten a given slab.
To use the CLI tool, follow these steps:
-
Run the CLI tool by executing the command
python flatten.py, setting slab parameters as documented below. -
Copy the output of the program to your clipbboard
-
Paste the G-code into your CNC controller, such as Mach4
-
Zero your axes
- Set your Z-axis zero to the upper-most height of the slab
- Set your X-axis zero to the side of the slab closest to true X0
- Set your Y-Axis zero to the side of the slab closest to true Y0
-
Run the program to flatten your slab
The CLI tool provides several options to customize the flattening process. Here are the available options:
-
--feed-rate: Specify the feed rate in IPM (Inches Per Minute). -
--spindle-speed: Specify the spindle speed in RPM. -
--skip-direction: Specify the direction to skip (forward or backwards). -
--passes: Specify the number of passes at a specific Z coordinate to take. -
--depth: Specify the depth of cut. -
--stepover: Specify the stepover. -
--width: Specify the width (X axis) of the workpiece to flatten. -
--length: Specify the length (Y axis) of the workpiece to flatten.
Prefer a UI? Install Django (python -m pip install django) and run:
python manage.py runserverThen open http://127.0.0.1:8000/ and fill in the form to generate G-code without the CLI prompts.
- Install dependencies:
python -m pip install -r requirements.txt - Run tests:
pytest
- Ensure DNS:
A flattener.ryanlee.site -> <dokku-server-ip> - Add domain:
dokku domains:add flattener flattener.ryanlee.site - Remove default internal host:
dokku domains:remove flattener flattener.dokku0214onubuntu2004-s-1vcpu-1gb-sfo3-01 - Enable TLS:
dokku letsencrypt:enable flattener - Verify:
dokku domains:report flattenershows only your real domain
This project is licensed under the MIT License.