i3lib – native gcode CAM subroutines

One of the things I’ve been working is a set of gcode subroutines meant to make easy to write gcode. Well, in the end you write very little gcode if you use it. Here are some examples:

gcode

So, for example, here the code for the hexagon pocket milling:

    #<s> = 30
    #<h> = [SQRT[3] * #<s>]
    o<i3_c_new_group> call [80] [0]
    o<i3_v_add_vertex> call [#<s> / 2] [0]
    o<i3_v_add_vertex> call [#<s>] [#<h> / 2]
    o<i3_v_add_vertex> call [#<s> / 2] [#<h>]
    o<i3_c_mirror> call [0] [1] [0] [1]
    o<i3_do_cut_mill_by_layer> call [19] [10] [0] [-1] [0] [0]

Most of hard work has been done, there’s some cleanup and documentation left. At some point I would like to release this code as open source. It makes really easy to create paths for simple parts (please note all the generated paths account for tool compensation, not G4X).

Advertisements
This entry was posted in All, CNC. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s