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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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