Hi all,

Every time I had to write a CNC-mill program using G-codes I got annoyed
by the archaic format and syntax. Especially when needing to convert
positional data from mil to mm, having recurring patterns and then also
trying to keep track of everything.

I looked for a meta compiler or generic pre-processor, but could not
find anything that satisfied me. Being able to program should be "easy".

The G-Code Meta Compiler (gcmc) is just that, a scripting meta language,
using modern procedural paradigms and a context free grammar, to
generate G-code. It takes in a script and generates all the movements.

Units can be assigned/attached to values to do metric/imperial
conversions automatically. A rich set of built-in functions for G-codes
and mathematical manipulations make it easy to keep track.

Variables are typed into integer/floating point (scalars), vectors and
vector-lists. You can define functions and use local variables. Standard
loop-control is performed using foreach/for/while/do-while constructs as
well as conditional execution with if/if-else constructs.

The context-free grammar allows you to make sources more readable and
therefore more debug-able.

You can find the code at my git repository:
 https://gitorious.org/gcmc/gcmc

An example script can be found in the "tests" directory (cutter.gcmc)
and some preliminary documentation about the grammar and built-in
functions can be found in the doc directory (gcmc.txt).

Please note that the code is not entirely mature as of yet. However, the
basics should function properly and you are encouraged to use it and
take a look.

If you have any comments you are welcome to provide feedback.

-- 
Greetings Bertho

(disclaimers are disclaimed)

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to