Grasshopper

algorithmic modeling for Rhino

Hi GH Community,

I am trying to solve that problem with REPLACE ITEMS command but I need your help to set it correctly, I explain to you my problem:

- I have different types of rectangles (A,B,C,D,E);

- I have a first layout of those rectangles that includes all of those, I have putted them in a grid with an attractor;

- Now I generated a second layout of rectangles (even this one includes all types) using a different kind of attractor (so the two layouts presents different types of rectangles with the same starting point);

My objective is to say "if the second rectangle (that belongs to the second layout of rectangles) has an end point out of the region of the first rectangle, then replace it with a type of rectangle that fits inside the first rectangle"

To do that I sorted the rectangles by distance finding the ones that have the same starting point. In the figure it is possible to see clearly the example of one rectangle that I would like to replace with another type.

In that way I was able to find one by one those "overhang events" by an integer slider. 

Now my problem is: how to set a ruled index in a way to find automatically all those "overhang events" without having a slider that find them one by one?

Is there a way to have a list of all those "overhang events"?

The thing that I was trying to do for the replacement was the one below

And how to replace those items with the type of rectangle that better fits with the first one without having a loss of space? How to define a rule of replacement using the types of rectangles?

Sorry for the long question but it was difficult to explain shortly, would you please correlate your answers with images?

Thank you

Views: 424

Attachments:

Replies to This Discussion

Those are the possible combinations of replacement.. but I don't know how to set them too!

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service