hampuseh Posted January 29, 2019 Share Posted January 29, 2019 Greetings! I have a number of layers consisting of a certain amount of primitive curves. Level_1, Level_2, Level_3, etc. So it's kind of like a tree. I have promoted these primitive curves to point groups with same the name. I then grouped the first point of each curve on all layers to a point group called “start”. So what groups I have is: Level_1, Level_2, Level_3, Start. What I want to do and need help with is to fuse these curves together procedurally as they are disconnected. As the groups are layered the fusing has to occur layer by layer aswell. So I want the “Start” group of Layer_2 to fuse together with any points on Level_1. Then the “Start” group of Level_3 to fuse with any points onLevel_2. So only the starting points will fuse with the underlying layer. Manually this is easy but since the layer amount will change it's not a solid option. Hopefully I made myself somewhat clear. Have a nice day! Picture below shows and example of how I am thinking. Level_2's start points gets fused to Level_1's curve. Quote Link to comment Share on other sites More sharing options...
davpe Posted January 30, 2019 Share Posted January 30, 2019 seems like a good use for a loop. look for tutorials on For Loops in SOPs. Quote Link to comment Share on other sites More sharing options...
hampuseh Posted January 30, 2019 Author Share Posted January 30, 2019 (edited) Thank you for your reply! I looked into using for loops and I am pretty sure this is the way to go, however I am uncertain how to get more control of whats going on in the for loop. In the picture I have a couple of primitive groups that gets looped. Trunk, Group_1, Group_2, Group_3, Twigs. What I want now is to use Ray Sop to fuse the groups in order. Group_2 fuses with Trunk. Group_3 fuses with Group_2. Group_4 fuses with Group_3. Twigs fuses with Group_4. So I thought all I had to do was to delete the Trunk group and then insert to the Ray Sop to get the order I wanted. But it doesn't work. Edited January 30, 2019 by hampuseh Quote Link to comment Share on other sites More sharing options...
Maurits Posted January 30, 2019 Share Posted January 30, 2019 This could be done using a single wrangle node in point mode as well I think. masking use of the following function. int nearpoint(<geometry>geometry, string ptgroup, vector pt) the pseudo code would look something like this // Create string with corrcet group name "Level_%D", own_level-1 //find near point using created group string // if point found move self to location of found point Afterwards use the fuse node to fuse everything together. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.