Great, just a couple of quick comments, I'll look in more detail later.
Two occurrences. Since you've eliminated vertical, does it make any sense to test for opVertRapid ?
Code: Select all
if hasattr(pathobj.ToolController, 'VertRapid') and pathobj.ToolController.VertRapid > 0:
opVertRapid = Units.Quantity(pathobj.ToolController.VertRapid, FreeCAD.Units.Velocity)
else:
FreeCAD.Console.PrintWarning('Tool Controller Vertical Rapid Values are unset'+ '\n')
Likewise, would it matter if it was not set?
Code: Select all
if adaptiveOp and c.Name in ["G0", "G00"]:
if opHorizRapid and opVertRapid:
if 'Z' not in c.Parameters:
outstring.append('F' + format(float(opHorizRapid.getValueAs(UNIT_SPEED_FORMAT)), precision_string))
else:
outstring.append('F' + format(float(opVertRapid.getValueAs(UNIT_SPEED_FORMAT)), precision_string))
Code: Select all
if adaptiveOp and c.Name in ["G0", "G00"]:
if opHorizRapid and opVertRapid:
command = 'G1'
else:
outstring.append('(Tool Controller Rapid Values are unset)' + '\n')
Presumably this should never happen, would you want it to produce output? Not looked in detail, sorry if any of that is silly.