Jump to content
  • 0

Region Exclude for Mainsail/Klipper?


Buurman
 Share

Question

More of a Klipper/Mainsail  question than slicer, but hope its ok here....

I am really missing the Region Exclude plugin from Octoprint in Mainsail, they have a nice Gcode preview, but no way to exclude something there.

This is of course very usefull with a full plate where one item fails (comes from plate, etc) so you can exclude it, and print can continue without printing filament in the air...and making a mess... maybe even failing everything.

There is this dude here saying he is using in in beta and should be released, still cannot find it, not in release notes, anything.
Is this guy full of bullshit, or am I just a freaking idiot and looking in the wrong places 😛 hahaha!

Hope someone can help!

 

Link to comment
Share on other sites

Recommended Posts

  • 0

Got it working, and looks/works much better than I hoped! needs a bit more rugged testing, but it seems pretty good!

  • Run this indeed in Putty/terminal, make sure it runs and restarts klipper, first time it threw an error for me (credentials):
sudo service klipper stop
cd ~/klipper
git remote add troy https://github.com/troy-jacobson/klipper.git
git fetch troy
git checkout troy/exclude-object-pr
sudo service klipper start

NO NEED TO ADD MACRO's (this information is incorrect/old on DISCORD)

  • ADD this to your PRINTER.CFG:
#####################################################################
#   Exclude Objects
#####################################################################
[exclude_object]
  • Add the executable to you superslices folder (where the executable is), download here - CLICK THE Latest Release on the right!
https://github.com/kageurufu/preprocess_cancellation
  • Add this to your Superslicer PRINT SETTINGS (tab) - Post Processing scripts:
preprocess_cancellation.exe;

Now, after slicing, a extra proces runs and enables the exclusion per object in Mainsail (probably also fluid).

It only becomes visable when a print started in your PAUSE/CANCEL tab.

image.png.248fcecbcb70c2b70dac2dd7a5c5c77f.png

Now you see the new ICON for Object Exclusion, feel free to click it, its needs selection and confirmation:

image.png.1406b8e9d17f9f99f24fb0e7fade8a8e.png

 

image.png.836f06f7cd20293e136d6677d71908e0.png

DONE.

 

Thanks @mvdveer coudnt have gotten it working without you!

 

  • Thanks 1
Link to comment
Share on other sites

  • 0

From what I understand that feature is under development for Klipper. I'm not sure how far away it is and I haven't pursued it. Sounds like a nice feature, and I probably could have used it a couple of times but the lack hasn't been enough of a big deal for me to go looking. I do run Octoprint for my Prusa Mini and I think I even have that plugin loaded, I just haven't ever used it.

 

Link to comment
Share on other sites

  • 0

https://github.com/kageurufu/cancelobject-preprocessor

I think this is whats in the works, and should work, but it can be me, I cant seem to figure out how to deploy it.
They mention binary to download, and a .exe file preprocess_cancellation.exe

Cant seem to figure out where to download this. If someone else can, please educate me, stupid Github can be so annoying...

Link to comment
Share on other sites

  • 0
17 hours ago, Buurman said:

https://github.com/kageurufu/cancelobject-preprocessor

I think this is whats in the works, and should work, but it can be me, I cant seem to figure out how to deploy it.
They mention binary to download, and a .exe file preprocess_cancellation.exe

Cant seem to figure out where to download this. If someone else can, please educate me, stupid Github can be so annoying...

Binaries are here;

https://github.com/kageurufu/cancelobject-preprocessor/releases/tag/0.1.7

 

Took me a while to realise that the files are listed to the right of the directory frame.

Here you will see: Releases 2 and underneath that0.1.7 latest. Click on the latest and it will open the above link

Meindert

image.thumb.png.24fd870008982234e4a73429f13dea2b.png

  • Thanks 1
Link to comment
Share on other sites

  • 0
33 minutes ago, Buurman said:

Thanks, I totally missed that, or ... its not super obvious if you dont know 😉 

Learned something!! thanks!

Join the club - not super obvious. Github not as bad as Discord though - still can't get my head around that one

Link to comment
Share on other sites

  • 0
2 hours ago, mvdveer said:

Join the club - not super obvious. Github not as bad as Discord though - still can't get my head around that one

Yeah, Discord to me is just a wild search engine, cant follow anything there, just good for a search ones in a while...

Edited by Buurman
Link to comment
Share on other sites

  • 0
8 hours ago, Buurman said:

How do I use it in Mainsail? before I start cancelling things I dont want to cancel 😛  

I assume there are two ways: 

1. If you want to exclude multiple objects on the build plate you will need to define the area to exclude and then issue the following command:

EXCLUDE_OBJECT_DEFINE NAME=<object name> [CENTER=x,y] [POLYGON=[[x,y],...]]

2. If you only want to exclude a single object I thing you will issue this command. It will mean that object names would have to be unique and these need to be defined in super slicer: 

EXCLUDE_OBJECT_START NAME=<object name> and EXCLUDE_OBJECT_END [NAME=<object name>]

These commands will need to be issued through terminal, unless you define a macro for this.

Will download and install and play around with it

 

 

Link to comment
Share on other sites

  • 0

Get a lot of these now during printing, but I need to test, there are copies of objects there and superslicer doesnt uniquely renames them.

After my print I will try with two objects and see if it works better, I get the feeling it doesnt work at the moment...

 

image.png.d452a9a108ccc0aa5828920730efd538.png

Link to comment
Share on other sites

  • 0
19 minutes ago, Buurman said:

Get a lot of these now during printing, but I need to test, there are copies of objects there and superslicer doesnt uniquely renames them.

After my print I will try with two objects and see if it works better, I get the feeling it doesnt work at the moment...

image.png.d452a9a108ccc0aa5828920730efd538.png

Will install later this week and run some tests. Will let you know how I go. Currently printing parts in Polycarbonate-ABS for my voron 2.4r2 build, so printers are tied up. (Voron 0 for accent parts and VZBot for main parts). 

Link to comment
Share on other sites

  • 0

Found on Discord that you need these macros, will try it after this print...

 

 

## exclude object macros
[gcode_macro DEFINE_OBJECT]
gcode: EXCLUDE_OBJECT_DEFINE {rawparams}

[gcode_macro START_CURRENT_OBJECT]
gcode: EXCLUDE_OBJECT_START NAME={params.NAME}

[gcode_macro END_CURRENT_OBJECT]
gcode: EXCLUDE_OBJECT_END {% if params.NAME %}NAME={params.NAME}{% endif %}

[gcode_macro LIST_OBJECTS]
gcode: EXCLUDE_OBJECT_DEFINE

[gcode_macro LIST_EXCLUDED_OBJECTS]
gcode: EXCLUDE_OBJECT

[gcode_macro REMOVE_ALL_EXCLUDED]
gcode: EXCLUDE_OBJECT RESET=1

 

Link to comment
Share on other sites

  • 0

Just posting here what I found on Discord, in case I can never find it again.
I am not sure if its useful information, but it may make some difference I think...

did you pull the other branch or are you still on the TroyJ branch?

sudo service klipper stop
git remote add kageurufu https://github.com/kageurufu/klipper.git
git fetch troy
git checkout kageurufu/exclude-object-pr
sudo service klipper start

Someone else responding:

"if you switch to kage's branch, then my understanding is you don't need the macro definitions"

Link to comment
Share on other sites

  • 0
15 minutes ago, Buurman said:

Just posting here what I found on Discord, in case I can never find it again.
I am not sure if its useful information, but it may make some difference I think...

Thanks, busy browsing discord now.

Also says at the end of the above:

then you have to add [exclude_object] in your printer.cfg to aktivate this module in klipper.

Trying to find out how

 

Link to comment
Share on other sites

  • 0

 

meteyou — 11/28/2021 (From Discord)


sudo service klipper stop
cd ~/klipper
git remote add troy https://github.com/troy-jacobson/klipper.git
git fetch troy
git checkout troy/exclude-object-pr
sudo service klipper start

then you have to add [exclude_object] in your printer.cfg to aktivate this module in klipper.

 

Link to comment
Share on other sites

  • 0
8 hours ago, Buurman said:

Got it working, and looks/works much better than I hoped! needs a bit more rugged testing, but it seems pretty good!

  • Run this indeed in Putty/terminal, make sure it runs and restarts klipper, first time it threw an error for me (credentials):
sudo service klipper stop
cd ~/klipper
git remote add troy https://github.com/troy-jacobson/klipper.git
git fetch troy
git checkout troy/exclude-object-pr
sudo service klipper start

NO NEED TO ADD MACRO's (this information is incorrect/old on DISCORD)

  • ADD this to your PRINTER.CFG:
#####################################################################
#   Exclude Objects
#####################################################################
[exclude_object]
  • Add the executable to you superslices folder (where the executable is), download here:
https://github.com/kageurufu/cancelobject-preprocessor/releases/tag/0.1.7
  • Add this to your Superslicer PRINT SETTINGS (tab) - Post Processing scripts:
preprocess_cancellation.exe;

Now, after slicing, a extra proces runs and enables the exclusion per object in Mainsail (probably also fluid).

It only becomes visable when a print started in your PAUSE/CANCEL tab.

image.png.248fcecbcb70c2b70dac2dd7a5c5c77f.png

Now you see the new ICON for Object Exclusion, feel free to click it, its needs selection and confirmation:

image.png.1406b8e9d17f9f99f24fb0e7fade8a8e.png

image.png.836f06f7cd20293e136d6677d71908e0.png

DONE.

Thanks @mvdveer coudnt have gotten it working without you!

No thanks necessary @buurman. Happy to have contributed. Glad you got it up and running. And thank you for the detailed "how to". Will make life more easy for others. What this group is all about. Till next time

Link to comment
Share on other sites

  • 0
On 5/27/2022 at 11:05 PM, claudermilk said:

From what I understand that feature is under development for Klipper. I'm not sure how far away it is and I haven't pursued it. Sounds like a nice feature, and I probably could have used it a couple of times but the lack hasn't been enough of a big deal for me to go looking. I do run Octoprint for my Prusa Mini and I think I even have that plugin loaded, I just haven't ever used it.

 

Following all the links to the various GitHub forks, it seems work on this has stopped about 7months ago. May be wrong, just how I read it:

https://github.com/Klipper3d/klipper/pull/4716

https://github.com/mainsail-crew/mainsail/pull/362

 

Link to comment
Share on other sites

  • 0
16 hours ago, mvdveer said:

Following all the links to the various GitHub forks, it seems work on this has stopped about 7months ago. May be wrong, just how I read it:

https://github.com/Klipper3d/klipper/pull/4716

https://github.com/mainsail-crew/mainsail/pull/362

Huh, looks like 0.2.0 got some work last month. Seems like it's far from ready for prime time though.

  • Like 1
Link to comment
Share on other sites

  • 0
5 hours ago, claudermilk said:

Huh, looks like 0.2.0 got some work last month. Seems like it's far from ready for prime time though.

Yet, it seems to work perfectly for me..... saved me a few times already...

  • Thanks 1
Link to comment
Share on other sites

  • 0

Anyone installed on OSX 12.4. Getting a post processing error: File not found:

Post-processing script preprocess_cancellation on file /var/folders/bp/0s507k5n4jv1819rhb8rljn00000gn/T/.SuperSlicer.upload.112d-4b02-de7e-b708 failed.
Error code: 127
Output:
/bin/bash: preprocess_cancellation: command not found

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...