-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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 #4716
Closed
Closed
Exclude Objects #4716
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
89acce7
Exclude Objects
troy-jacobson 7165183
Merge branch 'master' into exclude-object-pr
troy-jacobson b99b45e
Merge branch 'master' into exclude-object-pr
troy-jacobson e132b2c
module: Exclude Objects
troy-jacobson 1fb44d6
Formatting fixes.
troy-jacobson 1132a3f
module: Exclude Objects
troy-jacobson ab2e146
Formatting fixes
troy-jacobson 4dc6609
Preparing for merge
troy-jacobson 90d0a6a
Merge
troy-jacobson fdd8655
feature: Exclude Object
troy-jacobson 4c5e052
feature: Exclude Objects
troy-jacobson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev
Previous commit
feature: Exclude Objects
A final cleanup pass as I hope this feature is getting close to being merged. Documentation update and some other tweaks. Signed-off-by: Troy Jacobson <troy.d.jacobson@gmail.com>
- Loading branch information
commit 4c5e052d46f875a52da18b59f77bba99a1789bbd
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ def __init__(self, config): | |
self.printer.register_event_handler("sdcard:reset_file", | ||
self._reset_file) | ||
self.next_transform = None | ||
self.log_next_moves = 0 | ||
self.objects = {} | ||
self.excluded_objects = [] | ||
self.current_object = None | ||
|
@@ -51,7 +50,7 @@ def __init__(self, config): | |
desc=self.cmd_LIST_EXCLUDED_OBJECTS_help) | ||
def _setup_transform(self): | ||
if not self.next_transform: | ||
tuning_tower = self.printer.lookup_object('tuning_tower', None) | ||
tuning_tower = self.printer.lookup_object('tuning_tower') | ||
if tuning_tower.is_testing(): | ||
logging.info('The ExcludeObject move transform is not being ' | ||
'loaded due to Tuning tower being Active') | ||
|
@@ -78,7 +77,7 @@ def _reset_file(self): | |
self.excluded_objects = [] | ||
self.current_object = None | ||
if self.next_transform: | ||
tuning_tower = self.printer.lookup_object('tuning_tower', None) | ||
tuning_tower = self.printer.lookup_object('tuning_tower') | ||
if tuning_tower.is_testing(): | ||
logging.info('The Exclude Object move transform was not ' | ||
'unregistered because it is not at the head of the ' | ||
|
@@ -106,8 +105,6 @@ def get_position(self): | |
|
||
def _normal_move(self, newpos, speed): | ||
offset = self.extrusion_offsets[self.extruder_idx] | ||
if self.log_next_moves > 0: | ||
self.log_next_moves -= 1 | ||
|
||
self.last_position[:] = newpos | ||
self.last_position_extruded[:] = self.last_position | ||
|
@@ -158,7 +155,6 @@ def _move_into_excluded_region(self, newpos, speed): | |
def _move_from_excluded_region(self, newpos, speed): | ||
self.in_excluded_region = False | ||
offset = self.extrusion_offsets[self.extruder_idx] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dead code? |
||
self.log_next_moves = 10 | ||
|
||
# This adjustment value is used to compensate for any retraction | ||
# differences between the last object printed and excluded one. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,3 @@ pyserial==3.4 | |
greenlet==1.1.2 | ||
Jinja2==2.11.3 | ||
python-can==3.3.4 | ||
markupsafe<2.1 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It's preferable to use
if self.next_transform is None
when checking an external object because the external object could override the truth check.