Grasshopper

algorithmic modeling for Rhino

Hi, 

I am trying to dispatch a set of points by their Y coordinate so that anything that has a '-' value is dispatched into one list and anything with a '+' value is sorted into another. 

So far I have de constructed my points to get the Y values. These are then fed into the evaluate component with the definition 'if ((X>A) and (X<B),1,0) where my 'A' and 'B' values are 0 but so far these are returning all my results as 0.

Additionally, in this scenario what happens to any values that have a '0' Y coordinate, will they be returned as true or false?

I'm struggling to see where the hole in this definition is and any help would be greatly appreciated. 

Thanks, 

Tom 

Views: 1054

Attachments:

Replies to This Discussion

hello

since a y value has to be larger than zero and smaller than zero then it must be zero. the expression like that, tests a values if it is between A and B to return 1. if not 0.

if A is not B then your expression should be working

if the value to test is one why not use large than component?

alex

Hi Alex, 

Thanks for your reply, I think the larger than component may be exactly what I am after. I just tried using it to create a dispatch pattern to form two separate lists of points where Y>0 and Y<0. It appears to be what I was after! Thanks very much!

Hi Tom, to do the same with the expression component you should have "if(x>0,1,0)"

Hi Mire, 

That's perfect, I now understand. Thanks for the alternative method!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service