How to maintain point order through Kangaroo solver in grasshopper

Hey I have a question about controlling points while using Kangaroo. I simplified it down to the core but essentially I have a list of points where the order matters and once I pass it through Kangaroo (the real script has a lot more goals than just the Line Length decreasing) then the point order is totally changed. I am certain this is based on the anchor pt reordering things but I cannot just shift the lists as sometimes I have more than 1 anchor pt. Is there a way to maintain list continuity through the Kangaroo Solver?

Thanks any help would be appreciated :slight_smile:

220114_KangarooPointOrder.gh (46.6 KB)

Use Entwine instead of Merge

Thanks for the quick response but that doesn’t seem to do anything.

In the past 10 years of using Kangaroo, I never used the V output.

Using Entwine for all the goals, you can use a Tree branch component to get the anchors.

The show component is also really useful to access geometry in the Kangaroo solver output.

Whatever you pass into the normal solver with the Entwine component is in the O output with the same tree structure.

1 Like

It was my first time using it as well, it seemed the only way to get a Point out of Kangaroo. Thanks for your sketch but accessing the anchors doesn’t help…they return as Nulls which I’m sure is the same in your sketch and isn’t what I’m looking for :slight_smile:

Sorry, use the Show component to plug the points into the Entwine component and then get that tree branch of the output

2 Likes

That’s it! I knew there must be a way to pass geometry through Kangaroo undisturbed but for some reason I had thought Show was only for meshes! Thanks

2 Likes

I just want to add that I had a very similar problem, only that this technique of using entwine does NOT work with the bouncy solver!

As soon as I switched to the normal solver it worked.

1 Like

With the bouncy solver you can use the unflatten tree component after the solver to get the same data structure as it was before.

3 Likes

2 years later and you’re still on top of this thread. Thanks so much Martin.

1 Like

I really do not understand why @danielpiker chose that not all solvers keep the data structure intact…

Luckily there are good ways to deal with it…