Grasshopper

algorithmic modeling for Rhino

I would like to reverse the order of the odd numbered path data in the second column. 

 

Example of {0} and {1} - 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.0, 0.9 ,0.8, 0.7, etc.

Not - 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 0.0, 0.1, 0.2, 0.3, etc.  

 

I know about the modlus (%) function, so I can get the odd number.  I just don't know how to manipulate the data using the path information.

 

Thanks for any replys.

 

Views: 396

Replies to This Discussion

There is probably a more efficient way to do this, but I'm pretty sure this does what you're asking for.
Attachments:
Thank you Andrew,

I'm probably premature with my questions as I'm new to GH. I'll do a better job at studying for an answer before asking questions.

I'm reading Zubin Khabazi's manual today. I didn't realize that GH would be so addicting. There should be some warning on the home page. :)
No don't worry - I had to think quite a bit before coming up with a way to do what you asked. The way we manipulate data trees continues to evolve with every new release, so don't worry if parts of it seem unintuitive!
Ah, and as soon as I posted it I thought of a more elegant way - makes use of the new Conditional statements in expressions within a path mapper and my "partial flatten" cluster (http://heumanndesigntech.wordpress.com/2010/11/20/tree-utilities-ma...)

Attachments:
Thanks again,

I'll have a look.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service