Toolpath Offset Reversed on Mirror Part

Hey Les, found a bug but I cant tell if its in Sheetcam or in my post. Most likely my post, but I don’t see why. For our plasma, the “reverse cut direction” is ALWAYS checked in the operation dialog box. The post should always output a G41 left offset except for rare circumstances. I have the post written to throw a warning when a right offset is written just as a precaution. It did when it wasn’t supposed to. I rarely ever mirror parts, but for some reason today I did instead of just rotating these. It looks like this mirror in the X caused it to switch from a left to a right offset, even though the actual tool path should still be a left offset. Can you see what is going on here?
Support.zip (16.8 KB)

The tool paths are correct. It looks like OnOffsetRight() is being called instead of OnOffsetLeft(). These functions are highly experimental, which is why they aren’t documented.

Looking at the code I can see why this is happening, however that code is used in several places and changing it may have unexpected effects. I need to run some careful tests to make sure fixing it won’t break anything else.

As a temporary workaround you can do this:

function OnOffsetLeft()
   local part = sc.Parts.Get():op_index(partIndex)
   if part:GetPosition():IsReversed() then
      OffsetDir = "Right"
   else
      OffsetDir = "Left"
   end
   OnArcStart()
end

function OnOffsetRight()
   local part = sc.Parts.Get():op_index(partIndex)
   if part:GetPosition():IsReversed() then
      OffsetDir = "Left"
   else
      OffsetDir = "Right"
   end
	OnArcStart()
end

Okay, i’ll add that for now and just keep an eye on the release notes to see if any updates are done on those functions i guess.

Side note, i really wish i had the time to delve deeper into lua and all of these more advanced lines of code you come back with. I feel like i could do so much more and not bug you as much if i did.

Thanks Les!

If you did, you’d just come up with more and more esoteric tweaks and bug me about those!

Well… you’re probably not wrong there. :laughing: I just believe in small businesses and would like to help them grow and succeed in any way I am able. And I say small business loosely, I have no idea what your sales volume is for SheetCam or your number of employees. Maybe one day you could market SheetCam to industrial machine manufacturers. Although with that comes its own set of nightmares. But with SheetCam, I am currently using one simple software to replace 4 different overly complicated softwares. Sure there are a few things I would love to see changed or improved, cough reports cough, but sheetcam really is a simple and easy to use software and I love it.

https://sheetcam.discoursehosting.net/t/the-sheetcam-story/6549/1
Les is a one man show. At least he was. It’s impressive what he has been able to create.

Yes, I’m still a one man show. As far as marketing is concerned the majority of my sales are to machine manufacturers. I prefer selling to OEMs because they tend to be the first port of call when a customer has a question. That reduces my support workload quite a bit.

This is fixed for the next release. I’m pushing to get this release out in the next few days.

That’s a good read and quite an impressive story! Now I’m even more impressed than I was before Les! Right on man!

And I’m sure that does reduce your tech support quite a bit… you probably regret selling a copy to us now :laughing: