ResourceStack: nest stacked plates by Plate.stacking_z_height#1112
Merged
rickwierenga merged 1 commit intoJun 24, 2026
Conversation
Follow-up to PyLabRobot#1110. When stacking bare plates in the z direction, a plate placed directly on another bare plate now nests in by `size_z - stacking_z_height` instead of resting at the lower plate's full height, so a stack of N identical plates is `size_z + (N - 1) * stacking_z_height` tall (both `get_size_z()` and child placement). Gated on the value being set and skipped when the lower plate wears a lid, so existing behaviour is unchanged for plates without a `stacking_z_height`. This parallels the lid-nesting `ResourceStack` already did. Also includes the documentation for `stacking_z_height` (the Plate resource page, the ResourceStack notebook, and the example definition in the contributor guide) that was part of the original PyLabRobot#1110 work. These changes were force-pushed to the PyLabRobot#1110 branch shortly after it was already merged, so they never made it into main; this PR brings them in. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
|
thanks! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Follow-up to #1110, which added
Plate.stacking_z_height. This PR makesResourceStackactually use it, and brings in the documentation that belonged with that work.Why a separate PR: these changes were force-pushed to the #1110 branch a few minutes after it had already been squash-merged, so they never reached
main. #1110 landed only thePlateattribute (param,serialize(),__eq__/__hash__, tests); theResourceStacknesting and the docs were left behind on the merged branch. This PR re-applies that delta on top of currentmain.Changes
ResourceStack: bare plates stacked in the z direction now nest by their stacking pitch. A plate placed directly on another bare plate sinks in bysize_z - stacking_z_height, so a stack ofNidentical plates issize_z + (N - 1) * stacking_z_heighttall — applied consistently to bothget_size_z()and child placement via a shared_nesting_overlap()helper. Gated on the value being set, and skipped when the lower plate wears a lid. This parallels the lid-nestingResourceStackalready performed.stacking_z_height(what it is, how to measure it, theResourceStacknesting behavior) on the Plate resource page and the ResourceStack notebook, and added it to the example plate definition in the contributor guide.Notes
stacking_z_height, soResourceStackbehavior is unchanged for all existing labware.