Giter VIP home page Giter VIP logo

printcnc's Introduction

printCNC: 3D Printer to CNC GCode Converter

This is a free and open-source post processing script for Untimaker Cura that converts the GCode generated by Cura into GCode that is usable by 3-Axis CNC Machines. It is tested on a 3018 ProVer using GRBL, but should work on most other CNC Machines.

Installation

Other than Python (Any modern version should work) and Cura, no additional dependencies are required.

It is recommended to use a flat milling bit for the CNC machine.

Setup Cura

Cura needs additional configuration to actually generate GCode that the converter can understand.

First, add a new printer to Cura, under Settings > Printer > Add Printer..., and add a Non UltiMaker printer. under the non-networked section, go to custom and add a Custom FFF Printer. Name it whatever you want. Change the printer X, Y, and Z build space to match that of your CNC machine, and then remove all of the start and end GCode. Uncheck the "Apply Extruder Offsets to GCode" button, as the script (by default) translates the model to the origin, so it is unnecessary.

Second, import the CNC Profile Cura Profile into Cura. This contains the print settings ideal for use with CNC machines.

Usage

First, open the model you want to engrave/carve in Cura and select the CNC machine as the printer and select the CNC profile.


Notes about Models

  1. The Z-Axis in Cura will be mirrored in the final GCode, so what appears as "up" will become down, mirroring the model about the X-Y plane. This has the effect of instead of building the model up, it will instead carve the model below the baseplate, as CNC machines do.

  2. The model on the buildplate is what will be carved out of the wood, not what the final product will be.

  3. While this program is able to generate GCode for engravings and cutting out parts, it is not magic, and 3-Axis CNC machines are not able to have overhangs in the Z axis. If a model containing overhangs is used, this script will not flag it, however the generated GCode will attempt to carve these, possibly damaging the bit and/or ruining the model.


Set the "Line width" parameter under "Quality" to the diameter of your bit. It may be a good idea to also decrease the top/bottom line width to get a smoother bottom. Decrease the layer height to decrease speed at the cost of quality, or increase it for finer quality but for a longer engraving. The time estimation does not correspond to how long it actually takes to carve. When finished, slice the model and then export the GCode.

Convert the model using the python script provided.

python3 main.py <GCode File to use> output.nc

Copy output.nc to your CNC machine and then set the origin of the machine to where the corner of the model is.

Note: By default, the script will translate the GCode so that the model is only carved in the +X +Y direction. If this is not ideal, then pass the --no-orient parameter to the program.

See python3 main.py --help for more details.

How it works

This program only does three basic things with more optional functions, some of which are enabled by default.

It always:

  1. Removes printer-specific parameters, commands, etc.
  2. Converts Printer travels to CNC machine travels (i.e. lift head out of material, move, move back down)
  3. Mirrors the model across the X-Y plane to carve into the wood instead of above it.

Optionally, it can:

  1. Remove infill every N layers, as it is not needed, but some infill is necessary to prevent the bit from carving too much. By default it does this every 10 layers.
  2. Orients the model to the origin to carve in the +X +Y direction, enabled by default.
  3. Shrink the file size of the processed GCode.

License

This program is Licensed under the GNU Lesser General Public License, either version 2.1 of this license or, at your option, any later version. See License for more details.

printcnc's People

Contributors

lostmybyte avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.