Grasshopper

algorithmic modeling for Rhino

Is there any way to pull out the z [height coordinate] as a number to use within a function?

Can i analyse a point and pull out the height value as a number somehow? or can someone suggest how i could script this in a vb component?

thanks tom

Views: 327

Replies to This Discussion

I do not think VB script is necessary. Look under Vector > Decompose. The component will brake the point into its X,Y and Z values with 3 outputs.
That would work. Before switching to scripting, you can also see if expressions can help you out.

The expression language in Grasshopper can deal with planes, points, integers, floating point numbers, strings, booleans (and, in the next version, complex numbers).

In order to get the z coordinate out of a point, feed that point into an F(x) components and use an expression like:

x.z

("x" is the default name of the variable, rename it to "p" or "pt" if you want it to be self-documenting)

--
David Rutten
david@mcneel.com
Robert McNeel & Associates
thanks got it to work. many thanks
thanks got it sorted
Attachments:

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service