Skip to content
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

Arrange in Grid Component - 0 item in row freeze #20

Open
jkamm opened this issue May 27, 2022 · 0 comments
Open

Arrange in Grid Component - 0 item in row freeze #20

jkamm opened this issue May 27, 2022 · 0 comments

Comments

@jkamm
Copy link

jkamm commented May 27, 2022

When the Arrange in Grid component tries to run with an input of "0" for Rows, the component freezes with no recovery (escape behavior) possible.

To recreate the bug:
add a valid input to the "G" input of the component.
add a 0 or negative number it the "I" input.

In the code for this component, (https://github.com/woodsbagot/WombatGH/blob/master/WombatGH/ArrangeInGrid.cs) it looks like the problem is that the for loop has escape behavior for 0 and negative values, but the while loop does not handle the condition where the for loop ends while the geoToTransform list still has items in it.

There are a few ways I can think of to solve this - set a minimum value of one for rowCount, add an error for ineligible values for rowCount, or add escape behavior for the loop (http://james-ramsden.com/you-should-be-implementing-esc-behaviour-in-your-grasshopper-development/). Don't know which one is most in keeping with the strategy of the WB code keepers.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant