Unable to loft because list order was messed up when merged

Hi all,

I wanted to create a lofted roof surface through a series of “rafters” running between the ridge line & the bottom perimeter. I was able to create & group these “rafters” like shown in the photo. I also made sure all the rafters are ordered clock-wise, going from right to left in each group and flattened. But when merged, the component produces a data tree with 2 branches and the order is all mess up. I’m not sure how to sort them at this point (sort pts along crv & sort pts did not work either). I’d appreciate some pointers on how to rearrange them. Thanks!

loft curves.gh (19.4 KB)

missing

Do all the lines have the expected start/end points?

The hidden wires only make this relatively simple model more difficult to read.

I was able to get the numbers in the correct order, but it fails at the final loft, I’m not yet sure why.loft curves J.gh (24.9 KB)

I don’t have the Human plugin so can’t see your geometry, sorry.

missing

P.S. And again, hidden wires don’t help in trying to understand the model.

Thank you @jayandrewscadd & @Joseph_Oster! I took @jayandrewscadd’s algorithm and replaced Human’s components with standard grasshopper ones, as well as unhiding all the wires.

I appreciate your help on this.

loft curves J 2.0.gh (25.3 KB)


loft curves J 2.0_re.gh (22.9 KB)

1 Like

Thanks, @HS_Kim. Such finesse. Do you know why Control Point Loft worked but good old Loft didn’t?

@jayandrewscadd I was wondering how you know to reverse the output of the merge component to get the curves in order? Is there a hidden logic behind the merge component? Still trying to wrap my head around it. I will have to merge the remaining rafters into 1 single list to loft so I want to really understand what is going on with this component.

Ok, I’m new here, about a month into experimenting with GH, though 20+ years of 3D CAD, so I get complex modeling in general, but GH I’m a noob, but yours was the first question I had half a good answer to ha!

Disclaimer out of the way, first I just used the method I learned to display numbers on the curves using the components called point list from point on curve. That showed me exactly how the curves were out of proper order.

So from there I knew it was just a matter of how to rearrange them, likely through some combination of reversing one or both of the lists, then combining the two lists in the proper order, maybe with flatten.

I’ll interject here that one valuable area to learn about GH is data management, and I urge you to look up some tutorials on GH data management.

Meanwhile, back at the ranch…It was not obvious to me which component to properly merge the lists in the correct order after reversing the lists individually, it took me quite a few tries and just typing words into the component search box and trying different components until one gave me the results I wanted. There is likely a more appropriate component than merge. I expected it to work if I put one list to D1 (in merge) and the other list into D2, but that still didn’t work. So then I tried just adding them both to D1, which finally worked, go figure.

To reiterate, it was a fair understanding (for a noob) of data management in GH, so I highly recommend brushing up on how data management works in GH. I suspect it will help you to strengthen your understanding of how the behind the scenes portion of your model is behaving.

Thank you, I appreciate your input!