Hi,
Oh my, you did ask an interesting question....
The MSM code for the dialog that that edits the tool table is doing
"If Diam + Wear) < 0 Then ...."
I suspect that I just wrote that as a sanity test for dialog input data before saving values into the tool table.
I bet my thinking was along the lines that a tool has a physical diameter, and in the real world that has to be a + value. The tool can wear, but it can't wear down past a 0 diameter (at least not until the shop is on a space shop traveling at warp speed or some other such fun
)... so if the sum of diam + wear < 0, the user must have mistyped a digit or something.... Seemed logical at the time.
But that logic assumes the values are really representing a physical object's diameter. If instead, we look at the values as just numbers to be used to offset a path, well, then as you have pointed out, there may be cases where the total diam+wear could be < 0.
Frankly, I could see making either argument.
For context, I looked at my design notes and I don't have any explicit notes about what mach does if it is handed a net cutter diam that is < 0. I don't think I've ever tried that.
I could weaken the MSM test, and let one just feed mach the raw numbers, then mach will do whatever it does (and I'm uncertain I want to know that that is in this case.... see below). If I did that in MSM, I think I'd change the "oh no you don't" to a "well, OK, but here's a warning message in the log file in case you really didn't know what you were doing".
I'm a bit less certain after thinking about this tidbit you supplied....
From reading about Mach3 functionality it sounds like you can do this and put either a small positive or a small negative number in for the cutter diameter and the one funny thing it does is for a negative number it actually will just reverse the mode and use the absolute value (so a -0.002 dia with G43 is implemented as 0.002 and G42 turned on).
Did you mean to write that as G41 (CC left) and G42 (cc right)?
I'm confused as G41/G42 pair for CC and G43 (positive TLO) and G44 (negative TLO) pair for TLO offsets.
But you wrote G43 (positive TLO) changes to G42 (CC right) and that threw me.... ??
I'll assume you meant G41/G42 since the topic is cutter comp and wear values.
But teh news that mach does this scares me a bit. I can see mach doing it (it's consistent with mach's tendency to "help out too much" and think that it knows better than the g-code programmer what was intended). But it's a state machine violation for the g-code program if mach actually does that.
My concern is that when I program a G41, I expect to get a G41 modal state. I do not expect mach to change G41 to G42 and change the sign of the value entered and sneakily use a value that was not explicitly programmed. That creates a situation where mach is putting the gcode interpreter into state that is NOT the one that was programmed by the programmer. I consider that bad mojo....
Of course, while I personally think that is undesirable behavior for a g-code interpreter, as the author of MSM I **could** choose to ignore that and just call it "that's the way mach works" - (Doc, it hurts when I do this.... then don't do that"
).
So.... if I take out the diam+wear < 0 test, and this leads the user to cause mach to do G42 when G41 (or vise versa) was what the program said it wanted.... am I just leading users by the hand to get bit by this?
I think I'd like more input from others before I do anything rash here re MSM's diam value test -
Dave