Grasshopper

algorithmic modeling for Rhino

Hey all, I am trying something pretty new to me.  I am taking the xyz values of some points (box to the left), then formatting the data so it will write its value with the coordinate letter in front of it.  This is working fine, but I want to put the data back together, so it can read like the data on the right.

 

Thanks for checking it out

Jake

Views: 3999

Attachments:

Replies to This Discussion

Hi Newsum,

 

I recommend formatting the entire point in one fell swoop. Imagine you have an F(x) component with a single input, called P. You plug your points into this input. The expression you want will be something like:

 

Format("X{0:0.000} Y{1:0.000} Z{2:0.000}", P.x, P.y, P.z)

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

When I try to use the expression from David, I get:  "syntax error: Unknown variable encountered:P" in the Expression Designer.

I know this is something simple that I am missing, so I went back to Andy Payne's Primer to review the Functions sections... but I am still not having any luck.

I using a single Function Component and I have tried inserting the function from a post it... and also tried from within the expression designer.

Any tips?

Thanks

 

If you are unable to rename the x input as P then change P for x in the expression above.

Danny,

Thanks for the advice.

I got it

 

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