<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">

jobStarted = False

# for custom processing before standard processing
#def custom_pre_process(line):
#    return(line)
#self.custom_pre_process = custom_pre_process


# for custom parsing before standard parsing
def custom_pre_parse(data):
    global jobStarted
    if data[0] == '%':
        return(None)
    if data == 'G71':
        return(None)
    if data[:3] == 'G90':
        return('G90 (absolute distance mode)\nG90.1 (arc offsets absolute distance mode)')
    if data == 'M21':
        return(None)
    if data == 'M20':
        return(None)
    if data[:3] == 'G00':
        text = ''
        if jobStarted:
            text += 'M05 $0 (end cut)\n\n'
        else:
            text += 'F#&lt;_hal[plasmac.cut-feed-rate]&gt;\n\n'
            jobStarted = True
        text += f'{data}\n'
        text += 'M03 $0 S1 (start cut)'
        return(text)
    if data == 'G41':
        return('G41.1 D#&lt;_hal[plasmac.kerf-width]&gt; (cutter compensation)')
    if data == 'G42':
        return('G42.1 D#&lt;_hal[plasmac.kerf-width]&gt; (cutter compensation)')
    if data == 'M190':
        return(None)
    if data == 'M2 (end program)':
        return(f'M5 $0 (end cut)\n\n{data}')
    return(data)
self.custom_pre_parse = custom_pre_parse


# for custom parsing after standard parsing
#def custom_post_parse(data):
#    return(data)
#self.custom_post_parse = custom_post_parse


# override the original parse_code procedure
#def parse_code(data):
#    return(data)
#self.parse_code = parse_code</pre></body></html>