Grasshopper

algorithmic modeling for Rhino

Hi all,

I often come across this situation where I want to cross multiple items coming from data trees that have different levels of branching. (see attached image)

In this example, I'm trying to find the closest point for each point P (with the address {A;B}(i=1)) on the 3 curves located on a lower level branch (with the address {A}(i=3)) while keeping the first data tree structure. 

I work around the problem by using this grouping-duplicating-ungrouping trick which works for all the geometry types but not for numbers or text.

Would there be a cleverer/more elegant way to do it (that could potentially work with all the data types)?

Views: 768

Attachments:

Replies to This Discussion

I think you just missed the simple solution  :->

Hi Deer,

thanks for your reply. Unfortunately the solution you are suggesting doesn't give the same result.

By grafting before the duplicate component, you are duplicating each curve 3 times.

When you pass those 3 identical curves in the Curve Closest point component, each point is basically projected 3 times onto the same curve (instead of being projected onto 3 different curves.. if that makes sense).

If you try to plug in your Duplicate output into the Curve Closest point component you will see the difference

I am sorry that I did misunderstand your problem and forgot one step.
All you have to do is add a 'path mapper' component with {a;b}(c) in the left and {a;c}(b) in the right.
There is some connection problem with the picture attachment, so I have to tell you in text :-)

The Path Mapper is indeed a solution that works! Even though I like to try avoiding it as much as possible for more dynamic definitions

Sure.
path mapper is powerful. But these kind of operation reduce the 'strength' of the program.
I like group and ungroup just the same as you. 
When you deal with numbers, my solution is convert them to point (very violent way),

and then use group, duplicate, ungroup, at last deconstruct point to retrieve the number (have nothing to do with 'elegant')

That's a very good solution! Love that!

Thanks a lot Deer!

Glad to hear you like it.
You are welcome ;->

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