Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

Commit

Permalink
Support start position variables in latest s3g
Browse files Browse the repository at this point in the history
  • Loading branch information
skalnik committed Mar 27, 2013
1 parent 0a71420 commit beaaf4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion bin/print_gcode.py
Expand Up @@ -34,9 +34,14 @@
port = options.port
factory = makerbot_driver.MachineFactory()
obj = factory.build_from_port(port)
profile = getattr(obj, 'profile')

assembler = makerbot_driver.GcodeAssembler(getattr(obj, 'profile'))
assembler = makerbot_driver.GcodeAssembler(profile)
start, end, variables = assembler.assemble_recipe()
start_position = profile.values['print_start_sequence']['start_position']
variables['START_X'] = start_position['start_x']
variables['START_Y'] = start_position['start_y']
variables['START_Z'] = start_position['start_z']
start_gcode = assembler.assemble_start_sequence(start)
end_gcode = assembler.assemble_end_sequence(end)

Expand Down

0 comments on commit beaaf4b

Please sign in to comment.