GH - Why doesn't Join Curves Join Curves? Bug?

grasshopper
rhino5
rhinowip

#1

Hi again,

This has made me confused more than once, namely that the Gh Join component doesn’t actually Join its input curves, unless adding an extra Join component at its tail, like so :

Fig1. Notice how the first Join outputs two (2) curves, only the second Join actually Joins the two curves :

This must be a Bug, no? Tested and confirmed the behavior in both Rh5 and WIP (May 23, 2017)

// Rolf


#2

does this happen in the basic example of having two lines which are then joined? because for me, it works as expected :


#3

Hm, I get proper result when making fresh lines like you :

But, then I tried to “Flatten” the output of the two Line components feeding the input curves to be Joined, and then it started to Join at first attempt. Should that really be needed? < scratching head >

// Rolf


#4

Yes, this is an essential part of how GH works. Join joins curves by branch, that is to say all those are in a list at the same branch level. This way, you can have a tree with many branches and only the correct corresponding curves are joined for each branch level.

If you are wanting to join curves on different branch levels, you are going to need to either flatten the different lists, or use something like PathMapper to re-route one or more of the branches so that they are at the same level.

–Mitch


#5

OK, it makes perfect sense.

I just didn’t think of the fact that everything “multiple” is a list by nature, and that all lists in Gh (probably) are of the same type, which has branches (overlooked that). It’s intuitive once you come to think of it that way. :slight_smile:

// Rolf