Grasshopper

algorithmic modeling for Rhino

Please how do i get the negative values on a list to read as "value RIGHT" and positive values as "value LEFT"? For instance "-2.0005 = 2.005 RIGHT" and "75.45 = 75.45 LEFT"

Thanks

Views: 5536

Replies to This Discussion

I would use [Smaller Than] where the comparison number is = 0 to [Dispatch] the Lists to two separate [Concatenate] components one with " LEFT" and the Other with " RIGHT" in the B input.

Edit: Also I would pass the negative number through [Absolute] to get rid of the minus sign

 

I have been able to separate them but i still don't know how to replace the separated values to either left or right.

Here are two different methods one (Left) uses the method described above and the other (Right) uses [Expression] to format the number and add the RIGHT.

EDIT: The <Graft> from the output of Random means that the order will remain the same despite what direction it is. Otherwise you can ignore this and the [Clean] components and end up with separate Right and Left Lists

Awesomeeeeee! Thanks..

My two cents:Edit: if(x<0,-x&" RIGHT", x&" LEFT")

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