-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude Objects (Superscedes #4716) #5413
Conversation
Signed-off-by: Troy Jacobson <[email protected]> Co-authored-by: Franklyn Tackitt <[email protected]>
Signed-off-by: Troy Jacobson <[email protected]> Co-authored-by: Franklyn Tackitt <[email protected]>
Adding Klipper functionality to support cancelling objects while printing. This module keeps track of motion in and out of objects and adjusts movements as needed. It also tracks object status and provides that to clients. The Klipper module is relatively simple, and only provides one piece of the workflow. Moonraker already supports processing uploaded files to insert the required gcode markers for cancelling objects, using https://github.com/kageurufu/cancelobject-preprocessor. This library is also available as an executable for use in slicers, and pip installations also include the script as a callable. Mainsail has integrated support, and code changes for Fluidd are available. Support in other interfaces is planned, and we've spoken to several other developers about integrating frontend support in their projects. Signed-off-by: Troy Jacobson <[email protected]> Co-authored-by: Franklyn Tackitt <[email protected]> Co-authored-by: Eric Callahan <[email protected]>
Also include sample macros to add M486 compatibility. Signed-off-by: Franklyn Tackitt <[email protected]> Co-authored-by: Troy Jacobson <[email protected]>
I've been running this for a couple of weeks now. seems to work quite well. is there any update regarding delivering this to the master repo? @Arksine @kageurufu |
Has worked really well for me also. Be nice to know when it might be included in to Klipper. |
This has also been working very well for me. I would also like to see it merged soon so I can get back to mainline. |
Another +1 from me for seemingly stable working. Would love to see a review on this from @KevinOConnor and get it into main! This is one of those killer features for big bed batch printers. Great work |
+1 been using it for months now.. let's get it merged? :) |
+1 please merge soon . this is needed like yesterday . |
+1 please merge soon . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some minor issues that I do not believe would functionally impair the module, overall the implementation looks good to me. We could correct these after the merging, however I will leave that up to Kevin. I would be willing to submit a PR to do so at his request.
### Object Definitions | ||
|
||
The `EXCLUDE_OBJECT_DEFINE` command is used to provide a summary of each object | ||
in the gcode file to be printed. Provides a summary of an object in the file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Provides a summary of an object in the file" appears to be stale documentation.
if not any(obj["name"] == name for obj in self.objects): | ||
self._add_object_definition({"name": name}) | ||
self.current_object = name | ||
self.was_excluded_at_start = self._test_in_excluded_region() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stale attribute? It doesn't appear that was_excluded_at_start
is accessed in the module.
" currently active") | ||
return | ||
name = gcmd.get('NAME', default=None) | ||
if name != None and name.upper() != self.current_object: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally identity should be used when testing for a NoneType
, ie:
if self.current_object is None and self.next_transform:
gcmd.respond_info("EXCLUDE_OBJECT_END called, but no object is"
" currently active")
return
if name is not None and name.upper() != self.current_object:
# rest of code
if center != None: | ||
obj['center'] = json.loads('[%s]' % center) | ||
|
||
if polygon != None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The center
and polygon
conditions should test for identity.
Thanks. Looks good to me. I agree minor changes should just be made after merging. It's been a few weeks since this was submitted so I'd like confirmation from @kageurufu that everything is still good for committing and then I will commit. -Kevin |
@KevinOConnor It's still working great on my machine, and a few others I know. I think we're good! |
Thanks! -Kevin |
Woohoo!! |
think its missing something console shows |
The gcode commands changed. You will need to make sure you are using a file processed by |
thanks . got you something . check discord . |
Just curious, what is the use case for this feature? Is it that the user wants to slice a whole bunch of items and just select at print time which ones to actually print? Is it that midway through printing a plate of parts, some parts fail, so this lets you cancel the failed part (preventing collateral damage and filament waste)? (It would be nice if the documentation gave hints when you would want to do this, as it potentially allows new workflows that people aren't aware of.) |
This is the primary use case as far as I'm concerned. |
module: Exclude Objects
Adding Klipper functionality to support cancelling objects while printing.
This module keeps track of motion in and out of objects and adjusts movements as needed. It also
tracks object status and provides that to clients.
The Klipper module is relatively simple, and only provides one piece of the workflow. Support from Moonraker is underway to pre-process gcode files from various slicers with the extended gcode commands supplied by this module. UI's such as Fluidd and Mainsail will provide the user facing controls.
There has been a small group sharing code. In addition to the Moonraker work, I have Fluidd code that will be submitted shortly. Mainsail support is also underway.
Signed-off-by: Troy Jacobson [email protected]
Co-authored-by: Franklyn [email protected]
Co-authored-by: Eric Callahan [email protected]
This PR superscedes #4716, has the requested changes from the prior PR, and fixes the failing test. Troy is currently busy, so I'm opening a new PR to push things along