Script bash
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4978
- Thank you received: 1376
23 Nov 2014 12:26 #53310
by Todd Zuercher
Replied by Todd Zuercher on topic Script bash
Personally I am not a big fan of mirror imaging G-code files on a router. It screwed up your milling directions. Changing it from conventional milling to climb. This can make a big difference in cut quality, and if your machine has backlash can even change the dimensions of the finished part. I'd rather just mirror and reoutput the file from the cam program and have two correct files.
Please Log in or Create an account to join the conversation.
23 Nov 2014 22:37 #53320
by ArcEye
Replied by ArcEye on topic Script bash
Hi
I have made a sim which demonstrates a few points. It is not a solution just an example.
There is a video of it running, but since google took over Youtube, they have got their all pervasive tentacles right into it and I refuse to jump through their hoops,
give them my phone number etc to 'verify' an account that worked perfectly previously.
The video is in the zip, just play it with mplayer or similar.
Copy the directory flipcode to your ~/linuxcnc/configs directory
Run linuxcnc from inside it.
Linuxcnc will start normally.
File > Open and select the /flipcode/square2.orig file
This will activate the filter, which will produce a left mirror and right mirror of the code, using grecode.
(the py program I suggested turned out to be poor, kept inserting line numbers and leaving out some lines)
The left mirror will be loaded
Pressing the right button will load the right mirror of the code
Press the left button to re-load the left mirror again.
It should hopefully show you how to use a filter script (deliberately not operating on all .ngc, just special extension files meant to be mirrored)
how to set up buttons linked to halui commands and loading files though M code scripts
As I said it is not a solution for your machine, just one way to produce mirrored plots at a button press
Hopefully will assist you design the optimum setup for your machine
regards
www.mgware.co.uk/temp/flipcode.zip
Size 9MB (mostly the video)
I have made a sim which demonstrates a few points. It is not a solution just an example.
There is a video of it running, but since google took over Youtube, they have got their all pervasive tentacles right into it and I refuse to jump through their hoops,
give them my phone number etc to 'verify' an account that worked perfectly previously.
The video is in the zip, just play it with mplayer or similar.
Copy the directory flipcode to your ~/linuxcnc/configs directory
Run linuxcnc from inside it.
Linuxcnc will start normally.
File > Open and select the /flipcode/square2.orig file
This will activate the filter, which will produce a left mirror and right mirror of the code, using grecode.
(the py program I suggested turned out to be poor, kept inserting line numbers and leaving out some lines)
The left mirror will be loaded
Pressing the right button will load the right mirror of the code
Press the left button to re-load the left mirror again.
It should hopefully show you how to use a filter script (deliberately not operating on all .ngc, just special extension files meant to be mirrored)
how to set up buttons linked to halui commands and loading files though M code scripts
As I said it is not a solution for your machine, just one way to produce mirrored plots at a button press
Hopefully will assist you design the optimum setup for your machine
regards
www.mgware.co.uk/temp/flipcode.zip
Size 9MB (mostly the video)
The following user(s) said Thank You: grzesiekzxr
Please Log in or Create an account to join the conversation.
- grzesiekzxr
- Offline
- Senior Member
-
Less
More
- Posts: 75
- Thank you received: 0
24 Nov 2014 01:04 #53324
by grzesiekzxr
Replied by grzesiekzxr on topic Script bash
Hi Todd firstly thanks for response.
I'm using some cadcam but for more dificult job.
I'm not establisch backlash but your advise have sens and I agre with you about changing dimension.
But in profesion woodworking mirror is very useful for simple tasks.
Old centres 20 years old and quite new using that possiblity.
Thanks
Reards.
I'm using some cadcam but for more dificult job.
I'm not establisch backlash but your advise have sens and I agre with you about changing dimension.
But in profesion woodworking mirror is very useful for simple tasks.
Old centres 20 years old and quite new using that possiblity.
Thanks
Reards.
Please Log in or Create an account to join the conversation.
- grzesiekzxr
- Offline
- Senior Member
-
Less
More
- Posts: 75
- Thank you received: 0
24 Nov 2014 01:14 #53325
by grzesiekzxr
Replied by grzesiekzxr on topic Script bash
Hi ArcEye .
I just download mplayer and watch video it's amazing greate job
.
Sory for the trouble witch youtube ,grand company are arrogant .
Video looks like I realy wish.
Now I have to go to workschop and try it.
When I will check I'll answer.
But now I see that this is what I want
I just download mplayer and watch video it's amazing greate job
![:woohoo: :woohoo:](/media/kunena/emoticons/w00t.png)
Sory for the trouble witch youtube ,grand company are arrogant .
Video looks like I realy wish.
Now I have to go to workschop and try it.
When I will check I'll answer.
But now I see that this is what I want
Please Log in or Create an account to join the conversation.
- grzesiekzxr
- Offline
- Senior Member
-
Less
More
- Posts: 75
- Thank you received: 0
25 Nov 2014 04:56 #53360
by grzesiekzxr
Replied by grzesiekzxr on topic Script bash
Hallo,
I just checking flipcode and when trying to open sqare2.orig I have error info permision denied.
When I just open righimage or leftimage evrything is ok and buttons working properly .
In all files permission is checked.
Maybe it's not enought and I schould do it by terminal and chmod.?
I just attach screenshots.
Than
ks.
I just checking flipcode and when trying to open sqare2.orig I have error info permision denied.
When I just open righimage or leftimage evrything is ok and buttons working properly .
In all files permission is checked.
Maybe it's not enought and I schould do it by terminal and chmod.?
I just attach screenshots.
Than
ks.
Please Log in or Create an account to join the conversation.
25 Nov 2014 15:22 #53380
by ArcEye
Replied by ArcEye on topic Script bash
Hi
You have incorporated it partially into a working config by the look of things
I expect the problem with the origin filter is that you have not given a proper path to it
It would be a good idea to chmod everything anyway
$ sudo chmod -R grzegorz:grzegorz ~/linuxcnc/configs/flipcode
and then deploy files from there elsewhere
regards
You have incorporated it partially into a working config by the look of things
I expect the problem with the origin filter is that you have not given a proper path to it
orig = /home/grzegorz/linuxcnc/configs
It would be a good idea to chmod everything anyway
$ sudo chmod -R grzegorz:grzegorz ~/linuxcnc/configs/flipcode
and then deploy files from there elsewhere
regards
Please Log in or Create an account to join the conversation.
- grzesiekzxr
- Offline
- Senior Member
-
Less
More
- Posts: 75
- Thank you received: 0
25 Nov 2014 16:11 #53381
by grzesiekzxr
Replied by grzesiekzxr on topic Script bash
Hi,
Yes I tought the same and try many paths like blind man.
I'm sure that I can check what is exact path, maybe in attached file linuxcnc_print.txt.
But I wonder which path is right.
If not there then where ?
I will try more today.
Thanks.
Yes I tought the same and try many paths like blind man.
I'm sure that I can check what is exact path, maybe in attached file linuxcnc_print.txt.
But I wonder which path is right.
If not there then where ?
I will try more today.
Thanks.
Please Log in or Create an account to join the conversation.
25 Nov 2014 16:42 #53382
by ArcEye
The path for a filter must be a full one which names the script to be opened, where it is is irrelevant so long as it exists.
The alternative is to put the script in a directory already in the $PATH environmental variable like /local/bin for example
Then you could just have
orig = flipfilter
Look at the sample .ini file
regards
Replied by ArcEye on topic Script bash
But I wonder which path is right.
The path for a filter must be a full one which names the script to be opened, where it is is irrelevant so long as it exists.
The alternative is to put the script in a directory already in the $PATH environmental variable like /local/bin for example
Then you could just have
orig = flipfilter
Look at the sample .ini file
regards
Please Log in or Create an account to join the conversation.
- grzesiekzxr
- Offline
- Senior Member
-
Less
More
- Posts: 75
- Thank you received: 0
25 Nov 2014 17:39 - 25 Nov 2014 17:40 #53385
by grzesiekzxr
Replied by grzesiekzxr on topic Script bash
Last edit: 25 Nov 2014 17:40 by grzesiekzxr. Reason: error
Please Log in or Create an account to join the conversation.
25 Nov 2014 17:56 #53386
by ArcEye
Replied by ArcEye on topic Script bash
It ends in M2, that is all that is required, I never user %
Check the file
Check the file
Please Log in or Create an account to join the conversation.
Time to create page: 0.190 seconds