Screenshot of my extension

Screenshot of my Inkscape optical rotary encoder disc generator

I developed an extension for Inkscape which can create optical rotary encoder discs in any size/number of segments. It currently supports single and two-track (quadrature) encoders but I’m going to add support for gray encoded discs as well. Post a comment if you have any other suggestions for additional features!

Usage should be pretty straightforward, if you for example do not want a second track, just set its diameter to 0. This applies to other features (like the center hole) as well. The live preview is pretty handy too.

Inkscape extension architecture is pretty straightforward, the .inx file just basically tells Inkscape what kind of UI you want for your plugin, and then it just passes the values from the UI to your extension script (the param fields in the .inx file must match the argument names in your script). The documentation is unfortunately pretty much non-existent. It is easy to use though but pretty limited for anything too complicated. For example I’m not sure if there is any way of affecting the UI from the script so bye-bye any dynamic menus or other dynamic content in the plugin. It can basically run any kind of script your machine is able to run, you’re not just limited to Python, the communication is done through stdout.

You can find the files from GitHub: Inkscape rotary encoder disk generator

Edit: Added gray encoding support, see post: Inkscape optical rotary encoder disc generator: added gray encoder support

Edit: Added single-track gray encoder support, see post: Inkscape optical rotary encoder disc generator: added single-track gray encoder support

Categories: Programming

One Response so far.


  1. [...] creating optical rotary encoder discs. Creando gráficos para encoders ópticos con Inkscape. Vía “DGK Electronics”. Compartir: TweetTambién te pueden interesar:La semana en links (17/07/2012)La [...]

Leave a Reply