entityClosed nd OnNewEntity explanation

Having problems with or questions about SheetCam? Post them here.
User avatar
Les Newell
Site Admin
Posts: 3660
Joined: Thu May 11, 2006 8:12 pm

Re: entityClosed nd OnNewEntity explanation

Post by Les Newell »

I just had a look into this and I think I can add it to the next release. It isn't in the release I put up earlier today.
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: entityClosed nd OnNewEntity explanation

Post by David_Lelen01 »

When might we expect the next update? I'm trying to wait on this to update our other computers here.
User avatar
Les Newell
Site Admin
Posts: 3660
Joined: Thu May 11, 2006 8:12 pm

Re: entityClosed nd OnNewEntity explanation

Post by Les Newell »

I'll try to get it out this week. However as you already know I don't always manage to keep to my deadlines...
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: entityClosed nd OnNewEntity explanation

Post by David_Lelen01 »

I understand... same situation over here. Things come up and plans change
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: entityClosed nd OnNewEntity explanation

Post by David_Lelen01 »

Hey Les, I saw the last update fixed the OnOffset being triggered by leadins, but it seemed to only work right on the first start point and for some reason the breakpoints do not seem to be working on the post debugger. Can you have a look when you get a chance please?

EDIT: Hang on a second, i may have jumped the gun on it only working on the first point. I forgot OnOffset is called AFTER OnPenDown. The breakpoints not working seems to still be an issue though.

EDIT 2: Its hard to tell without the breakpoints, but it looks like the OnOffset function is still being updated after the OnMove or OnArc function is called. If that is the case and OnOffset cannot be updated preferably before OnPenDown is called, then i just dont think i am going to get this to work as intended without a whole bunch of resource draining code.
User avatar
Les Newell
Site Admin
Posts: 3660
Joined: Thu May 11, 2006 8:12 pm

Re: entityClosed nd OnNewEntity explanation

Post by Les Newell »

By the way, I just checked breakpoints and they seemed to work for me. I'm just about to release an update. OnOffsetLeft/right/none will now be just after OnPenDown and just after OnPenUp.
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: entityClosed nd OnNewEntity explanation

Post by David_Lelen01 »

Les, you're awesome, thank you! And okay, i'll try the break points again after i update.
User avatar
djreiswig
Posts: 471
Joined: Sat Feb 20, 2016 4:47 am
Location: SE Nebraska

Re: entityClosed nd OnNewEntity explanation

Post by djreiswig »

I've had sporadic trouble with breakpoints in the past when I was developing my post processor. Haven't messed with it for a while, though.
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: entityClosed nd OnNewEntity explanation

Post by David_Lelen01 »

I've had sporadic trouble with breakpoints in the past...
Comforting to know, because i really cannot get them to work now. I was starting to think i was just doing something stupid. Which i still may be.

Les, correct sequence would be open editor, set breakpoint, save, close editor, run post, and it should stop at a break point and display the editor, correct?

Also Les, its a little hard to tell without the breakpoints working, but it appears the OnOffsetNone is not getting called when the operation is set to "No Offset".
User avatar
Les Newell
Site Admin
Posts: 3660
Joined: Thu May 11, 2006 8:12 pm

Re: entityClosed nd OnNewEntity explanation

Post by Les Newell »

David_Lelen01 wrote: Fri Aug 13, 2021 12:15 pm Les, correct sequence would be open editor, set breakpoint, save, close editor, run post, and it should stop at a break point and display the editor, correct?
You only need to save if you have made a change. You also don't need to close the editor. Either way it should work. I just tested it here and it worked as expected with the editor closed or not. By the way there is a run post button in the editor toolbar so you don't need to switch back to the SheetCam main window.
The only way I have found to break breakpoints is to edit a post supplied with SheetCam (i.e one that is not marked 'edited') then try to set breakpoints on it. When you edit a standard post, SheetCam makes a copy in it's settings folder. Any breakpoints you set however end up matched to the original file name. Restarting SheetCam or closing the file in the editor (File->close current page) then reopening it will fix this. Note: simply closing the editor won't fix it because close actually just hides the window.
Also Les, its a little hard to tell without the breakpoints working, but it appears the OnOffsetNone is not getting called when the operation is set to "No Offset".
Ye, that's likely to happen. It assumes the machine starts with no tool offset applied.
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: entityClosed nd OnNewEntity explanation

Post by David_Lelen01 »

The only way I have found to break breakpoints is to edit a post supplied with SheetCam (i.e one that is not marked 'edited') then try to set breakpoints on it.
And voila, that is exactly what was happening to me. Breakpoints work for me now. This is not the first time the saving the edited post to the user AppData folder has caught me with my pants down. Really a good thing to do though.
Ye, that's likely to happen. It assumes the machine starts with no tool offset applied.
Is that something that may could be modified in the next release? It is not likely to ever cause me a problem, but it could happen. Just with the sequence in the post, it needs to call the OnOffsetNone in order to call the function that writes the start codes.
Post Reply