algorithmic modeling for Rhino
Data%20Matching.ghHi all,
I have encountered such a generic problem for many times:
I try to apply some intersection between sets of lines and sets of rectangles.
After the intersection I would like to put the intersect pts (which on the same line) into the same path.
When I test it on 1 set of lines {0} with one set of rectangles {0} I can achieve it easily by graft on lines(see TEST 01)
However when I test it on 2 set of lines {0} & {1} with 2 set of rectangles {0} & {1}, it fails(see TEST 02).
(Lines on left is in path{0},rectangle on left is in path{0};lines on right is in path{1},rectangle on left is in path{1}. So lines on left will never intersect with rectangles on right)
If I apply a cross reference on it(TEST 03), seems it generates all the intersection pts however the path structure becomes messy(pts on the same line are not on the same path & there is some repeated intersection even).
Has anybody happen to have the same issue before and know to achieve this?
Appreciate for any suggestion.
Thank you in advanced.
J
Tags:
Thanks for your reply.
But your way works well only when {0}objects and {1} objects are spacially separate...
If they are always spacially separate I can just use the TEST 01 definition to achieve it.
I think I didn't explain my goal clearly, my bad...
What I want is:
The lines in path{0} only intersect with rectangles on path{0}
and lines in path{1} only intersect with rectangles on path{1}.
Don't want all lines intersect with all rectangles(see image).
I wrote a component to handle exactly these situations, called "Propagate Ancestors". It's available in the "Tree Sloth" component set in the group Milkbox: http://www.grasshopper3d.com/group/milkbox/forum/topics/tree-sloth. It takes a data set of greater complexity (your grafted group of lines, for example) and then makes copies of a data set of less complexity to match it, but which has matching earlier paths (your rectangles here). Tree Sloth has a bunch of other useful bits for list and data tree management in it as well. I made the component group specifically to assist me when doing detailing, and list management gets particularly tricky.
Cool~
Great solution!!
Thanks very much nikos and David :D
J
Just have a scan through the tree-sloth library.
That is amazing!
I need to say again: Thank you for your great plug-in David!!
J
I'm glad if it can help you out! I'm also totally open to suggestions for additions to it.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by