Filters
17 Mar 2010 13:29 #2337
by bkubicek
Replied by bkubicek on topic Re:Filters
Maybe you just need to replace
PROGRAM=ExchangeXY
by
PROGRAM=ExchangeXY.sh
PROGRAM=ExchangeXY
by
PROGRAM=ExchangeXY.sh
Please Log in or Create an account to join the conversation.
17 Mar 2010 13:44 #2338
by eslavko
Replied by eslavko on topic Re:Filters
bkubicek wrote:
Nope...
.. and I has put two files (one without .sh) on dir.
Maybe you just need to replace
PROGRAM=ExchangeXY
by
PROGRAM=ExchangeXY.sh
Nope...
.. and I has put two files (one without .sh) on dir.
Please Log in or Create an account to join the conversation.
17 Mar 2010 13:50 #2339
by bkubicek
Replied by bkubicek on topic Re:Filters
ok, i am right now downloading git to get the filters to run myself.
I will be back..
I will be back..
Please Log in or Create an account to join the conversation.
17 Mar 2010 16:10 #2341
by bkubicek
Replied by bkubicek on topic Re:Filters
Hm. So today, i dowloaded from git into a completely fresh directory, compiled and there was no filters menu.
anyway, I applied the patch by jeff epler, instead of mine.
it did not work with ubuntu 9.04 right away, I had change the linesand remove the " delete=False".
Also, I had to specify the complete pathname of the filter.
For simplicity reasons, i put all the files in a zip.
This simple bash filters don't work on the Gcode commands that contain [ ] expressions, e.g. the initial axis path.
For aprox 1h i just tried to create python versions. But I have no experience and am frustrated.
I will try to write a limited but better gcode interpreter in c++ and make the filters thereby.
greetings
anyway, I applied the patch by jeff epler, instead of mine.
it did not work with ubuntu 9.04 right away, I had change the lines
+ outfile = tempfile.NamedTemporaryFile(
+ suffix="ngc", dir=tempdir, delete=False)
Also, I had to specify the complete pathname of the filter.
For simplicity reasons, i put all the files in a zip.
This simple bash filters don't work on the Gcode commands that contain [ ] expressions, e.g. the initial axis path.
For aprox 1h i just tried to create python versions. But I have no experience and am frustrated.
I will try to write a limited but better gcode interpreter in c++ and make the filters thereby.
greetings
Please Log in or Create an account to join the conversation.
17 Mar 2010 16:44 #2342
by eslavko
Replied by eslavko on topic Re:Filters
That one work.
As you say with absolute path.
I check the changes.
The curent git doesn't have FILTER_DIRECTORY at all.
That should be incorporated I think (actualy for all filters can be same).
With my experience of EMC/Linux/C+/Python/Bash (aprox 3 weks) all changes are hard to me.
Slavko.
As you say with absolute path.
I check the changes.
The curent git doesn't have FILTER_DIRECTORY at all.
That should be incorporated I think (actualy for all filters can be same).
With my experience of EMC/Linux/C+/Python/Bash (aprox 3 weks) all changes are hard to me.
Slavko.
Please Log in or Create an account to join the conversation.
19 Mar 2010 09:30 #2363
by eslavko
Replied by eslavko on topic Re:Filters
Hello gkubicek..
I think to be good idea to post that change to developer's list. As today git restore again kill that function...
... and to change to use filter_directory can be good too. Absolute path in menu realy looks bad.
Slavko.
I think to be good idea to post that change to developer's list. As today git restore again kill that function...
... and to change to use filter_directory can be good too. Absolute path in menu realy looks bad.
Slavko.
Please Log in or Create an account to join the conversation.
19 Mar 2010 11:53 #2367
by bkubicek
Replied by bkubicek on topic Re:Filters
Hi!
I will probablly post something on the dev-board after the weekend.
The last couple of days I was working on a much better filtering, before and after my normal workinghours.
I now have a c++ class, that reads gcode files, and gives the user access to the individual words.
Words are pairs of {G, 01} or {X,15}, or {' ', ";comment"} or {' ','" "} for some spacing
Also, the current and the previous positions are accessible, currently after each line of gcode.
So based on this words, in the main program i have a general 2-d rotation matrix with a shift.
I also have it working that X [ ] expressions are rotated and scaled and so on.
You would access this filter program then by making a scripts like
--shiftleftby-2.sh--
#!/bin/bash
# unity rotation matrix, just movement
gcodetransform 1 0 0 1 -2 0 $1
in a second stage, i think about doing a qt tool, using the same core code to set the rotation/scaling/movment parameters interactively. with calculated knowledge of the bounding box and lengths.
With Arcs, its a general problem.
If you scale an arc only in x, its not a circle arc anymore, and one would need split it into sections. Im not keen on doing that, and will just return an error message.
I know that there was a mail on the dev list about this arc splitting problem, but its a different context.
I expect is was removed from the dev-trunk, as there are no usefull filterings yet, e.g. my shell scripts did not work on the preloaded-axis-gcode.
If I can give a good filtering application, I think the usefullness will be obvious to anyone.
Initially, I tried to make this filtering code in python, to skip compilation steps and stuff, but i work much more efficient in c++.
But I still need a little bit more time..
I will probablly post something on the dev-board after the weekend.
The last couple of days I was working on a much better filtering, before and after my normal workinghours.
I now have a c++ class, that reads gcode files, and gives the user access to the individual words.
Words are pairs of {G, 01} or {X,15}, or {' ', ";comment"} or {' ','" "} for some spacing
Also, the current and the previous positions are accessible, currently after each line of gcode.
So based on this words, in the main program i have a general 2-d rotation matrix with a shift.
I also have it working that X [ ] expressions are rotated and scaled and so on.
You would access this filter program then by making a scripts like
--shiftleftby-2.sh--
#!/bin/bash
# unity rotation matrix, just movement
gcodetransform 1 0 0 1 -2 0 $1
in a second stage, i think about doing a qt tool, using the same core code to set the rotation/scaling/movment parameters interactively. with calculated knowledge of the bounding box and lengths.
With Arcs, its a general problem.
If you scale an arc only in x, its not a circle arc anymore, and one would need split it into sections. Im not keen on doing that, and will just return an error message.
I know that there was a mail on the dev list about this arc splitting problem, but its a different context.
I expect is was removed from the dev-trunk, as there are no usefull filterings yet, e.g. my shell scripts did not work on the preloaded-axis-gcode.
If I can give a good filtering application, I think the usefullness will be obvious to anyone.
Initially, I tried to make this filtering code in python, to skip compilation steps and stuff, but i work much more efficient in c++.
But I still need a little bit more time..
Please Log in or Create an account to join the conversation.
26 Mar 2010 08:18 #2448
by bkubicek
Replied by bkubicek on topic Re:Filters
There is now a partially working implementation for filtering.
You can create bash strips where you call this application with the correct options
--xflip.sh--
#!/bin/bash
/somewhere/grecode xflip $1
----
THERE ARE STILL MANY THINGS THAT HARDLY WORK
it should compile just by "make", no autoconf or configure necessary.
You can create bash strips where you call this application with the correct options
--xflip.sh--
#!/bin/bash
/somewhere/grecode xflip $1
----
THERE ARE STILL MANY THINGS THAT HARDLY WORK
it should compile just by "make", no autoconf or configure necessary.
Please Log in or Create an account to join the conversation.
23 Jul 2010 11:45 #3469
by bkubicek
Replied by bkubicek on topic Re:Filters
The files in this post are outdated.
I rewrote grecode, and it is hosted here:
code.google.com/p/grecode/
I rewrote grecode, and it is hosted here:
code.google.com/p/grecode/
Please Log in or Create an account to join the conversation.
Time to create page: 0.086 seconds