algorithmic modeling for Rhino
I have a tree containing curves and a corresponding tree containing points.
But I have an extra level of branching in my curves list.
Now, I want to get the closest points for each curve, so I need to graft my points list so that I get duplicate lists of points when necessary.
This is driving me crazy : could someone help me make my data trees match ?
Tags:
Would it work if you use Trim tree for line list?
Other option would be to duplicate point list by length of line trimmed tree.
Trim tree of line list just to know main branch length.
Then duplicate point list by that length.
hard to tell with just the image, it looks like you have several items on curve branches, which wouldn't correspond to the points list.
OK, Here's an example :
I have clusters of lines and points.
For each curve in the clusters, I need the list of points closest to that curve, therefor, I need to duplicate the points list, but in branches consistent with the curves list.
By flattening the points and grafting the curves you get a Boolean List for each curve containing the points in tolerance to the curves.
Hi Japhy,
It works indeed, but at the cost of more "Pull point" computation.
I'd still like to know how to re-organize the point data tree to match that of the curves.
That way, the definition is more robust for when I have many more points and curves to process.
Like this..
By Grouping the points your just duplicating groups, then when you ungroup the groups it add the extra tree structure required to match the graphed tree structure lists tree structure.
Swaped out the trim tree's for simplify, but now realised it might be part of a larger code so you trim maybe required again.
Japhy, I have a feeling your logic would break if the set of points are closer to one curve than another.
Wow ! This is really smart ! Thanks.
I always wondered how these grouping components could be put to use...
Just curious : is there another way to achieve this, but with path management components ?
Yeah the Group<>Ungroup Tree Structure logic is a usefull trick. Only works for geo though.
Will have a think about doing it with just path management, can't think of a simple way to do it off the top of my head just now.
Thanks Matt.
You got me back on track anyways.
It's a chance that I am dealing with geometry.
It it was other types of data, I'm not sure I could use the "Group" trick, and then I would need to figure out a way to do this with path management.
Also, there's a slight error in your definition to achieve the desired list :
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by