The M and T codes are added by the Path WB. You may need to catch those and remove one by one.
I do not use those codes either, and here is an example of how I removed them.
Code: Select all
# Check for Tool Change:
if command == 'M6':
# if OUTPUT_COMMENTS:
# out += linenumber() + "(begin toolchange)\n"
# for line in TOOL_CHANGE.splitlines(True):
# out += linenumber() + line
outstring.pop(0) # remove the command
pass
It should go without saying that you need a custom postprocessor that does not get changed when you install a new version of FreeCAD. That custom postprocessor can go in the macro folder in the same area as your configuration files.
Gene