]> wolfpit.net Git - hardware/fuck_tomatoes/.git/blob - utils/Gcode.py
4c4a01ae50d5c85c904dfb84f2a095d93931f308
[hardware/fuck_tomatoes/.git] / utils / Gcode.py
1 from utils import Geometry
2
3 def buildGcodePackage(points):
4 package = ''
5 for point in points:
6 if Geometry.pointWithinBounds(point):
7 x,y = point
8 package += 'G0 F5000 X{:.3f} Y{:.3f}\n'.format(x, y)
9 package += 'M106 S300\nG4 P500\nM107\n'
10 package += 'G0 F5000 X0 Y0\n'
11 return package