How to port a postprocessor to new cura

Discussion of Ultimaker's open-source Cura software
User avatar
drayson
Reactions:
Posts: 254
Joined: February 15th, 2016, 5:04 am
Location: Graz, Austria
3D Printer(s): UMO with mods :-)

How to port a postprocessor to new cura

Post by drayson »

Hi guys,

I use the ShowLayer-plugin from discoStu a lot as it gives a great view how far the print is.
https://github.com/DiscoStuLikesDiscoMu ... owLayer.py
As the architecture has been changed from 15.04 to 2.1, those old plugins are not working any more (when try to load it, the postprocessor plugin freezes).

Does anybody of you have an idea how difficult it is to port those plugins or even has some kind of tutorial??
User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: How to port a postprocessor to new cura

Post by Amedee »

I actually have written the same plugin and looked to port it to new Cura, but I had no time so far...
So if you have a bit of patience, I'll issue a version...

And BTW, I have an Octoprint plugin (published in the official Octoprint plugin repo) which displays the message line in Octoprint, so you can see it as well on the web interface.
User avatar
drayson
Reactions:
Posts: 254
Joined: February 15th, 2016, 5:04 am
Location: Graz, Austria
3D Printer(s): UMO with mods :-)

Re: How to port a postprocessor to new cura

Post by drayson »

:-) you're great, dude :-)
Unfortunately I don´t use octoprint so thank you for your involvement and support

Keep me informed if I could assist !
nallath
Reactions:
Posts: 267
Joined: February 16th, 2016, 3:12 am
3D Printer(s): Ultimaker

Re: How to port a postprocessor to new cura

Post by nallath »

They are completely different. There was no way do it in such a way that we could keep plugin/script implementation the same.

Actually writing the plugin so that it works for post processing shouldn't be that hard though.
User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: How to port a postprocessor to new cura

Post by Amedee »

User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: How to port a postprocessor to new cura

Post by Amedee »

Forgot to say, there is apparently a bug in Cura, the announced number of layers does not match; in my tests it was overstated by a handful... (E.g. I had 200 layers, but Cura announced 204...).
In Legacy Cura it usually matches.
Technically I could count them myself, but that would require parsing the G-Code 2 times which is not very efficient, so for now I leave it as such.

There is a more annoying thing, Cura doesn't seem to remember your scripts state, so you have to re-select it each time (which I tend to forget), and to make sure you are fully awake it seems to display the scripts is a random order :roll:
User avatar
drayson
Reactions:
Posts: 254
Joined: February 15th, 2016, 5:04 am
Location: Graz, Austria
3D Printer(s): UMO with mods :-)

Re: How to port a postprocessor to new cura

Post by drayson »

Great! Thanky ou very much for your work. I will give it a try a.s.a.p.

Regarding the "layer count/script features" maybe Nallath could have a look. Do we have the possibility to report such issues?
nallath
Reactions:
Posts: 267
Joined: February 16th, 2016, 3:12 am
3D Printer(s): Ultimaker

Re: How to port a postprocessor to new cura

Post by nallath »

Reporting it is always a good idea. If you have issues, report them on github. I'm the only Cura dev that reads this forum (and i'm very prone to forget things)
User avatar
drayson
Reactions:
Posts: 254
Joined: February 15th, 2016, 5:04 am
Location: Graz, Austria
3D Printer(s): UMO with mods :-)

Re: How to port a postprocessor to new cura

Post by drayson »

Amedee wrote:Here you go!
Just for your information: I tired it today but unfortunately the whole postprocessor plugin freezed/was not able to start. :-(
User avatar
martin-bienz
Reactions:
Posts: 172
Joined: February 22nd, 2016, 2:42 am
Location: Switzerland
3D Printer(s): Ultimaker Original, prusa i3 mk2

Re: How to port a postprocessor to new cura

Post by martin-bienz »

Capture.PNG
I tried just now, it worked. I also checked the generated gcode, I can see the M117s per layer.

I put the file in here (on Windows):
%prg%\Cura 2.1\plugins\PostProcessingPlugin\scripts

This is correct right?
User avatar
drayson
Reactions:
Posts: 254
Joined: February 15th, 2016, 5:04 am
Location: Graz, Austria
3D Printer(s): UMO with mods :-)

Re: How to port a postprocessor to new cura

Post by drayson »

yes, that´s the way I did... strange... which cura-version do you have installed 2.1 or 2.1.1? don´t know if there is a big difference, but maybe...

Checked again, with new download, copy/paste... same behavior...
User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: How to port a postprocessor to new cura

Post by Amedee »

drayson wrote:Just for your information: I tired it today but unfortunately the whole postprocessor plugin freezed/was not able to start. :-(
I think your Cura is cursed :oops:
Nothing works for you... :evil:

I haven't got the time to try it under Linux, it is still on my todo list...
martin-bienz wrote: I put the file in here (on Windows):
%prg%\Cura 2.1\plugins\PostProcessingPlugin\scripts

This is correct right?
I am not the right guy to answer Windows question, but yes, it needs to be there -- which also means that you need to be careful when you do upgrades.

It would be nice if the PostProcessingPlugin would look for scripts in a user directory, but at this point in time it does not, so you have to put it there.
User avatar
drayson
Reactions:
Posts: 254
Joined: February 15th, 2016, 5:04 am
Location: Graz, Austria
3D Printer(s): UMO with mods :-)

Re: How to port a postprocessor to new cura

Post by drayson »

Amedee wrote:
drayson wrote:Just for your information: I tired it today but unfortunately the whole postprocessor plugin freezed/was not able to start. :-(
I think your Cura is cursed :oops:
Nothing works for you... :evil:
seems so :lol:
sorry, don´t want to beg you with my weired environment, but I´m happy that you offered your assistance at the beginning.
I´m sure, I will find a way to get it work :-)

edit:
b.t.w. just did a short test:
starting cura post processor without ShowLayer.py... woring
placing the ShowLayer.py in the folder and starting cura postprocessor... freezed
deleted ShowLayer.py and starting cura postprocessor... working...
deleted BQ....py postprocessor and placed ShowLayer.py in the script folder - starting postprocessor... everything working...
Strange...

edit2:
recovered the BQ...py from trash bin to the script folder... working...
very strange...
User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: How to port a postprocessor to new cura

Post by Amedee »

There is nothing weird in using Linux, i am using it all day :-P

The only thing is that all my Debian boxes are 32bits and my 64 bits are not Debian or are servers without graphic environment :roll:

I am installing a 64 bits Debian VM to test an I'll let you know.
User avatar
Amedee
Reactions:
Posts: 599
Joined: February 15th, 2016, 11:10 am
Location: Brussels, Belgium
3D Printer(s): UMO / UMO+
Contact:

Re: How to port a postprocessor to new cura

Post by Amedee »

So it works...
PostProcessing Plugin
PostProcessing Plugin

... But there is a problem somewhere with this Linux build.

At first I could not get it running: as soon as I opened an STL file, Cura would just freeze, with almost no system activity. So I decided to trace it to see where the problem was, but then it ran.
Tried again without trace: still works!

So now I can't reproduce the problem anymore -- probably a race condition, but difficult to instigate :roll:

Bottom line, problem is not in my code :lol:

BTW, the printer profiles are working as well
Machines
Machines
Post Reply

Return to “Cura”