How to create a path without toolcompensation?

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

How to create a path without toolcompensation?

Post by herbk »

Hi Sliptonic,
i think you remember about our discuss about it some time ago... ;) I want to "warm up" the theme again and like to get the mind of others to...

In this time if i make a path with FC, the path is always toolcompensatet, also if i no tooltable is set and no tool selectet. In gCode always a tool with diameter 0.5 is present.
path_3.jpeg
path_3.jpeg (121.34 KiB) Viewed 2120 times
Sometimes it will be usefull, in my mind especially for professional application, to have a gCode without any compensation.

First and most important reason is, that, if the gCode is compensatet, the person which makes the gcode, has to know wich tools are used in the mill.
If i have a neutral gCode i can use the postprocessors tooltable. This allows to change the tool without creating a new gCode file.

A gCode like that
path_4.jpeg
path_4.jpeg (106.41 KiB) Viewed 2120 times
poduces the same part as the code in the first pic if i have a 0.5mm toll in linuxCNC's tooltable
Gruß Herbert
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: How to create a path without toolcompensation?

Post by sliptonic »

In this case, you're simply doing the profile operation 'on' the line instead of inside or outside.
Selection_005.png
Selection_005.png (47.8 KiB) Viewed 2106 times
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: How to create a path without toolcompensation?

Post by herbk »

Hi sliptonic,
thx again... i expected this function on "use compensation", which is switched off... A little bit confusing... ;)
Gruß Herbert
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: How to create a path without toolcompensation?

Post by sliptonic »

I'm no expert but I think there's more to cutter compensation than just cutting on the line. Don't you also have to tell the controller to enable it?

That 'use compensation' property was copied over from the HeeksCNC implementation. I don't think it does anything at all in our context but probably should. I expect it either inserted a G41/G42(G41.1/G42.1) or signaled the downstream post processor to include it.

I don't use cutter comp, so I don't know exactly what it should do or if it should just be removed.
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: How to create a path without toolcompensation?

Post by herbk »

Don't you also have to tell the controller to enable it?
of course you have to do... :D and G41 is the Code for left side, G42 for right side compensation.
But the exportet gCode doesn't have a G41 if i switch "use compensation" to enable, i lookt for it.

In my mind the function "use compensation" is disabled in general, because it conflicts with the FCs (HeeksCADs) own toolcompensation.
If you want to write a G41 to the gCode by setting "use compensation" to enable, then you have to define left or right to, which was be done in the line before. But "side" influenced already FCs (HeeksCADs) own toolcompensation. If "side" is set to left or right FC creates a compensatet path, then a G41 doubles the toolcomensation and the postprozessor gives a errormessage.

To be usefull "use compensation" has to have not only a "true"... a "true left" for G41 or true right for G42 and should work, but only if "side" is set to "on".
Gruß Herbert
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: How to create a path without toolcompensation?

Post by sliptonic »

herbk wrote:
Don't you also have to tell the controller to enable it?
of course you have to do... :D and G41 is the Code for left side, G42 for right side compensation.
But the exportet gCode doesn't have a G41 if i switch "use compensation" to enable, i lookt for it.

In my mind the function "use compensation" is disabled in general, because it conflicts with the FCs (HeeksCADs) own toolcompensation.
If you want to write a G41 to the gCode by setting "use compensation" to enable, then you have to define left or right to, which was be done in the line before. But "side" influenced already FCs (HeeksCADs) own toolcompensation. If "side" is set to left or right FC creates a compensatet path, then a G41 doubles the toolcomensation and the postprozessor gives a errormessage.

To be usefull "use compensation" has to have not only a "true"... a "true left" for G41 or true right for G42 and should work, but only if "side" is set to "on".


This is a tricky one for a couple reasons. First there's at least two different ways that people use radius compensation. Dan Falck calls these "east coast" and "west coast" styles.

The 'west coast' style is pretty easy to support. Basically we just need to make sure 'use comp' causes the correct G41/G42 to be added to the output.

I think you're primarily referring to the 'east coast' style. That one is harder because we're asking the visual representation of the commands to do two conflicting things:

1) We want them to be the visual representation of the actual path commands that are stored so we can verify that code is being generated correctly. A properly generated uncompensated path will have the plot lines 'on' the geometry lines.

2) We want the lines to represent what will actually happen when we run the code. ie, the tool will move around the part by the radius of the cutter. For your uncompensated path, we don't care about how far it is away from the part, but we very much care which side its on. The user will want to verify at a glance that the Path will be compensated by the controller in the correct direction. I don't think 'right' and 'left' are enough to make sure we're configuring correctly since these depend on the direction of travel CW/CCW. And those are related to whether we want climb vs. conventional milling. And that is related to whether the spindle is turning forward or backward.

My priority is for the UI to help the user avoid mistakes. I can imagine some solutions to these issues, but they're pretty complex and long-term. For now, I really don't know how to proceed so I'm just going to avoid the problem and think about it for a while. :D
chrisb
Veteran
Posts: 53927
Joined: Tue Mar 17, 2015 9:14 am

Re: How to create a path without toolcompensation?

Post by chrisb »

sliptonic wrote: 1) We want them to be the visual representation of the actual path commands that are stored so we can verify that code is being generated correctly. A properly generated uncompensated path will have the plot lines 'on' the geometry lines.

2) We want the lines to represent what will actually happen when we run the code. ie, the tool will move around the part by the radius of the cutter. For your uncompensated path, we don't care about how far it is away from the part, but we very much care which side its on. The user will want to verify at a glance that the Path will be compensated by the controller in the correct direction. I don't think 'right' and 'left' are enough to make sure we're configuring correctly since these depend on the direction of travel CW/CCW. And those are related to whether we want climb vs. conventional milling. And that is related to whether the spindle is turning forward or backward.

My priority is for the UI to help the user avoid mistakes. I can imagine some solutions to these issues, but they're pretty complex and long-term. For now, I really don't know how to proceed so I'm just going to avoid the problem and think about it for a while. :D
Starting with the PathWB I used to generate the path "on" and use G41/G42 from the machine's command set. The reason was that Path WB in the old times did not always do what I wanted and there was a further special reason: Transfering the GCode to the machine was very complicated, and like this I could change the tool diameter directly in the machine. What I used and needed was actually the view of the path for verification.
However, G41/G42 are on my machine a bit delicate. I hardly get error messages when something goes wrong, e.g. the radius being smaller than the tool diameter. In that case the machine's behaviour is completely unpredictable!
I would rather rely on FreeCAD's offset mechanism. To verify I can view the offsetted path in advance. So for the future I would like to have the following (not taking into account my personal special situation):
  • For every path I can select (local) between on/left/right. We have this already!
  • I have a global view to switch the path compensation on or off. This is for verification purposes, that the path meets the desired object.
  • The local switch "use tool compensation" is redundant (left/right => true, on => false) and can safely be removed.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply