Maxime Lemonnier wrote:
> Hi,
>
> Have you looked at how axis is coded? 
>
> The whole application holds in one big python file plus a few so-called 
> "libs" 
> in the lib directory. Right now, I have two problems that kind of block me 
> from starting out :
>
> - What/where is the "algorithm" that converts the gCode to opengl commands?
> - How are the extents computed and displayed?
>
>   
Top level is "open_file_guts" function in axis.py.
It creates AxisCanon (subclass of GLcanon "glcanon.py") class, which 
will receive callback for each g-code processed by interpreter, which is 
fed with lines from g-code file.
--------------
o.g = canon = AxisCanon(o, widgets.text, i, progress)
...
            result, seq = gcode.parse(f, canon, unitcode, initcode) /* 
gcode is defined in gcodemodule.c */
--------------
After that canon will contain several lists of lines (arcs are converted 
to lines too),
thus it is possible to calculate extents:
-------------------------
        canon.calc_extents()
        canon.calc_notool_extents()
-------------------------
and create OpenGL draw lists:
------------------------
make_main_list(canon)
make_selection_list(canon)
------------------------

Hope this helps,

Regards,
Alex.

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to