Commit 511a65d4 authored by Guillaume Seguin's avatar Guillaume Seguin

Go to center of next printed object before printing it in gcodeplater

This avoids the head from going down and banging in the previous object.
parent 9d15ee1d
...@@ -99,6 +99,7 @@ class GcodePlater(Plater): ...@@ -99,6 +99,7 @@ class GcodePlater(Plater):
f.write("; GCodePlater: Model %d\n" % model_i) f.write("; GCodePlater: Model %d\n" % model_i)
f.write("G90\n") f.write("G90\n")
f.write("G92 X%.5f Y%.5f Z%.5f E0\n" % trans_wpos) f.write("G92 X%.5f Y%.5f Z%.5f E0\n" % trans_wpos)
f.write("G1 X%.5f Y%.5f" % (-co[0], -co[1]))
for l in model.gcode: for l in model.gcode:
if l.command != "G28" and (l.command != "G92" or extrusion_only(l)): if l.command != "G28" and (l.command != "G92" or extrusion_only(l)):
f.write(l.raw + "\n") f.write(l.raw + "\n")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment