Jump to content
Ultimaker Community of 3D Printing Experts

Manual for developing cura plugins


arcadi
 Share

Recommended Posts

Posted · Manual for developing cura plugins

What sort of plugins would you like to develop?

The old Cura had "plugins" for postprocessing gcode. The new Cura has those as well, but calls them "scripts". The new Cura also has many "plugins"; almost everything from USB printing to Layer View, from Cura Connect to moving, scaling and rotating models, all of that is implemented as "plugins".

So, what sort of "plugins" would you like to create?

No, there are no tutorials as far as I am aware, but I could point you to simple plugins that are relatively easy to understand and learn from.

  • Link to post
    Share on other sites

    • 3 weeks later...
    • 2 years later...
    Posted · Manual for developing cura plugins
    On 11/9/2017 at 10:12 PM, ahoeben said:

    No, there are no tutorials as far as I am aware, but I could point you to simple plugins that are relatively easy to understand and learn from.

    I want it, if is it possible. 🙂

    Thank you very much.

     

    Meanwhile, I'm a fan of your plugins. 👍

  • Link to post
    Share on other sites

    Posted · Manual for developing cura plugins

    I want to develop and debug post processing scripts. 

     

    The section of develop is almost easy, reading other PPScripts and having some python knowledge, but debugging is a pain, open cura, "execute" the PPS, see the result, close cura, modify the PPS, open cura, "execute" the PPS, see the result, close cura... so boring. I tried this thread, but without any result:

     

    I could be a great idea to have a manual to configure how to develop and debug PPScripts, or just an easy "cura_pps.exe" to invoke it with parameters like the gcode, the PPS, and in the batch window see what is happening or something to stop/continue each processed line from the gcode.

     

     

     

  • Link to post
    Share on other sites

    Posted · Manual for developing cura plugins
    12 hours ago, ersinkecis said:

    I want it, if is it possible. 🙂

     

    What sort of plugins would you like to create?

  • Link to post
    Share on other sites

    Posted · Manual for developing cura plugins

    Currently we have a wiki on GitHub https://github.com/Ultimaker/Cura/wiki/Creating-Packages

     

    I'd really like to do something more comprehensive than this though, so your suggestions are noted and I'm watching this thread.

     

    We were already banding some ideas about this around, maybe something like a readthedocs template. What would you like to see?

    • Like 1
    Link to post
    Share on other sites

    Posted (edited) · Manual for developing cura plugins
    2 hours ago, maht said:

    Currently we have a wiki on GitHub https://github.com/Ultimaker/Cura/wiki/Creating-Packages

     

    I'd really like to do something more comprehensive than this though, so your suggestions are noted and I'm watching this thread.

     

    We were already banding some ideas about this around, maybe something like a readthedocs template. What would you like to see?

     

    I understand that this post is only for plugins, is'n it?

     

    May i open another to learn about post-processing scripts? Is it possible?

     

    Thank you so much in advance

     

     

    Edited by Rabbit-o
  • Link to post
    Share on other sites

    Posted · Manual for developing cura plugins
    51 minutes ago, Rabbit-o said:

    May i open another to learn about post-processing scripts? Is it possible?

     

     

  • Link to post
    Share on other sites

    Posted (edited) · Manual for developing cura plugins
    16 minutes ago, Cuq said:

     

     

     

    Thank you so much Cuq!

    Rabbit.

     

    Edited by Rabbit-o
  • Link to post
    Share on other sites

    Posted · Manual for developing cura plugins
    16 hours ago, Rabbit-o said:

     

    I understand that this post is only for plugins, is'n it?

     

    May i open another to learn about post-processing scripts? Is it possible?

     

    Thank you so much in advance

     

     

     

    Ah I see. The post processing plugin is indeed a plugin. Within this particular plugin you can add python scripts that will post process your GCode as it exits CuraEngine. You can see them here https://github.com/Ultimaker/Cura/tree/master/plugins/PostProcessingPlugin

     

    More recently when we refer to plugins we refer to the ones distributed through the Marketplace, which behave a little differently. That's what I was talking about above (and I'd still love to hear what ideas you might have for documentation there).

  • Link to post
    Share on other sites

    Posted · Manual for developing cura plugins
    On 6/17/2020 at 2:34 PM, ahoeben said:

    What sort of plugins would you like to create?

    For example, I want to write a plug-in about electricity consumption.

  • Link to post
    Share on other sites

    Posted · Manual for developing cura plugins

    That sounds like an "Extension" type of plugin:

    https://github.com/Ultimaker/Uranium/wiki/Plugin-Types#extentions

    An example can be found here:

    https://github.com/Ultimaker/UraniumExampleExtensionPlugin

     

    It also sounds similar to this plugin, but you'll have to update it a little before it will work in Cura 4.6:

    https://github.com/zoff99/ElectricPrintCostCalculator

    At the very least you would have to update the api in plugin.json from 4 to 7, but you also have to change from Preferences.getInstance() to CuraApplication.getInstance().getPreferences(), and there is likely more.

     

    See also the plugin documentation for Uranium, the framework Cura is built on:

    https://github.com/Ultimaker/Uranium/wiki/Creating-plugins

    Here are some more basic examples:

    https://github.com/Ultimaker?q=example

     

     

    • Like 2
    • Thanks 1
    Link to post
    Share on other sites

    Posted · Manual for developing cura plugins
    On 6/19/2020 at 8:49 AM, ahoeben said:

    That sounds like an "Extension" type of plugin:

    https://github.com/Ultimaker/Uranium/wiki/Plugin-Types#extentions

    An example can be found here:

    https://github.com/Ultimaker/UraniumExampleExtensionPlugin

     

    It also sounds similar to this plugin, but you'll have to update it a little before it will work in Cura 4.6:

    https://github.com/zoff99/ElectricPrintCostCalculator

    At the very least you would have to update the api in plugin.json from 4 to 7, but you also have to change from Preferences.getInstance() to CuraApplication.getInstance().getPreferences(), and there is likely more.

     

    See also the plugin documentation for Uranium, the framework Cura is built on:

    https://github.com/Ultimaker/Uranium/wiki/Creating-plugins

    Here are some more basic examples:

    https://github.com/Ultimaker?q=example

     

     

    Thank you for the information you provided. I will evaluate.

  • Link to post
    Share on other sites

    Posted · Manual for developing cura plugins
    On 6/16/2020 at 10:34 PM, Rabbit-o said:

    debugging is a pain, open cura, "execute" the PPS, see the result, close cura, modify the PPS, open cura, "execute" the PPS, see the result, close cura... so boring.

    Is there no support anywhere to deal with this ungodly cycle of modify the Python code, double-click on an STL to load up Cura, go get a coffee or something because Cura is DEATHLY slow, slice, check results, close Cura, lather, rinse, repeat.  Surely we can't be the ONLY people who think that this is a REALLY crummy way to test and debug code.

     

    What is the correct development cycle to develop, test, and debug post-processing Python scripts?

    • Like 1
    Link to post
    Share on other sites

    Posted · Manual for developing cura plugins
    8 hours ago, Aln said:

    What is the correct development cycle to develop, test, and debug post-processing Python scripts?

     

    Modify the Python code, double-click on an STL to load up Cura, go get a coffee or something because Cura is DEATHLY slow, slice, check results, close Cura, lather, rinse, repeat.

    • Like 1
    Link to post
    Share on other sites

    Posted · Manual for developing cura plugins
    48 minutes ago, ahoeben said:

    Modify the Python code, double-click on an STL to load up Cura, go get a coffee or something because Cura is DEATHLY slow, slice, check results, close Cura, lather, rinse, repeat.

     

    I think you forgot :  

    Modify the Python code, delete the log filedouble-click on an STL to load up Cura, go get a coffee or something because Cura is DEATHLY slow, slice,  analyze the log file, check results,  analyze the log file,  close Cura, lather, rinse, repeat.

  • Link to post
    Share on other sites

    Posted · Manual for developing cura plugins

    Kidding aside, it is mostly how I develop my plugins.

     

    The biggest difference is that I run Cura from source which shows the log output directly as Cura starts. Also my Cura starts up in 15-20 seconds, so I can keep my coffee intake moderate.

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
     Share

    • Our picks

      • New here? Get ahead with a free onboarding course
        Hi,
         
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 8 replies
    ×
    ×
    • Create New...