I'm trying to resolve a bug I found where the leadInOut dressup produces gcode that gives the simulator problems.
I haven't used the leadInOut dressup much and I didn't write the code so I'm pretty unfamiliar with it. The code is kind of a mess and hard to work on.
Anyway, I found this feature and the corresponding code:
This looks very wrong to me. Cutter compensation should be handled by the post processor but here it is being enabled in a dressup of all places. There's no other place in Path where we're controlling cutter compensation like this.
This will probably cause problems if multiple dressups are stacked and compensation isn't turned off properly or throw errors at the control if the G41/2 is called and compensation is already on.
I think this 'feature' is a mistake and should be removed immediately. Change my mind.
Code: Select all
if obj.UseMachineCRC:
if self.getDirectionOfPath(obj) == "right":
results.append(Path.Command("G42", {"D": toolnummer}))
else:
results.append(Path.Command("G41", {"D": toolnummer}))