pylabrobot icon indicating copy to clipboard operation
pylabrobot copied to clipboard

Add `itemized_resource.traverse(direction="down_left")`

Open BioCam opened this issue 7 months ago • 2 comments

missing option in itemized_resource.traverse(direction="down_left")

  • renamed accordingly itemized_resource.traverse(direction="down")

-> itemized_resource.traverse(direction="down_right")

BioCam avatar May 22 '25 23:05 BioCam

wouldn't you want left_up and the other ones as well?

  • {up, down} x {left, right}
  • {left, right} x {down up}

should be 8 variants

rickwierenga avatar May 22 '25 23:05 rickwierenga

wouldn't you want left_up and the other ones as well?

For completeness-sake maybe, but I couldn't image a case in which the others would be useful.

I added "down_left" because I have a use case right now and am missing this option :)

BioCam avatar May 22 '25 23:05 BioCam

@BioCam says: we should split into

  • start_position, e.g. left
  • direction, e.g. down

raise error when impossible

rickwierenga avatar May 26 '25 18:05 rickwierenga

i extended to support all directions and starting locations. i rewrote the entire method to make this easier. it also fixed the situation where this method was actually hardcoded to 96-item resources before.

rickwierenga avatar May 27 '25 19:05 rickwierenga