Skip to content
LinuxCNC Features
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
scripts some icons Jul 21, 2015

LinuxCNC Features v2 - native realtime CAM for LinuxCNC

Welcome to this advanced version of LinuxCNC-Features.

This is an almost complete re-write and you may want to copy it in a different directory like ~/linuxcnc/features but ~/linuxcnc-features is allright too although it will replace a good part of the original one.

Few changes to your subroutines will make them take full advantage of all the new features. There is also some settings you can do in the beginning of

  1. Installation

  1. Download and extract LinuxCNC-Features in the folder of your choice

    or clone git repo "" into ~/ .

  2. Make sure is executable

  3. Make sure you have python-lxml installed. If not, open a terminal and copy the following command :

    sudo apt-get install python-lxml

  4. Testing Stand Alone

To start, open a terminal where is and type :



In your file manager, double-click on

Default catalog is catalogs/mill. In it is menu.xml, def_template.xml and defaults.ngc

Other catalogs are mill-mm, lathe, lathe-mm. The command is : ./ --catalog="catalog-name".

Start linuxcnc (before or after, it does not matter) with the configuration ini you want, mill or lathe. Ex.: 'linuxcnc ~/linuxcnc/configs/sim.axis/axis.ini' (or axis_mm.ini).

Open some examples and if all is well, enjoy.

  1. Installing Embedded

Install by copying the following lines in a terminal

  1. Install python-lxml if not done yet.

  2. Create links into /usr/share/pyshared/gladevcp/

    (change directory as required)

    cd ___features_source_from_git_path___	
    cd /usr/share/pyshared/gladevcp/
    sudo ln "$features_dir"/ -s
    sudo ln "$features_dir"/ -s

    Note! If you are using linuxcnc Run-in-place, consider this directory: /lib/python/gladevcp (here and after).

  3. Change in /usr/share/pyshared/gladevcp/

    sudo gedit /usr/share/pyshared/gladevcp/

    Add this new line anywhere :

     from features import Features
  4. Change hal_python.xml in /usr/share/glade3/catalogs ()glade3 can be glade2)

    sudo gedit /usr/share/glade3/catalogs/hal_python.xml

    Find (it is in the beginning):


    Add after:

     <glade-widget-class name="Features" generic-name="features" title="features">
             <property id="size" query="False" default="1" visible="False"/>
             <property id="spacing" query="False" default="0" visible="False"/>
             <property id="homogeneous" query="False" default="0" visible="False"/>

    Find :

     <glade-widget-group name="python" title="HAL Python">

    Add after :

     <glade-widget-class-ref name="Features"/>

    IMPORTANT NOTE : when linuxcnc updates, it recreates directories and if features do not load you will have to redo steps 2, 3 and 4

  5. Create links into /usr/lib/pymodules/python2.7/gladevcp

    cd ___features_source_from_git_path___	
    cd /usr/lib/pymodules/python2.7/gladevcp
    sudo ln "$features_dir"/ -s
    sudo ln "$features_dir"/ -s
  6. Using Embedded

Add these lines into your ini file inside [DISPLAY] section :

	GLADEVCP = -U --catalog=lathe features.ui
	FEATURES_PATH = /home/fernand/linuxcnc-features

To use different features use one of the catalogs
  1. Optional Translations

Translation will work in Stand Alone AND Embedded modes

Make links in your system locale directories to translation files

cd /usr/share/locale/<YOUR LOCALE>/LC_MESSAGES

sudo ln /<full path to features directory>/locale/<YOUR LOCALE>/LC_MESSAGES/ -s

Use poedit to translate strings in linuxcnc-features.po then save and copy to above path.

  1. Extending subroutines

  1. Param subsitutions "#param_name" can be used to substitude parameters from the feature.

    "#self_id" - unique id made of feature Name + smallest integer id.

  2. Eval and exec "hello world!"

    everything inside tag will be passed

    trought python's eval function.

    print "hello world"

    allmost the same but will take all printed data.

    you can use self as feature's self.

  3. Including Gcode

    G-code files can be included by using one of the following functions:


    content =

  4. Data types

    [SUBROUTINE] type should be lower case, short, without space. Ex : circle, rect, probe-dn

    Valid params types are : string, float, int, bool (or boolean), header (or hdr), combo, items

    Note : you can change string, float and int types on the fly with the context menu. This is usefull with variables.

    When using a value like #<var_name> use "string" because if will evaluate to 0 if "int" used or 0.0 if "float".

    Study examples in ini/mill/fv_circle.ini and others.

    Note : icons and images only need name.ext.

Some information in Russian can be obtained here:

You can’t perform that action at this time.