Grasshopper

algorithmic modeling for Rhino

i do a comparison
a=b
(equality component)


if true ---> input value of a component = 10
if false --> input value of a component = 5

how can this be done ?
thank u very much

Views: 6962

Replies to This Discussion

You can do it using the Function node and a cull pattern node. You use the function to determine whether or not the values are equal, then use the resulting boolean to set up a cull pattern that will leave the desired input value, but remove the one you don't want.

I have uploaded a file called If_Then that demonstrates this.
Attachments:
thank u very much for ur help,

one more question: can i invert a list ?

example:

4points : abcd
pick one point -> a (retrieve list item comp)
BUT all other points in list should also be passesd on


cause it would help me a lot with my problem to move one vertex dynamically
thanx a bunch

FILE
invertList1.ghx
hi,

thanxs for file
i did a small change, no it can comparel multiple numbers, hope it makes sense
always curious how to make it simpler...
I'm not sure I properly understood your meaning, but I gave it a shot. The file below will allow you to select from among a list of points with a slider. It then uses a similar set of Function nodes and Cull Pattern nodes to pass the selected point to one place, and the remaining points to another.

hope this is helpful.
Attachments:
hey phil,

thanks for helpin me out ! u understood my prob sorry for my unprecise description..

ur first invertList1.ghx gave me the hint...
i come to the same result as your seperating_points.ghx

if there s a wishlist i defenitely would set this funktionality (retrieve one list item but also keep other values of list) on it

so the next thing for me to figure out how to connect these points to a polyline...
Attachments:

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