banner perso

Some links about me. Many of my 3D designs are free. I also post on Google+ and in another blog, oz4.us
review (32) general (26) issue (16) mechanical (16) replacement (14) software (13) addon (12) bowden tube (10) business (10) consumables (10) heat (10) feeder (8) hot end (8) weird (7) motor (6) off-topic (6) trick (6) electric (4) bed (3) cnc (2)

Tuesday, October 30, 2012

How to write a Cura / Skeinforge plugin

First, do you really really want to write a Skeinforge plugin ?

Preliminary notes: some sites such as wired link to this post, but you may like to read my less technical review about temperature gradients applied to wood first. Also, you could check this post if you just want to try it.

Now, read on if you are a programmer and want to write your own plugin for Skeinforge. Note also that Cura no more uses Skeinforge as it has a much easier plugin system (that cannot do as much as what can be done with Skeinforge though).

Indeed and contrary to what was being done so far, I did not want to manually insert the M104 temperatures changes in the file sent to the printer, nor stay close to the ulticontroller. So I designed a plugin for the Cura / Skeinforge software pair.

Since that was not trivial, I document the procedure here.

Printing cushwa's owl (youtube hosts the HD version)

Cura probably will soon support its own plugin system, which will be easier compared to the Skeinforge labyrinth. Dealing with the latter is both complex and not enjoyable even though it does the job, and Cura "old style" adss a convenient GUI on top of it (see first pic).

Writing a Skeinforge plugin in the first place also makes it usable by users of the standalone Skeinforge obviously! Reciprocally, a Cura-specific plugin would make it compatible with the different slicers what it will support soon or later. And I hope it will be sooner than later!

Also, everything there is written in Python. Which is good since it is a clear an easy language (this was my first real experience with it by the way), even though it is slower than many other languages.

Where to create the plugin

Obviously, start by downloading Cura sourcecode. This post was made for version 12.08.

You are looking for the "craft" directory here:


The best way to proceed is to duplicate an existing python plugin. Select one which is close to the functionality you are to implement, it will help also locating the reference to your plugin elsewhere (well, this post is there to help further in fact).

What to modify in existing sources

Add a section for your plugin with labels and help in:


Make sure to keep consistent naming as the labels are used by the program to transfert data between Cura interface, Skeinforge and the plugin (this is completely ugly by the way).

Add your plugin name to the list of extrusion operations in getCraftSequence(), keeping it in a correct sequence here:


Add the interface to Cura, most probably in the expert panel, taking extreme care with the namings again:


One more setting block (with default values) in


Finally, add it here if it takes time to process, with the appropriate factor:


Final note

Once again make sure you are consistent with the labels and plugin parameter names, else you will run in trouble passing the values from Cura GUI to your plugin. Seriously, consider postponing your plugins until there is something better for Cura. Meanwhile, you may read and use Daid's related message.

No comments:

Post a Comment