Grasshopper

algorithmic modeling for Rhino

Must be something I'm doing wrong, but I can't figure it out. The objective is to get a list of z values from a list of points. I have a list of points coming out of a component... I feed those points into a number parameter component and put an expression of the front end of "x.z" My understanding is that the .z should extract the z parameter from the list of points, but instead I get an error and I'm wondering what it is I'm doing wrong.

(yes, I know I could use the deconstruct point component, but that wouldn't get me the answer to my question :)

Views: 3940

Replies to This Discussion

There is a component called Deconstruct(pDecon) that returns the X, Y and Z components of a point.

Your problem here is that the point input is converted to a number before the expression is evaluated. So .x, .y or .z are not valid operations anymore, just as the little red message ballon said.

Hi Hannes. 

Thanks, and yep, that point deconstruct component works out just fine to grab the x,y,z parameters.  The error in extracting using the x.z expression was really what I wanted to explore, and having it converted to a number before the evaluation would explain the error. 

I was thinking that the expression was evaluated first (as it is on the input) before being processed by the main component; in which case the error wouldn't make sense. 

But if the input is first converted to a number and then processed by the expression the error does make sense.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service