removed PathUtils import from all post-processors to avoid the deleted proxy error

I removed or commented out code using this import.  In all cases,
the import was used to get descriptive information from the Job
This commit is contained in:
sliptonic
2021-10-07 10:59:26 -05:00
parent 781cb10a7d
commit abe65e7a75
5 changed files with 26 additions and 114 deletions
+1 -20
View File
@@ -29,7 +29,6 @@ import argparse
import datetime
import shlex
from PathScripts import PostUtils
from PathScripts import PathUtils
TOOLTIP = '''
This is a postprocessor file for the Path workbench. It is used to
@@ -193,28 +192,10 @@ def export(objectslist, filename, argstring):
if not obj.Base.Active:
continue
# fetch machine details
job = PathUtils.findParentJob(obj)
myMachine = 'not set'
if hasattr(job, "MachineName"):
myMachine = job.MachineName
if hasattr(job, "MachineUnits"):
if job.MachineUnits == "Metric":
UNITS = "G21"
UNIT_FORMAT = 'mm'
UNIT_SPEED_FORMAT = 'mm/min'
else:
UNITS = "G20"
UNIT_FORMAT = 'in'
UNIT_SPEED_FORMAT = 'in/min'
# do the pre_op
if OUTPUT_COMMENTS:
gcode += linenumber() + "(begin operation: %s)\n" % obj.Label
gcode += linenumber() + "(machine: %s, %s)\n" % (myMachine, UNIT_SPEED_FORMAT)
gcode += linenumber() + "(machine units: %s)\n" % (UNIT_SPEED_FORMAT)
for line in PRE_OPERATION.splitlines(True):
gcode += linenumber() + line