Challenge:
I would like to construct a grid of rectangles, with different step sizes.
What do I have:
List A: a list of numbers, representing the step size to the next grid line in X-direction
List B: a list of numbers, representing the step size to the next grid line in Y-direction
I do know there is the Rectangular grid command, however, If I put multiple numbers in the step size Sx/Sy it starts over for each input (instead of summing the step sizes).
2020-04-02 rectangular grid with irregular step sizes.gh (6.1 KB)
Any ideas?
Thank you in advance,
Hi Joseph,
Thank you very much ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=9)
It does the trick ánd with very few commands ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=9)
However, there is still 1 challenge to go.
I noticed, that the surfaces items are not sorted in a ‘logic’ way, but more in a random way present in the list (possibly it has to do with the split surface command)
Do you have any suggestion how I could rearrange the surface items in the list in such a way that they have an ascending order from left to right?
rectangular_grid_2020Apr2a.gh (15.9 KB)
![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/2/5/25aaa052b6ef0f81e8edd9f9c7332431489a5dfb.png)
![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/8/1/8187adaedf5f2c4e5a8c2f82def9cc3833ac026f.png)
Thank you again very much ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=9)
Sorting geometry is a common problem, there are many tricks to accomplish it. See white group for one:
rectangular_grid_2020Apr3a.gh (13.4 KB)
Ahh thank you once again! It works perfectly for the X,Y plane.
The only thing I must admit, I don’t fully understand the part (deconstruct point -->rearrange x,y,z --> point --> sort point).
Because when I try to do the same for a surface in the XZ plane, or XY itdoesnot seem to work.
Yes, I did try several combinations of the deconstruct point and rearrange but nothing seems to work.
Do you have any suggestions how-come?
The solution has to be very very close, but I cant find it
.
Thanks again ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=9)
2020-04-03 rearange surfaces XZ and YZ plane (3).gh (29.3 KB)
![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/f/8/f84967a8c206241746dd74dfb1299da54c8ae9c6.png)
This looks idiotic but Grasshopper is quirky that way. It’s a VERY IMPORTANT DETAIL… I had to round off the centroids (I used two decimal places) to get Sort Points to behave nicely. See purple groups. ![:man_facepalming: :man_facepalming:](https://emoji.discourse-cdn.com/twitter/man_facepalming.png?v=9)
rectangular_grid_2020Apr3b.gh (30.6 KB)
2 Likes