![sheetcam setting lead in sheetcam setting lead in](https://forum.linuxcnc.org/media/kunena/attachments/21103/User_Plasma_controls_2017-04-23.png)
Lead out and lead in for the second part The router goes to this position & plunges before the first cut The lead in & lead out were already there (I think). There may be some mistakes here, but it should give you the idea of how it works. I think you can also remove the D and it will use the current tools' diameter. it will use the tool diameter from the tool table. Not sure if I offset the correct amount, but try this. To use comp, you'd need g-code without the comp applied.
#Sheetcam setting lead in code
YOUr original code had offsets applied by sheetcam, and wasn't using comp. I get my CAD drawing to add an outline equal to half the tool diameter and then don't bother with offsets. It doesn't take all that long, and if I use a CAD drawing, I can add the roughing stages and I get the CAD to add the positions of each change of direction. I try and write most of my code longhand.
![sheetcam setting lead in sheetcam setting lead in](https://www.avidcnc.com/support/instructions/software/img/SheetCamAvidCNC_013.jpg)
![sheetcam setting lead in sheetcam setting lead in](https://forum.langmuirsystems.com/uploads/default/original/2X/8/8869ba3e2d9032ba86e76e6e7f728746b4947d7f.png)
Once you can see what it cannot do, you will probably be able to do what you want to by making a small alteration in the code. It is a simple logic step that it cannot do. It may be the offset is on the right and is suddenly on the left, or the tool has moved too far to set the new offset, or something like that. Follow the route until it comes to the line it is having trouble with and try and work out why it cannot do what it says it cannot do. You should have an original drawing of the part you are trying to mill ( or turn) and you should be able to follow the route of the cut (including the offsets). ?The trouble with relying on an interpreter to write your code for you is that when you make changes you cannot understand where it is going wrong.