Hi,

Bernhard Kubicek пишет:
> Hi!
> I am quite new to EMC developing, and not really good with tcl and 
> python. Actually, I started this morning. However, I managed to add a 
> new menu-item to axis' File menu.
> It is called "Filter", you choose an executable program, and after 
> pressing ok, the executeable is called with one parameter being the 
> currently opened gcode.
> The program can do whatever with this code, e.g. remove all comments, 
> center it, modify it, and is expected to finally output some new gcode 
> to its output stream.
> This stream is written to a temporary file , and reread as new gcode-file.
>
>   
The idea of having some filter control from AXIS seems to be good.
Though, I think it should be extended to allow several filters to work on
the same G-code (consecutively).
> [The temporary file is named "filter.ngc", which is stupid, it should be 
> random. I don't know how to do this.]
>   
There is a standard way to get temporary file names in Linux:
http://www.gnu.org/s/libc/manual/html_node/Temporary-Files.html

Although, I suggest you do something like this:
file.ngc->filter1->file-filter1.ngc
This way, you can stack filters as much as you want, up to file name
limit (256, I guess?)...


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to