30 app = wx.App(redirect = False) |
30 app = wx.App(redirect = False) |
31 build_dimensions = [200, 200, 100, -100, -100, 0] |
31 build_dimensions = [200, 200, 100, -100, -100, 0] |
32 build_dimensions = [200, 200, 100, 0, 0, 0] |
32 build_dimensions = [200, 200, 100, 0, 0, 0] |
33 frame = GcodeViewFrame(None, wx.ID_ANY, 'Gcode view, shift to move view, mousewheel to set layer', size = (800, 800), build_dimensions = build_dimensions) |
33 frame = GcodeViewFrame(None, wx.ID_ANY, 'Gcode view, shift to move view, mousewheel to set layer', size = (800, 800), build_dimensions = build_dimensions) |
34 gcode = gcoder.GCode(open(sys.argv[1])) |
34 gcode = gcoder.GCode(open(sys.argv[1])) |
35 print "Gcode loaded" |
35 print("Gcode loaded") |
36 frame.addfile(gcode) |
36 frame.addfile(gcode) |
37 |
37 |
38 first_move = None |
38 first_move = None |
39 for i in range(len(gcode.lines)): |
39 for i in range(len(gcode.lines)): |
40 if gcode.lines[i].is_move: |
40 if gcode.lines[i].is_move: |