If then rules

Hi I’m looking at designing in rhino through IF THEN rules.

For example… IF a road is X width THEN it bends in the middle.

How would I go about doing this given I am producing a road as a capped curve offset on both sides?

Many thanks

The native way of encoding if...then logic in Grasshopper (meaning, using components) is to use a Sift component. This will send your data to one of the output parameters, depending on the input index (which could be a boolean value, if you only case about two cases). You then put different components after each output, these components represent the body of the if and else blocks. Finally, you use a Combine component to merge the two or more streams together again while retaining correct ordering.

if_then.gh (22.8 KB)

2 Likes