Grasshopper

algorithmic modeling for Rhino

Hi All,

I'm trying to create a method for determining the 'level' of uneven building geometry.

currently, i have a system whereby the centroid of each piece of geometry is collected, and the 'level' (z coordinate) of each floor level is collected. an IF command then allocates either a true (1) or false (0).

is there a way to compare the results of the if command and the original data, leaving me with a list of components that sit within the two parameters?

can I change the IF command to output the actual results as opposed to a true or false result?

Many thanks!

Views: 2476

Attachments:

Replies to This Discussion

is there a way to compare the results of the if command and the original data, leaving me with a list of components that sit within the two parameters?

Yes. Once you have a list of True/False values for given conditions, you can plug that into the [Cull Patern] component along with the corresponding components list, and it will output only the components that tested True. You could also use [Member Index] to search the True/False list for the indices of items that tested True, then plug those indices into [List Item] to retrieve them that way.

Additionally, instead of using the [Evaluate] component to get your boolean list, you can use combinations of the many Operators components. There's [Larger Than], [Smaller Than], and [Gate And] that can be used to achieve the same end (while also giving you the flexibility of using intermediary outputs elsewhere in your definition, if needed).

This is great, thankyou for this, cull worked a treat.

See Gwendolyn's answer on how to do this.

As a quick note, it is not possible to use 'complicated' data types in expression, not even to pass them through. Expressions only understand simple stuff like booleans, numbers, text, points and vectors.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service