Use Path Rules to Set Post Variable

Having problems with or questions about SheetCam? Post them here.
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: Use Path Rules to Set Post Variable

Post by David_Lelen01 »

Les Newell wrote: Wed May 06, 2020 3:02 pm I see a lot of potential for that to mess up, depending on your drawing geometry. Would action points not be a better solution. Dmittedly you would have to manually place the action points.

Another workaround would be to modify the post to spot these short line segments.
I had another thought on this in the middle of the night... what if the path rule would check the angle between these short line segments. Create a path rule "OnEntites" less than "x" length and direction change more than "x" degrees, then do "code". Now yes, i believe i can do this coded into the post, but i do not see how i would be able to enact the code at some distance before this short entity. Thoughts?
Jolbas
Posts: 88
Joined: Sat Feb 02, 2019 8:59 am

Re: Use Path Rules to Set Post Variable

Post by Jolbas »

I would like a better way to send messages to the post depending on path rules and action points. The workaround I use for now is to change the feed in the path rule or action pont. I save the base feedRate in OnNewOperation() and compare it with feedRate in OnSetFeed().

But I think it would be great if it was possible to run a post processor function from the code snippets. A preset function would be fine with the possibility to send a string as argument.

Maybe if it would be possible to trigger OnComment() by writing a comment in the code snippet.
Jolbas
Posts: 88
Joined: Sat Feb 02, 2019 8:59 am

Re: Use Path Rules to Set Post Variable

Post by Jolbas »

Jolbas wrote: Sun May 10, 2020 6:48 am Maybe if it would be possible to trigger OnComment() by writing a comment in the code snippet.
I read the documentation and found that the notes tab is supposed to work like this. This works as documented for notes on operations and tools but not for notes on code snippets.
Jolbas
Posts: 88
Joined: Sat Feb 02, 2019 8:59 am

Re: Use Path Rules to Set Post Variable

Post by Jolbas »

Is it intentional that notes on code snippets not generates a comment or is it a bug?
User avatar
Les Newell
Site Admin
Posts: 3661
Joined: Thu May 11, 2006 8:12 pm

Re: Use Path Rules to Set Post Variable

Post by Les Newell »

I never really thought about it. I'll look into adding the notes in the next dev release.
Jolbas
Posts: 88
Joined: Sat Feb 02, 2019 8:59 am

Re: Use Path Rules to Set Post Variable

Post by Jolbas »

Thanks. I think it's a good idea. It gives the possibility to change behaviour of the post processor on arbitrary point along the cutting path. At the same time it may solve this topics authors request.
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: Use Path Rules to Set Post Variable

Post by David_Lelen01 »

At the same time it may solve this topics authors request.
I do believe that would solve the original question to this topic actually. I'll try it and see when its released. Thanks!
I had another thought on this in the middle of the night... what if the path rule would check the angle between these short line segments. Create a path rule "OnEntites" less than "x" length and direction change more than "x" degrees, then do "code". Now yes, i believe i can do this coded into the post, but i do not see how i would be able to enact the code at some distance before this short entity. Thoughts?
And i was wondering if you was this Les? Could this reduce some of the problems that would arise with just checking for short segments?
User avatar
Les Newell
Site Admin
Posts: 3661
Joined: Thu May 11, 2006 8:12 pm

Re: Use Path Rules to Set Post Variable

Post by Les Newell »

I'm not keen on rules that rely on two or more variables. They could get rather complicated to use. Whay do you have to keep coming up with these obscure use cases? :wink:
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: Use Path Rules to Set Post Variable

Post by David_Lelen01 »

I'm just special i guess lol 8)

I know i ask for a lot of special off the wall stuff, but it is all stuff that will streamline the process and improve efficiency. In my mind at least lol. :lol: I totally understand sheetcam is intended as a beginner level easy to use cam software and most of what i ask for just complicates it. But it never hurts to ask haha.
User avatar
Les Newell
Site Admin
Posts: 3661
Joined: Thu May 11, 2006 8:12 pm

Re: Use Path Rules to Set Post Variable

Post by Les Newell »

No worries, some of your ideas have resulted in useful improvements to SheetCam. Keep on being special :lol:
stivemaster
Posts: 35
Joined: Sat Apr 13, 2019 6:46 am

Re: Use Path Rules to Set Post Variable

Post by stivemaster »

Although Les will not like this, I personally think that the introduction of a new rule makes sense if it solves a problem that affects ALL users using * for plasma and laser. What do I mean - if there was a rule - when changing direction by more than ... degrees, whether at an angle or with an arc, this would make it possible to remove the ambiguous rules -"after start"," before end","apply peripheral feed rate","on inside corners","outside corners","all corners", "near pierce".Then if it is a question of THC it is clear that in case of lead in as the direction changes it will be switched off (in case of laser it can be with 80% of the power), at all turns, sharper than the degree chosen by the user and finally at lead out too.
This would not create a problem even if the THC was turned off somewhere where it is not necessary within a few millimeters. Worse is when it is NOT turned off when it should be!
David_Lelen01
Posts: 452
Joined: Wed Sep 12, 2018 8:18 pm
Location: South Carolina, USA
Contact:

Re: Use Path Rules to Set Post Variable

Post by David_Lelen01 »

Although Les will not like this.....
I agree with you, the rule you mentioned would be very useful and could simplify things quite a bit. I dont see how it would solve my original problem of needing a rule to change the power level on short line segments. Corners are not a problem for our laser, it is when it makes several sharp corners within a short distance. It just melts everything there and loses all detail.
stivemaster
Posts: 35
Joined: Sat Apr 13, 2019 6:46 am

Re: Use Path Rules to Set Post Variable

Post by stivemaster »

What do you not really understand? Your problem is similar to that of plasma cutting. If such a rule can be made, which I propose, in any place where the direction changes by more than ??? degrees, whether at an angle or with an arc or with a series of small straight lines will be set as action points. You will make a code that uses the rule and it will be - In the beginning reduce the power of ??? %, and in the end increase the power. The same should be used for small holes.

P.P. But I don't think I'll be lucky enough to get an answer! Mr. Newell has not been in the forum for 48 hours !!!
kabel
Posts: 1
Joined: Tue Jul 28, 2020 3:39 pm

Re: Use Path Rules to Set Post Variable

Post by kabel »

Hello, the idea is very good. I hope it is realized faster. It would help a lot in working with plasma.
User avatar
Les Newell
Site Admin
Posts: 3661
Joined: Thu May 11, 2006 8:12 pm

Re: Use Path Rules to Set Post Variable

Post by Les Newell »

stivemaster wrote: Wed Jul 22, 2020 8:26 am Although Les will not like this, I personally think that the introduction of a new rule makes sense if it solves a problem that affects ALL users using * for plasma and laser. What do I mean - if there was a rule - when changing direction by more than ... degrees, whether at an angle or with an arc,
There are problems with your proposed rule. For example what about cutting a large semicircle? That could have an angle of 180 degrees but still want THC on.
this would make it possible to remove the ambiguous rules -"after start"," before end","apply peripheral feed rate","on inside corners","outside corners","all corners", "near pierce"
No, it would not allow you to remove any of those rules. They have other functions.

Now a rule that I could see a use for is one that triggers if the total angle change over a given distance is greater than a given amount. Basically it is trying to track the angular velocity. This would catch arcs or a series of short line segments that approximate an arc or any combination of the two.
P.P. But I don't think I'll be lucky enough to get an answer! Mr. Newell has not been in the forum for 48 hours !!!
I get email notifications for every post on the forum so I don't have to visit the site every few hours. I may not immediately reply to threads if I think others may chip in with suggestions/solutions to the problem.
Post Reply