PythonGCodeCompiler/example.py
2026-11-23 09:04:45 -05:00

21 lines
421 B
Python

from gcode_compiler import *
axes = []
@macro
def do_square(x,y,w=50,h=50):
if not axes[0].homed:
home(x=True)
else:
home(y=True)
home()
move(x, y, 0, 0)
extrusion = 50
move(x, y, 0, extrusion)
move(x+w, y, 0, extrusion)
move(x+w, y+h, 0, extrusion)
move(x, y+h, 0, extrusion)
move(x, y, 0, extrusion)
print("test")
print(input("input"))