Jump to content
Ultimaker Community of 3D Printing Experts
simmonsstummer

Documentation to develop plugin?

Recommended Posts

As far as I know there is already a plugin doing this: The PauseAtZ... it's included in Cura right from the start. But to be honest, I never used it so far. If you want to pause on the fly, you anyway have to use the Ulticontroller. All plugins are 'only' post-processors up to now...

If you want to write your own plugins best thing to do is probably to analyse an existing plugin assuming you are a bit familiar with Python (otherwise you get familiar while analysing the plugin). For the header, there is some information http://wiki.ultimaker.com/How_to_write_a_Cura_plugin.

 

Share this post


Link to post
Share on other sites

The plugin architecture in Cura is restricted to reading and modifying gcode files after they were created. It has to do that by reading the code in as a text file, parsing it, and then writing out the original and/or modified gcodes.

If you want to pause on demand during a print, then you need a firmware modification that will provide that - such as allowing you to select a pause option on the Ulticontroller. Or, are you wanting to stream gcode over USB and then pause from Cura's UI during the print (although that's not how you're supposed to print on the UM2)?

Alternatively, if you are saying that you want to be able to pause at a pre-defined point, but it's not a layer change... then I'm not sure how you will define that in your interface? The reason that layer changes are used as the trigger points in most plugins is because its an easy thing to spot happening as you read through the gcode file to process it with your plugin.

A simpler approach might jsut be to manually edit the gcode file and insert whatever special pause you want, because that may be a lot easier than finding a way to define that point in a generic way that would allow the plugin to spot it as it parses the code. That said, I'm not sure that the UM2 firmware even supports the pause-and-wait-for-user gcode yet.

 

Share this post


Link to post
Share on other sites

That's not really a plugin as such - just a change to the code. Marlin - the firmware - doesn't have a concept of 'plugins'. And to be honest, yes, it is a surprisingly difficult thing to add to the firmware. I mean conceptually it is simple, but the problem is that there are four queues of data being read by the firmware that need to be kept properly in sync. 1) Text commands coming over USB, 2) Text on the SD Card, 3) Commands read from either of those places waiting to be processed and 4) the list of movements that have already been planned out, and are waiting for the head to make them. Keeping all of those properly in sync when you could potentially jump into the middle of them all and say ' hold on, hold on ... go do this instead, right now... but make sure you can carry on again flawlessly when I tell you to'... well, it's tricky. Not impossible. Just tricky. These were exactly the sort of issues that caused the problems with aborting and/or ending prints gracefully in recent firmwares.

I think that the way Marlin currently architects its queues probably needs to change, in order to make this easier to do. It's a good idea, and a much needed feature, but not easy to do in a robust way, with the current way things work.

 

Share this post


Link to post
Share on other sites

Hello, I see this discussion happened in 2014. Are the plugins still only post-process? I am working on a specialized printing software that will run on a 6 axis robotic arm and need to get directly to the surface normals (to help guide the robotic arm orientation). I also need to have access to the slicing plane orientation so I can print slices at multiple orientations. If the capabilities to make a plugin that can do this exist, can someone please guide me to the internal data-structures and documentation that can get me on the right path? Thank you!

Share this post


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

Announcements

  • Our picks

    • Architect Design Contest | Vehicles.
      We're open for entries! - Design and submit your 3D designs of architectural entourage - vehicles - for a chance to win a large filament pack. Presenting an idea, an architectural design or something as big as an urban project isn't easy. A scaled model can really help to get your idea across.
        • Like
      • 24 replies
    • What The DfAM?
      I'm Steve Cox, an experienced engineer familiar with 3D printing. I wanted to share some DfAM guidelines with this community to help and make stronger parts.
      I'm also an Autodesk Certified Instructor for Fusion 360, so many of the images in ...
        • Thanks
        • Like
      • 23 replies
×

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!