Giter Site home page Giter Site logo

octoprint-cancelobject's Introduction

Want to support this work? Buy Me a Coffee. https://www.buymeacoffee.com/ppaukstelis

OctoPrint-Cancelobject

This plugin allows the user to interactively cancel objects in gcode based on comment tags added by the slicer. See below for instructions for specific slicers.

New version 0.5.0, 01/2024

  • Parse M486 commands and add necessary @ commands. This circumvents forcing PrusaSlicer to use OctoPrint exclusively in the Label Objects output. There may be issues with other slicers that have not yet been tested.

New version 0.4.2, 07/2020

  • Remove case sensitivity for @Object tags.
  • Improvements to absolute extrusion tracking.
  • Read object information from SuperSlicer object comments to create @Objectinfo tags. This includes object centers so these no longer have to be calculated from extrusion moves. Special note: as of this moment cloned objects will not give unique positions.
  • ; stop printing object comments now generate @Objectstop tags which should improve compatibility with extruder wipes in PrusaSlicer/SuperSlicer

New version 0.3.0, 02/26/2019

  • Gcodeviewer integration. Objects are tagged wtih an orange dot in the Gcodeviewer and can be cancelled directly.
  • Improved tracking of absolute extrusion distances. It is still recommended to use relative extrusion distances in your slicer.
  • See below for tips and notes for using with various slicers.

screenshot screenshot

Configuration

  • The plugin requires the standard Gcode viewer. Do not disable.

Settings

  • By default, active object (current object being queued) is displayed in the NavBar.
  • Gcode (comma delimited) can be injected before or after the server reaches a cancelled object. This may be need for retractions or resetting extrusion distance in some cases.
  • Gcode blocks that contain just functional information, like beginning or ending scripts, can be prevented from appearing in the tab by including them in a comma delimited list in the Ignored Object section. Defaults to STARTGCODE,ENDGCODE
  • If there are Gcode commands in a cancelled object that should not be skipped, these can be included as a comma delimited list.
  • For all slicers, it is recommended to enable relative extrusion in printer settings.

Cura (3.6.0 or greater)

  • Turn combing off! As of right now, Cura writes additional moves after ;MESH tags as part of combing that cause issues.
  • Objects are automatically tagged with the ;MESH:<stl file name> tag.
  • Please note that the way that Cura does supports means that ALL supports are placed into an object called NONMESH. Cancelling an object will not cancel its supports.
  • Do not use stl files that have non-ASCII characters. This will confuse all current versions of Marlin.
  • Is is a good idea to add ;MESH:ENDGCODE at the start of your ending gcode script.

PrusaSlicer/SuperSlicer

  • Enable Label objects in the Output section
  • Object names can be modified in the object list in the right panel. Note, this only works for objects that are imported independently, not on copies/clones of objects.
  • For the end custom GCODE, include at the start: ; printing object ENDGCODE
  • Newer versions of SuperSlicer should use Stop Object Tags option if Z-lift is NOT used.

Slic3r

  • Use the current development build snapshot: https://dl.slic3r.org/dev/
  • Enable Label prints with object ID in the Output section
  • Add ; printing object ENDGCODE to the start of the end gcode in the Custom Gcode section (no spaces after ENDGCODE!)

Simplify3D

  • Create one process for each object or group of models you want to be able to cancel. Assign models to processes.
  • Enable 'Allow zeroing of extrusion distance' setting in Gcode Tab.
  • It is highly recommended to add ; process ENDGCODE at the start of your Ending Script in S3D. Otherwise, if the last object that would be printed has been cancelled this will result in the rest of the ending script being ignored.
  • If you are not using Raise Z on retraction setting you will likely want to include G1 Z.* in the Allowed G-code section of the settings.

Other notes

  • If you upload files directly to your octoprint instance, direct them to the watched directory and not the upload directory. This will make sure that the plugin processes your gocde and substitutes the @Object tag it uses to identify
  • This plugin can only be used when streaming files via USB (no SD card support). If you are looking for SD card support, look into Marlin or RepRap firmware M486 commands.
  • It is designed for use with Marlin and Marlin-flavored firmwares. The behaviour with other firmwares is unknown.
  • Gcodeviewer integration requires that the object has to have had some printing moves before its coordinates are known. Use the Refresh Objects button to update. The exception to this is SuperSlicer which includes object information comments in the gcode that include object centers.
  • Some slicers will place first layer extras (brim, raft, etc.) as part of an object. If this throws off the position of the objects in the gcodeviewer you can use the Reset Objects button.

Setup

Install via the bundled Plugin Manager or manually using this URL:

https://github.com/paukstelis/OctoPrint-Cancelobject/archive/master.zip

octoprint-cancelobject's People

Contributors

bradcfisher avatar gdombiak avatar louispires avatar mirokymac avatar old55 avatar paukstelis avatar paulgd03 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

octoprint-cancelobject's Issues

Plugin tab blank after installation, cryptography error

I have a relatively new octopi install, but have been getting a cryptography error for a lot of plugins:

IT says installed successfully "Successfully installed OctoPrint-Cancelobject-0.1.1" but then says:

"pyopenssl 18.0.0 has requirement cryptography>=2.2.1, but you'll have cryptography 2.1.4 which is incompatible."

and then:

"Done!
Close
Plugin management log
Install Unknown:
A restart is needed for the changes to take effect.

Restart now"

After restart the plugin shows up but the page is blank when the tab is selected. Can provide the full install log, but no other errors...

How to use with Cura ?

Can someone explain how to use this plug-in with Cura, I could not understand how to do it ?

Plugin crashes when printing multicolor with a purge tower

I finally tracked this one down. I'm using PrusaSlicer and diving into MultiColor printing. I then ran into this issue: tomvandeneede/p2pp#54. After a lot of analyzing and narrowing down the issue I got to the root of it.

The purge tower created by PrusaSlicer uses gcode like this:

G1 Y140.344 E1.85090

When this happens, the following error is triggered

2020-01-04 17:20:17,345 - octoprint.util.comm - ERROR - Error while processing hook cancelobject for phase queuing and command G1 Y140.344 E1.85090:
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python3.8/site-packages/octoprint/util/comm.py", line 3333, in _process_command_phase
hook_results = hook(self, phase, command, command_type, gcode, subcode=subcode, tags=tags)
File "/home/pi/oprint/local/lib/python3.8/site-packages/octoprint_cancelobject/init.py", line 480, in check_queue
if e_move[0] > obj["max_x"]:
TypeError: '>' not supported between instances of 'NoneType' and 'float'

There are 2 things that I think could be improved:

  1. Add a try/catch so that any exception in the plugin is trapped and logged. Right now they are not trapped so OctoPrint DOES NOT send the gcode to the printer. This is what was so hard to narrow down what was going on.
  2. Add logic to detect None in X or Y during extrusion movements
  3. Maybe add logic to detect what are purge towers and treat them differently in the plugin

I can create a PR for the first 2 things if that would help. Ignoring purge towers or treat them as another object is more than I can take. :)

Thanks,
Gaston

Can not update to new version.. 0.2.1

Updating...
Updating, please wait.
+++++++++++++++++++++++++++++++++++
Now updating Cancel object to 0.2.1
+++++++++++++++++++++++++++++++++++
/home/pi/oprint/bin/python2 -m pip install https://github.com/you/OctoPrint-Cancelobject/archive/0.2.1.zip --no-cache-dir
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting https://github.com/you/OctoPrint-Cancelobject/archive/0.2.1.zip
HTTP error 404 while getting https://github.com/you/OctoPrint-Cancelobject/archive/0.2.1.zip
Could not install requirement https://github.com/you/OctoPrint-Cancelobject/archive/0.2.1.zip because of error 404 Client Error: Not Found for url: https://github.com/you/OctoPrint-Cancelobject/archive/0.2.1.zip
Could not install requirement https://github.com/you/OctoPrint-Cancelobject/archive/0.2.1.zip because of HTTP error 404 Client Error: Not Found for url: https://github.com/you/OctoPrint-Cancelobject/archive/0.2.1.zip for URL https://github.com/you/OctoPrint-Cancelobject/archive/0.2.1.zip
The update did not finish successfully. Please consult octoprint.log and plugin_softwareupdate_console.log for details.

[Enhancement] Add clustering algorithm to detect different parts

Currently, this plugin only works when the gcode is annotated by the slicer to indicate different parts.
I propose using a clustering algorithm to detect different parts and automatically annotate the gcode before printing.
Here is an example of such a clustering algorithm.
This would require parsing the gcode to acquire a list of 4d points (X,Y,Z,time/index) then running a clustering algorithm to split the points into parts, then annotating the gcode.
I'm going to start trying to split gcode files into points as soon as I get a chance, then I'll share my results.

Not working

Good afternoon. I recentely tested your code but I couldn't make it work. I used Simplify3D to create two dummy pieces in two differente processes, but when I cancelled one of the processes, both of them kept printing.
I'm currentely using OctoPrint 1.3.8 and Simplify3D 4.0.1.
Thank you in advance.
Nicolás Zorzano.

Cancelling object leads to excessive retraction, which causes Klipper to fail the entire print

Note: I tried to bring this up on the Octoprint forum, but despite insisting on me giving "as much information as possible" I was prevented from posting because "new users can only post one image" :( I'm pretty sure it's a bug anyway (I'm a software developer), so here we are.

Problem: Print failed because Klipper detected a "large retraction" after using Cancel Objects

Print suddenly stopped. Klipper reports "Extrude only move too long" and there is an unreasonably massive retraction in the GCode (which isn't in the original GCode file)

What did you already try to solve it?

I tried unsuccessfully to post on the Octoprint forum.

Logs
octoprint.log
plugin_cancelobject_cancelobject.log
serial.log

Problem occurred at 2020-06-18@21:35:00 give or take 1 second

Terminal output leading up to the error is as follows.
image

GCode downloaded from Octoprint.zip

The GCode file (downloaded from Octoprint) does not seem to contain this instruction so it must have been inserted by a plugin. The line numbers don't exactly match but this seems to correspond to line 47375 in the linked GCode file.

Prior to this, I had used "Cancel Objects" to cancel printing two of the objects on the build plate as they had detached from the bed. The nozzle is stopped over the position where one of the detached objects would have been, so I suspect this might be a smoking gun.

In this screen snipping of the Prusa Slicer thumbnail image, I have marked the two cancelled objects in red. The upper one is where the print head stopped, after just finishing the object behind it on the bed.
image

This photo of the print bed shows where the print head stopped, over the blank space where the cancelled object would have been if it handn't been knocked off the bed:
image

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible)

image
image
image

Creality Ender-3 kinematics
BTT SKR Mini E3 mainboard running Klipper firmware

File section

When i install the cancel Objects Plugin the files Section on the left gehts out of shape.
This is how it looks like if i disable the plugin:
Screenshot 2019-06-03 at 14 56 45
And this is how it looks like if i enable it.
Screenshot 2019-06-03 at 13 55 16
I have the Version 0.3.1

new functionality

It would be interesting to implement the function that when a process ends and the next and last one has been canceled it executes the finalization scripts because if it does not feel like this:

https://imgur.com/a/myCYY3N

thanks a lot

Minor NavBar annoyance probably easy to fix

I have the "Show active in NavBar" option unchecked because I have other information shown in the NavBar and adding the object information overflows the NavBar and makes a mess of the page.

That setting almost works as expected, except for one minor issue which occurs when a print ends. There must be a statement to refresh the NavBar with the phrase "Current Object: None" when the print ends, and this shows up in the NavBar regardless of the "Show active in NavBar" setting. This phrase is pretty useless and unfortunately stays there until the page is manually refreshed.

Is there a way this can be removed, as it really has no use, or at least is made to honor the "Show active in NavBar" setting?

S3D Setup Explanation Please

It would be nice to have a write-up or tutorial vid on how to "Create one process for each object or group of models you want to be able to cancel. Assign models to processes" with S3D.

0.1.2

I've begun making changes for 0.1.2. You can test it out by installing from this URL: https://github.com/paukstelis/Octoprint-Cancelobject/archive/0.1.2.zip

Feedback would be appreciated. I'll test it for a little while before pushing it into the master.

Things I've been messing with:

  • Change Allowed GCODE to be regular expressions. Using startswith function was going to be too limiting for some slicers.
  • Style changes for the Tab. Larger name, alternating backgrounds, highlight active object and button position

Layer change skipped

After trying to figure out, why my prints didn't look nice, as soon as I canceled one part, I noticed that layer changes are skipped, if they are within one part. So usually one layer of a part is printed and then the next one is started before it moves to the next part, where the same process is repeated. If I now cancel one part, one layer change is skipped, so the extrusion is squished and then the following is two layers thick.

Any idea how to fix that? Can you avoid removing layer changes?

How to use with Slicer PE?

I'm trying to use this plugin with Slic3r PE, latest beta.

In the GCODE I can see:

; stop printing object AIl_In_One_3D_printer_test_micro.stl id:0 copy 0
;M117 Printing layer 4
;LAYER:4
G1 Z1.100 F7800.000
@Object AIl_In_One_3D_printer_test_micro.stl id:0 copy 0

in cancel object settings, i've set, as suggested in the readme, the following regex:

; process (.*)
;MESH:(.*)
; printing object (.*)

none of these will catch the gcode created by Slic3r PE.
Any hint ?

Slic3r support

Hi
I was wondering if I can add a pull request to slic3r for a better support of your project.
Should i add "; process XXX" or create a more meaningful text, like "; print part XXX". ?

If i modify slic3r to able to add more comments, i have to add (for each layer) a "; print part XXX" at the beginning of each part print and a "; end layer XXX" at the end of the layer?

Thanks.

Update fail

OctoPrint is asking in loop to update Cancelobject. It says it's installing v0.2.1 instead of 0.3.

I'm using OctoPrint 1.3.10
And OctoPi 0.15.1, running on Raspberry Pi 3 Model B Plus Rev 1.3

Update 0.4.0 causes upload fails

Upload failed

(Translated) Could not upload the file. Please make sure, it is a readable valid file with one of the following extensions: .g, .gco, .gcode, .stl, .stl
Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

What did you already try to solve it?
Tried other files, rebooted Pi, Reset Printer

Logs (octoprint.log, serial.log or output on terminal tab at a minimum, browser error console if UI issue ... no logs, no support!)
2020-01-08 10:21:18,916 - octoprint - ERROR - Exception on /api/files/local [POST]
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 1276, in decorated_view
return no_firstrun_access(flask_login.login_required(func))(*args, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 1295, in decorated_view
return func(*args, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask_login.py", line 758, in decorated_view
return func(*args, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/api/files.py", line 361, in uploadGcodeFile
display=canonFilename)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintTimeGenius/init.py", line 546, in new_add_file
return self._file_manager.original_add_file(destination, path, file_object, links, allow_overwrite, printer_profile, None, display)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/init.py", line 493, in add_file
path_in_storage = self._storage(destination).add_file(path, file_object, links=links, printer_profile=printer_profile, allow_overwrite=allow_overwrite, display=display)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 765, in add_file
file_object.save(file_path)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/util.py", line 92, in save
shutil.copyfileobj(source, dest)
File "/usr/lib/python2.7/shutil.py", line 63, in copyfileobj
buf = fsrc.read(length)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/util.py", line 194, in read
processed_line = self.process_line(line)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_cancelobject/init.py", line 37, in process_line
line = self._matchComment(line)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_cancelobject/init.py", line 45, in _matchComment
line = line.decode("utf-8", "strict")
File "/home/pi/oprint/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb0' in position 46: ordinal not in range(128)

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible)
Octoprint: 1.3.12
Printer: Prusa i3 MK3s
Printer Firmware: 3.8.1

See following entry: https://community.octoprint.org/t/solved-uploading-files-failed

No visualization

I installed the plugin but am unable to see the objects displayed. I am generating the GCODEs through a slic3r PE fork which supports the plugin. This way, it is difficult to know which object to cancel when one is faulty since I only have information of which copy is being printed at the time. Is this normal? Is there a way to display the copies on the bed?

doesn't show models

I have s3d 4.1.1 and I do not see any models in the tab. I have tried several times to see if it was just a bad upload, however I never see any objects listed in the cancel tab in octoprint, it just says Object list populated when gcode loads. I see the gcode in the viewer, so it seems to load right.

fix pause at object omission broken

when printing and cancelling object it stops printing for the same amount of time it would take to ahve continued to print it.. the head stays put and just dribbles filament(oozing)

one would assume that when you cancel an object it would not only skip that section of code but not process it as if its live with timings etc..

it should skip over that area almost instantly

this i feel is a bug..

it would be nice to add comparability to gcode viewer and their cancel area options plugin to add a hover to see object name and right click to cancel it.. or a button to let you cancel objects from there.. ( instead of having several places to go . you could even add your table list selector to the bottomof that page if its installed ?

note in gcode viewer editor it shows the layers printing as normal but the printer doesn't do anything.. and removing or disabling the viewer doesn't change the end result of head not moving or doing anything while that section of code is processed.

Canceling object spams gcode

Hey. I added in some gcode that whenever an object gets canceled, it makes the printer raise up by 10mm to avoid hitting any other object that remains on the bed. However, when I go and cancel one object, it seems to continuously spam the gcode I have set, which causes my printer to keep on raising the gantry until it smacks into my frame. I'm running Octoprint 1.3.12 on OctoPi 0.16.0 with the latest version of CancelObjects. Could you please fix this?
This is the gcode here.
image

And this is the terminal showing the spamming
image

[Feature Request] Store settings

A settings preference to store the latest setting of "Toggle Markers" so that it doesn't always default to "On" - it even resets (annoyingly) after every time I switch to another tab and back.

Or perhaps the option

Default Markers Setting
[ ] On 
[ ] Off
[ ] Last Used

Cancelling object stops z movement (using Cura 3.6.0)

I upgraded to Cura 3.6.0 yesterday (it was officially released) and needed to cancel a single object. The plugin now does see the objects from Cura (the good news). However, after I canceled one of the objects, the z axis was no longer triggered, so it kept trying to print at the same height for each layer. TH3D Marlin firmware on an ender 3, octoprint 1.3.9 on octopi 0.15.1.

Cura[3.6.0] order of auto-arranged models

Hey,
I just tried it the first time (after a had to stop a pretty long print because of one small part 😐). And as it turns out it works great! The only thing I had to change inside cura was relative extrusion as someone pointed out already (I guess, haven't tried it otherwise).
My only 'problem' is that I can't really differentiate a lot of (auto arranged) copys of the same stl file. Cura just tags them as "xxx.stl (1)", "xxx.stl (2)". I thought that this would happen in the order of printing, but that's not the case - at least for me.

So is there any easier way of spotting the right (already broken part) to cancle, without having to wait until the "red box" will appear just seconds before the printer is going to crash into it again?

Regards! :)

Canceling Last Object Nullifies Ending Gcode

I love this plugin. But recently, I cancelled the last object on my buildplate (the last object to print on each layer). At the end of the very last layer, the print head stopped on the object before the cancelled one, and froze. Octoprint no longer had any control to move the print head, turn off the heaters, or stop the print. I had to do all these things using the LCD control on my printer. But the hot end was left on for a couple of hours right on my PETG object at 240C. I guess by cancelling the last object, Octoprint never got to run the ending gcode.

MakerGear M3-ID not connecting

With the plugin loaded and active, Octoprint is not able to connect successfully to my printer - state hangs at "connecting".

If plugin is disabled or uninstalled, connection works normally.

MakerGear M3-ID, connecting via local IP address
Octoprint v 1.3.6

Extrusion issue after cancelling

Hey there,

the last 2 days I was trying to get this plugin to work. The setup isn't a problem. But, if you cancel an object during the print, all other objects will be overextruded from that moment on. It doesn't matter how many object there are.

Picture:
https://abload.de/img/img_0126jbk2k.jpg

My Setup:
DIY Printer with E3D V6 + Bondtech Bowden setup.
Simplify3D 4.0
Octoprint 1.3.10
Marlin (near current version)
45mm/s, 0,2mm layer, individual identical processes

I already tried absolute and relative extrusion.

Would be happy for any help. Thanks a lot for your great work!

Nozzle sits/oozes on current object until next object cancels

Hi,

The issue I am having is that when I cancel an object, the nozzle just sits on the part it was printing, and then the progress bar slowly moves up until Octoprint figures out where to start printing next. If I have many objects remaining, and cancel them all, then this takes a very long time with lots of oozing.

I am using S3D, and I have followed your setup guide, I am using relative extrusion. The only thing I have not tried is to place G1 Z.* in the allowed GCODE, which I will try.

When you hover over the i icon in the octoprint settings for Allowed GCODE, these commands pop up: G1 Z.* , G0 F/d + Z, M104, M109, M240

Could you explain what each of the commands you have suggested will do when cancelling an object? As in what would the expected behaviour be? Wouldn't the temperature commands be taken from the next object? Why would you need those commands from the cancelled object?

My solution would be to put:

Before skip GCODE: G91, G1 Z10 E-2 F3000

After skip GCODE: G1 Z-10 E2.5 F3000, G90

This would put it into relative extrusion mode, raise the nozzle by 10mm, retract 2mm of filament, then cancel the object, then undo these changes plus an extra 0.5mm prime of the nozzle, and put it back into absolute mode, all while octoprint advances the progress bar to the next part. I looked through my GCODE file that is configured for relative extrusion, and I expected the moves to be done with a G91 at the start of the script, but there is a single G90, so when we check the box for relative extrusion, does G90 still apply? I tried this, but everything just hung up but the progress bar was still moving at a very slow pace, and when I opened up the settings the After skip GCODE's were gone.

What do you think about this remedy? I am not sure if there should be a G91 in the before skip or G90 in the after skip GCODE's. Do you need a comma after the last GCODE command in these blocks?

This is a great feature! Good work.

DroneMang

Cannot run on RPi Zero

I would like to note that I failed to have it running on RPi Zero, and this should maybe be mentioned in the description. Quite possibly, it is not powerful enough for this plugin.
I get an error usually around 5 minutes into the print such as this:

Error:Line Number is not Last Line Number+1, Last Line: 203 Resend: 204

Immediately after uninstalling the plugin, my prints began to succeed again.

Canceling first model freezes print

If I cancel the first model in the list, then at the beginning of the next layer, the printer freezes. The head doesn't move, and the heaters stay on.

This may be a conflict with Octolapse, which takes control of the printer at the beginning of each layer, to move the head out of the way, for a snapshot.

Upload to octoprint "watched" directory?

"If you upload files directly to your octoprint instance, direct them to the watched directory and not the upload directory."

How exactly is this done?? I can't find any information about how to direct all uploads to the Watched DIR in octoprint... I can see that a DIR named "Watched" exists, but I can't figure out how I'm suppose to get my files to upload to there when I hit "Print with Octoprint" in CURA 4.0

[question] what specifically does this plugin look for?

what exactly does this look for.
the reason i ask is slic3r prusa edition does support injecting code between objects
its in gcode scripts, and is called "Between objects G-code (for sequential printing)"
now i use sequential printing. so im wondering what is specifically needed here. for this to work

[Request] Toggle orange circle in gcode viewer

Hello, I really like that you added the orange circle over objects in the gcode viewer but sometimes, I want to hide it, for example, if there is a detail under it I want to see. It would be great could you add something like a "toggle current object marker" button somewhere in the gcode viewer.

Duet web control

Hi, would you write this for DWC? It is the only missing feature on the DWC

Cancel Objects and Arc Welder don't play nice

I'm not entirely sure what's happening, but I'm using SuperSlicer, with the object labeling turned on, and the Arc Welder Octoprint plugin:

Cancel objects correctly recognizes the objects in the original GCode file, but not the arcwelder-ized version ("Object list populated when GCODE file is loaded", even though I HAVE loaded the gcode)

As near as I can tell, the object labeling is still present in the arcwelder version, so I'm unsure what's actually causing the issue. I've attached a sample with both the
original file, and the arcwelder version. arcwelder version is the .aw.gcode

demo_gcode.zip

Canceling objects affects the print quality of nearest/next part.

I am using PrusaSlicer v2.2.0, on a Prusa MK3S, via OctoPrint 1.4.0 running on OctoPi 0.17.0, and using version 0.4.1.

( I have also enabled "Label objects" and added "; printing object ENDGCODE " to the start of the custom "G-Code" section).

After canceling an object, the print quality of the remaining part(s), typically the nearest part (or the part after the skipped part), is significantly impacted. I am not sure if it has to do with the z-hop or proper retractions while skipping the canceled object. But where the next object picks up after a skipped object there is a lot of extra material like oozing and stringing (typically nearest the closest point to the cancelled object and the next part starts).

(Not sure if this is a slicer issue, a plugin issue, or a setup issue.)

Severe Issue: End G-code not run and Octoprint must be rebooted after print.

This issue is repeatable. If I cancel the last object (haven't tested cancelling other objects). When the print is complete the end G-code is not run and the printer's nozzle and bed temperatures are left high while the nozzle is directly in contact with the top of the printed part.

Also I have to then reboot the OctoPrint system to get back control of the printer from OctoPrint (even though it seems I can connect and disconnect, the controls don't work).

OctoPrint/Pi versions: OctoPrint 1.4.0 running on OctoPi 0.17.0

I am using PrusaSlicer v2.2.0. (printing with a Prusa MK3S). I have followed all the directions on the GitHub main page:

  1. Enable Label objects in the Output section
  2. Added "; printing object ENDGCODE " at the very start of the custom "End G-code" field (after this is where the nozzle and bed are turned off, the nozzle is raised etc - which is never executed.).

I have not canceled the object "ENDGCODE" that appears in the cancel object list.

Canceling Supports

Not sure if this is a possibility, but it appears the Cancel Object only cancels the object and not the support(s) as well; The supports layer appears as "NONMESH" and may be inseparable object to object.

I canceled an object and it still keeps printing the support.

Sticky Processes in Cancel Objects Tab

Thank you paukstelis for a great plugin.

I have no issues with the plugin, only a suggestion, example:
When I've uploaded a gcode to octoprint to print but decided not to print it and delete it straight away (before clicking on print), the different processes of that gcode file stays in the Cancel Objects Tab and doesn't go away when you delete the gcode file. Even a reboot or F5 doesn't remove it. Only when I load another gcode to be printed that previous processes go away. It will be nice if the processes go away same time as when delete gcode before print. It is not an issue for me, just a suggestion to you (I know you are a very busy guy). BTW I'm running OctoPrint 1.3.8 running on OctoPi 0.14.0 with Cancel Objects (0.1.1)

Thank you

Windows scaling causes problems selecting objects

Hi, I noticed this on a print containing 72 copies of a small object. (image attached)

I clicked the centre object; it was the first to print and had not adhered to the bed properly. Immediately a 'cancel object' box popped up, and I confirmed. The object up and left from my chosen object greyed out, and the printer skipped this object in subsequent layers.

I was only able to cancel my intended object by clicking down and to the right from its actual location, which leads me to think there's some problem with the way the plugin is inferring the object from the click location.

CancelObjects

I'm running OctoPrint 1.3.10 on a Raspberry Pi using OctoPi.

Expose objects via API

Hi,

I'm the developer of OctoPod (free open source iPhone app for OctoPrint), and I would like to expose your plugin in the app. I was looking at the source code and I see an API call for cancelling an object. Maybe I missed it, but I do not think I saw an API for retrieving the list of objects.

This issue is for adding this new API. I will then add your plugin to OctoPod. :)

Great job
Gaston

after update 0.4.0 upload from Prusa Slicer error

When I try to send gcode to Octoprint from Prusa Slicer, I get the message:

Error sending to print server:
HTTP 500: <! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 3.2 Final // EN">
<title> 500 Internal Server Error </title>
<h1> Internal Server Error </h1>
<p> The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. </p>

log from octoprint:

2020-01-11 19:55:12,297 - octoprint - ERROR - Exception on /api/files/local [POST]
Traceback (most recent call last):
  File "/home/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 1276, in decorated_view
    return no_firstrun_access(flask_login.login_required(func))(*args, **kwargs)
  File "/home/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 1295, in decorated_view
    return func(*args, **kwargs)
  File "/home/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/Flask_Login-0.2.11-py2.7.egg/flask_login.py", line 758, in decorated_view
    return func(*args, **kwargs)
  File "/home/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/octoprint/server/api/files.py", line 361, in uploadGcodeFile
    display=canonFilename)
  File "/home/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/octoprint/filemanager/__init__.py", line 493, in add_file
    path_in_storage = self._storage(destination).add_file(path, file_object, links=links, printer_profile=printer_profile, allow_overwrite=allow_overwrite, display=display)
  File "/home/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 765, in add_file
    file_object.save(file_path)
  File "/home/octoprint/OctoPrint/venv/local/lib/python2.7/site-packages/octoprint/filemanager/util.py", line 92, in save
    shutil.copyfileobj(source, dest)
  File "/usr/lib/python2.7/shutil.py", line 52, in copyfileobj
    fdst.write(buf)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0142' in position 479: ordinal not in range(128)
2020-01-11 19:55:12,301 - tornado.access - ERROR - 500 POST /api/files/local (192.168.1.221) 249.60ms

Octoprint: 1.3.12
Prusa Slicer 2.1.1 linux64

After disabling the plugin "Cancel Objects 0.4.0", Octoprint works normally.

Bigger job just stops at some point

Have been playing around with the plugin for a bit and now have the problem that the print just stops at some point after canceling an object. Currently have no idea what the reason might be. This already happened twice yesterday on a job where I canceled a part after a while and today also already twice again on two other jobs after canceling. Added the LOG and the GCODE for debugging:
octoprint (6).log
puzzle2.txt

Latest commit causes 500 internal server error

I have just upgraded to the latest version as OctoPrint reminded me it was available however since then I cannot upload files to the server. Disabling the plugin fixes my issue and the exception seems to be related to code changes in the latest commit. I am sending files via the API from PurusaSlicer 2.1.1 and via dragging files in the web interface. Here is one file I have tried, but it fails on at least 3 different files (everything I have tried to send since the update)

bit.gcode.zip

Here is the log file entry

2020-01-17 06:24:20,542 - octoprint - ERROR - Exception on /api/files/local [POST]
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 1276, in decorated_view
    return no_firstrun_access(flask_login.login_required(func))(*args, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 1295, in decorated_view
    return func(*args, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/flask_login.py", line 758, in decorated_view
    return func(*args, **kwargs)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/api/files.py", line 361, in uploadGcodeFile
    display=canonFilename)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_PrintTimeGenius/__init__.py", line 546, in new_add_file
    return self._file_manager.original_add_file(destination, path, file_object, links, allow_overwrite, printer_profile, None, display)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/__init__.py", line 493, in add_file
    path_in_storage = self._storage(destination).add_file(path, file_object, links=links, printer_profile=printer_profile, allow_overwrite=allow_overwrite, display=display)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 765, in add_file
    file_object.save(file_path)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/util.py", line 92, in save
    shutil.copyfileobj(source, dest)
  File "/usr/lib/python2.7/shutil.py", line 49, in copyfileobj
    buf = fsrc.read(length)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/util.py", line 194, in read
    processed_line = self.process_line(line)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_cancelobject/__init__.py", line 37, in process_line
    line = self._matchComment(line)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_cancelobject/__init__.py", line 45, in _matchComment
    line = line.decode("utf-8", "strict")
  File "/home/pi/oprint/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u010d' in position 200: ordinal not in range(128)
2020-01-17 06:24:20,554 - tornado.access - ERROR - 500 POST /api/files/local (2a00:23c6:a12b:1d01:f802:b563:2dab:f82f) 5653.48ms

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.