PythonGCodeCompiler/example2.py
2026-11-23 09:49:37 -05:00

24 lines
448 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
points = [(0, 0), (1, 0), (1, 1), (0, 1), (0, 0)]
for point in points:
move(x+w*point[0], y+h*point[1], 0, extrusion)
print("test")
print(input("input"))
i = 0
while i < 5:
print(i)
i+=1