Grasshopper

algorithmic modeling for Rhino

I hope this image is self-explanatory. I can't Flatten because I need to keep points in their indexes so I can use these indexes later on. But I am having a hard time making Crv CP search for all of the curve in each main branch for each point. Help?

Views: 5787

Replies to This Discussion

The "Curve Closest Point" will not work in this kind of situation where you are searching for the closest point on CURVES (plural). Setting this up in a way that you would search every curve for every point (in the similar brach indices), would require quite complicated tree manipulation.

One easy option would be, if you do not mind losing a bit of accuracy, is first to divide the curves to points. You can define the "resolution" by the amount of divisions. Then use the "Closest Point" component which searches for the right point in the group. This would give you a quite good guess.

Hi there-

I've made a series of components called "tree sloth" to deal with stuff like this...I had made one called "propagate ancestor", which, based on this discussion I have just updated.  Basically what it does is use two data sets - one that has more complexity, or the "child" data, and one that has less complexity, or the "ancestor" data set. It finds all of those ancestors that match each of the children, and then it duplicates them into an identical data structure so that you can do matches like this. Originally, I had limited it to allow for just one ancestor, but here you need all of your ancestors from {0} to be tested against all of your children in {0;0},{0;1} etc.  So there you go, if you're interested!

http://www.grasshopper3d.com/group/milkbox/forum/topics/tree-sloth

David, your component did it! Thank you. I've got to check out the other ones you deployed. Jissi and Tony, sorry I didn't get to experiment your solutions, but thank you for the input.

great!

Bad news. I got the points, but while trying to match these to make a Shatter, it seems that some how tree branches got mixed up. Check the two images I post: path {5;1} gives me unmatched curve and points. Other are healthy, like {5;0}.

Attachments:

I've been making some crazy tries in lists reordering so that I can match points to curves and get the proper t parameters.

I just checked Abbondio posted a solution, but I have to leave the computer right now. Gonna test it as soon as I can (1h, 1h30 maybe).

Attachments:

Attachments:

Great shattering! but...

I start to feel icky picky. 

The final purpose of this definition is to have pairs of sub-curves: each in consecutive z-levels. As such, I need correspondence tree-wise, so I can later one create surfaces connecting these pairs.

A quick way to check if this is happening, is to connect a "Line between two point" from the generating point to a end point of the shattered curve. And it is still not working.

Thank you for all the hard work yet. I will keep on trying. And would be terribly happy if you don't quit yet!

Hi Pedro, I'm sorry, can you send me a screenshot/diagram? I don't understand very clearly what You need. Thanks in advance

Hi. Check this explanation I gave in the thread, a bit lower on: http://www.grasshopper3d.com/forum/topics/closest-points-from-sets-...

Well, the data order is actually okay, the problem is that you're simply grafting your original curve list without having sorted them the same way you do the closest points...so they are always just in their original order when you're trying to match them and you lose all of the closest point intelligence from the second step.  This one is tricky.  

It's really ugly, but it does the job for this one...if I had a little more time I might try to find a more elegant solution...

Attachments:

I'm glad to see you experimenting with the filter unmatched...that's really the component that got me started on Tree Sloth.  I also just noticed that your curve paths aren't in sequential order in the beginning...they skip {6}...so you may want to "renumber paths".

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service