Grasshopper

algorithmic modeling for Rhino

Hey guys, 

I was struggling with a flattened list of points, which originally belonged to a set of curves that i divided into equal lengths. For reasons i dont want to bother you with i had to flatten them, but later on i needed the original data structure back. 

I searched online and i found some topics about this but not quite what i was searching, so i thought i'd post a question here. By the time i could start a discussion i already wrote the solution :D

So i thought i'd share it with you guys probably there are more people struggling wih this issue.

Attached is the grasshopper definition. 

Cheers and good luck,

AW


Views: 386

Attachments:

Replies to This Discussion

This is very clever! The only issue I see is that if the input data is not in the form {0;A}(i), the path mappers will have to be modified to achieve the desired remapping. This is a limitation of path mappers in general, I think - if a definition using them is to be reusable, the data structure going in must be known in advance, something which is not always possible. Inspired by yours, I put together another definition that will work with any input path structure, by using the replace branches component and avoiding the use of path mappers.

(A note: The definition seems to perform sluggishly when complex paths are passed through, but I think this is because of the in-line use of Param Viewers, which I have noticed tend to make the drawing of the GH canvas extremely slow when their inputs are complex. This sluggishness goes away immediately when the definition is clustered.)
Attachments:
Thank you Andrew, that was the only thing i couldn't fix properly.
cheers,
aw

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service