G42/G41 before rapid move ?

Is it possible to add the offset compensation before rapid move like this ?

N20 M6 T2
N30 G42 (offset right)
N40 G0 X62.55 Y77.28

Thanks Laurits.

You’re going to have to tell us what post you are using. It should be possible to add those commands.

i am using a modified version of (“Siemens laser cutter post processor\n”)

TwinCat laser post2.0.scpost (2.86 KB)

The offsets (None, Left & Right) are separate subs in the post, so SheetCam must be calling them to get the G40, G41 & G42 in the gcode. You want them to appear after the tool change settings and before the rapid, where are they appearing now? What do you do in your job file to get the offsets to output? I’m not familiar with lasers. This may be a question for Les @ SheetCam.

Why do you want offset compensation for a RAPID move?

Rapid moves are normally non-cutting / positional moves that are done to get the machine cutter to a location BEFORE cutting begins… so offset compensation is not nromally required before a G00 / G0 rapid move.

Like I asked “Why do you want offset compensation for a RAPID move?”

G41/G42 support is very experimental. I didn’t even document it because it is not really at a point where I would trust it for production use.

SheetCam expects rapid moves to be as commanded without any offset. Few controls will even accept offsets on rapid moves. As @robertspark asks, why do you need this?

I need this because my controller only accepts “linear move” as the first move in a contour when offset compensation is active.
so if i am using “lead-in/Arc” i get an error when G41/42 is active.

i think “arc lead-in” is preferable when cutting holes in thin material at high speed, you get a more consistent velocity, less jerk in the gantry.

I have done some testing with moving the offset compensation before the rapid move, and its working fine.

another solution would be to add line segment to the arc lead-in, like in fusion 360 (see attach picture)

Thanks Laurits.


I notice that these functions from the earlier posted post processor don’t appear in the Post Documentation for the current development release

function OnOffsetNone()
   post.Text(" G40 (offset off)\n");

function OnOffsetLeft()
   post.Text(" G41 (offset left)\n");

function OnOffsetRight()
   post.Text(" G42 (offset right)\n");

Just wondering how / when they are called?

I presume that they are called at the start of each operation and are based upon “No Offset”, “Inside Offset” and “Outside Offset”

They are called at the start and end of each cut. These functions are not documented because they are untested code and highly experimental. There are some cases where the cut side can be wrong. Use with extreme caution.


Are the variables “No Offset”, “Inside Offset” and “Outside Offset” available within UCCNC from the operations for use within a post processor?

Say you wanted to use (insert) them within the start of the operation … then this would probably provide the needs of the OP

he would still need to specify the offset for the G42/43 move which could not be the kerf width… but it could be done via a custom / added variable.

Just thinking / learning…

“No Offset”, “Inside Offset” and “Outside Offset” are not available to the post processor. It wouldn’t really help anyway because you also need to take into account the cut direction (cimb or normal cutting).