Skip to content

ianhong95/python3dp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python3DP

Overview

This is a Python interface for sending gcode commands to Marlin-based 3D printers over the device's serial port. This allows experiments with scripted motions for custom tool paths.

Check out my Medium article for more details! https://medium.com/@ianqyhong/3d-printing-with-python-3201737089ae

Usage

Basic Example

from python_gcode_api import Printer

p = Printer("dev/ttyACM0")

p.moveX(5)  # Moves the print head 5mm in the positive X direction at default speed

p.moveSpeedY(5, 1000)    # Moves the print head 5mm in the positive y direction at a speed of 1000 mm/min

Command Chaining
Each movement method in the library returns the self object, which allows you to chain methods in a single line.

The following line draws a 10mm x 10mm square with the print head.
p.moveX(10).moveY(10).moveX(0).moveY(0)

About

A Python interface for controlling 3D printers with Marlin-based firmware.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages