Beispiel #1
0
    def run(self):

        try:

            result, last_sequence_number = gcode.parse(self.filename, self.canon, self.unitcode, self.initcode)

            # XXX mystery attributes
            # print "gcodes", gcode.linecode.gcodes
            # print "sequence_number", gcode.linecode.sequence_number

            if result > gcode.MIN_ERROR:
                print " gcode error: %s " % (gcode.strerror(result))
                print " last_sequence_number ", last_sequence_number
            else:
                pass
                # # XXX: unclear how this is supposed to work
                # minxt,maxxt,min_t_xt,max_t_xt = gcode.calc_extents()
                # print "X extent: %.2f .. %.2f" % (minxt[0],maxxt[0])
                # print "Y extent: %.2f .. %.2f" % (minxt[1],maxxt[1])
                # print "Z extent: %.2f .. %.2f" % (minxt[0],maxxt[2])
                # print "X extent w/tool: %.2f .. %.2f" % (min_t_xt[0],max_t_xt[0])
                # print "Y extent w/tool: %.2f .. %.2f" % (min_t_xt[1],max_t_xt[1])
                # print "Z extent w/tool: %.2f .. %.2f" % (min_t_xt[0],max_t_xt[2])
        except KeyboardInterrupt, e:
            print "exception:", e
Beispiel #2
0
    def run(self):

        try:

            result, last_sequence_number = gcode.parse(self.filename,
                                                       self.canon, self.unitcode,
                                                       self.initcode)

            # XXX mystery attributes
            # print "gcodes", gcode.linecode.gcodes
            # print "sequence_number", gcode.linecode.sequence_number

            if result > gcode.MIN_ERROR:
                print " gcode error: %s " % (gcode.strerror(result))
                print " last_sequence_number ",last_sequence_number
            else:
                pass
                # # XXX: unclear how this is supposed to work
                # minxt,maxxt,min_t_xt,max_t_xt = gcode.calc_extents()
                # print "X extent: %.2f .. %.2f" % (minxt[0],maxxt[0])
                # print "Y extent: %.2f .. %.2f" % (minxt[1],maxxt[1])
                # print "Z extent: %.2f .. %.2f" % (minxt[0],maxxt[2])
                # print "X extent w/tool: %.2f .. %.2f" % (min_t_xt[0],max_t_xt[0])
                # print "Y extent w/tool: %.2f .. %.2f" % (min_t_xt[1],max_t_xt[1])
                # print "Z extent w/tool: %.2f .. %.2f" % (min_t_xt[0],max_t_xt[2])
        except KeyboardInterrupt,e:
            print "exception:", e
Beispiel #3
0
def run(filename,canon, unitcode, initcode):
    result, last_sequence_number = gcode.parse(filename, canon, unitcode, initcode)

    # XXX mystery attributes
    # print "gcodes", gcode.linecode.gcodes
    # print "sequence_number", gcode.linecode.sequence_number

    if result > gcode.MIN_ERROR:
        print " gcode error: %s " % (gcode.strerror(result))
        print " last_sequence_number ",last_sequence_number
    else:
        pass