Conversation
|
Thanks for working on this. It is an interesting feature and has been requested multiple times. |
dalegaard
left a comment
There was a problem hiding this comment.
Overall fine but needs a couple of tweaks.
| self.axes_max = toolhead.Coord(*[r[1] for r in ranges], e=0.0) | ||
| self.dc_module = None | ||
| self.supports_dual_carriage = True | ||
| self.forbidden_zones = ForbiddenZones(config) |
There was a problem hiding this comment.
I think this should move in to the toolhead so all kinematics benefit. Toolhead calls check_move, so the forbidden_zones check_move can go right before that.
There was a problem hiding this comment.
Sounds good, i'm on it.
| # | ||
| # This file may be distributed under the terms of the GNU GPLv3 license. | ||
|
|
||
| from shapely import from_wkt, STRtree, LineString |
There was a problem hiding this comment.
This should be lazy-loaded if config.has_section("forbidden_zones") passes. Otherwise, all existing machines are broken until they update dependencies, which I think is a bit extreme. The way LoadCellPrinterProbe does this is fine, as a reference.
Thanks. I'll take care of it all, and update the docs/etc as well. |
|
@dberlin – Is this project still being actively developed? I’m a huge fan of the concept and currently have two printers that would be perfect candidates for this. Would love to hear if there’s an update. |
|
Sorry, i got dragged into a bunch of stuff. I will try to fix all the review comments this week or early next if you are able to test it. |
|
Totally understand, life happens! Great to hear you're still on it. I’m definitely down for testing, though I might need a bit of assistance with the setup process to make sure I’m doing it right. Keep me posted! |
This change add supports for forbidden zones of movement.
They are specified as shapes (in WKT format), and any movement
that intersects with a forbidden zone raises a move error.
This is useful when you have a toolchanger or other area that
you want avoided, but it's not the width/length of the entire
bed, so changing the bed size is unhelpful.
The current implementation is very simple - we use shapely to
parse WKT and build an STRtree, and check for intersection
of the move line with the forbidden zones.
Performance implications are ~nil.
If there are no forbidden zones, there is no time spent checking.
In the the common case of 1-2 polygons that basically never intersect,
you add a few x/y point comparisons to notice
the non-intersection. It would actually be more theoretically optimal
in terms of comparisons to add the endstops as lines to the STRtree and
eliminate the existing endstop checks.
But even with an absurd amount of polygons, the per-check time is essentially
non-measurable on an rpi 4/5.
The current PR is not fully done, but works.
Before i went further, wanted to see if anyone else wanted it.
Stuff to still be done:
Anyway, if folks think it is useful enough, i'll finish it up and flag is as non-draft.
Checklist