Skip to main content

Convert Excellion drill files (such as those produced by KiCad) into G-Code for SnapMaker CNC usage

Project description

drill4snap

DISCLAIMER: Take great care and check your gcode files before using them! No responsibility is taken by the developer of this software!

file_preview

Convert Excellon drill files to GCode that can be used with the CNC/milling ability of Snapmaker devices.

Provides a small command line tool to generate one gcode file for every drill size in the drill file. These files can be used either directly via a USB stick or loaded into the Luban software for execution.

About

Motivation

Although the Snapmaker should accept normal Marlin GCode, newer versions of the firmware come with a custom header comment. My firmware version refused to even display files that do not contain this header. The header contains device information and the preview image encoded as a base 64 PNG image.

Features

Small CLI tool that provides a quick way to convert Drill produced by tools such as Kicad into usable GCode.

  • produces standard GCode (should work on devices other than Snapmaker too)
  • preview images display required drill size for each file
  • supports switching between relative and absolute coordinates (all converted into absolute coordinates)
  • supports both mm and inches (switching mid-file is also supported since it is theoretically allowed)
  • rejects files containing non drilling operations to protect tools from damage
  • calculates required work volume and time estimate per tool run

Limitations

Only a tiny subset of the Excellon file format is supported, since the scope of this tool is drilling only. Also note that patterns and other more complex operations are not supported although they may be used in drilling operations.

Some other limitations:

  • only tested for newest Snapmaker firmware on Snapmaker 2.0 A350
  • not tested for GRBL based devices
  • only tested for files produced by Kicad

Usage

  1. Install via pip:
pip install drill4snap
  1. Generate you drill file from Kicad using the plot suboption:

Kicad drill file options

  1. Generate the CNC files for Snapmaker using the drill4snap command:
drill4snap --device s2m my_drill_file.drl

This will produce a CNC file with the drill diameter as postfixed for every tool in the drill file:

my_drill_file_0.95.cnc
my_drill_file_1.0.cnc
my_drill_file_2.3.cnc
  1. Use either Luban or the device screen to position the tool head at the work origin and then setting the work origin.

luban set origin

  1. Load the gcode files into Luban workspace or transfer them using a USB storage:

Luban load GCode panel

  1. Using Luban you can now start the Job using ''

job running

Let the Snapmaker do the work and enjoy!

Credits

Based on drl2gcode (https://github.com/jes/drl2gcode) by James Stanley which is based on drl2gcode (https://git.nexlab.net/machinery/drl2gcode) by Franco Lanza.

Licensed under LGPL

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drill4snap-0.3.0.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drill4snap-0.3.0-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file drill4snap-0.3.0.tar.gz.

File metadata

  • Download URL: drill4snap-0.3.0.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.19.0-38-generic

File hashes

Hashes for drill4snap-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d0478881103b98df3e6610646a57699c0104144168dc9eacc7ded2f83592a401
MD5 3fcf9c930a828b2d64cde383fc47b22e
BLAKE2b-256 2c10ca581f12f25752c3526cd0afdc9e0f03d4bf2f7be1943b6431877e600506

See more details on using hashes here.

File details

Details for the file drill4snap-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: drill4snap-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.6 Linux/5.19.0-38-generic

File hashes

Hashes for drill4snap-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f6f6b1e226c22267dcdcd09b1a73aff136242f53aa46df07e0736c097e17113
MD5 6b3d5aa4a194a43d4318773df7460419
BLAKE2b-256 ef00527ae840d4f8c45c98d30317378121921bccf671804641fcd7ae5700ee57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page