Page 1 of 1

Tool Z Offset Setting

Posted: Sun Aug 19, 2018 1:47 am
by shauki
For printers that change tool physically adding the possibility to input tool offset in the Z direction would be very nice, sample machine https://www.youtube.com/watch?v=GQhkLE9Y4wQ

Re: Tool Z Offset Setting

Posted: Fri Aug 24, 2018 7:39 am
by rajaakahel
I need this too!

Re: Tool Z Offset Setting

Posted: Fri Aug 24, 2018 7:54 am
by shauki
As a work around I wrote the following python script post processing the GCode output
Image

Code: Select all

if __name__ == "__main__":
    inGcode = open('original.gcode', 'rt')
    outGcode = open('destination.gcode', 'wt')
    skipCount = 3
    toolCommandMet = False
    for line in inGcode.readlines():
      outGcode.write(line)
      line = line.strip()
      if line == 'T0' or line == 'T1':
        toolCommandMet = True
      if toolCommandMet:
        if skipCount > 0:
          skipCount -= 1
        else:
          outGcode.write('G91\n')
          outGcode.write('G1 Z-2\n')
          outGcode.write('G90\n')
          skipCount = 3
          toolCommandMet = False
    inGcode.close()
    outGcode.close()

Re: Tool Z Offset Setting

Posted: Mon Aug 27, 2018 8:38 am
by smoki3
why you dont do this via firmware?