Join Curves - List Logic

Hi All,

I’m trying to make a polyline with this structure of data:

The result that I want is 3 lists of polycurves with the indicates items joined.

I can’t figure how to do this. Please help!

Thanks in advance

Hi @Jorge_Villarroel
the following logic should work for you (make sure the lacing on the second transpose node is set to longest):

@Mostafa_El_Ayoubi Thanks! It worked for me, just did the expected!

1 Like

@Mostafa_El_Ayoubi Hi again, I have this structure now, and I want a similar thing:

  • The entering list has 8 sublists with 3 element each - 8 stories with 3 curves each.
  • The indices of “GetItemAtIndex” are the "segments that I want to create.

I want to join the curves of the sublists according the above figure. Some of the sublists are single element lists, so in this case, keep the element, but if there ise more than one element in the sublist, join the curves.

I hope that my explanation is enough to understand the problem.

Thanks in advance!

@Jorge_Villarroel
a list.Transpose node with it’s lacing set to longest should do it

2 Likes

Again… THanks a lot!

1 Like

@Mostafa_El_Ayoubi it’s me again. I have the following problem:

The main goal is to generate the corner rebar of a wall:

  • The routine described before worked if there is the same number of curves in each story (same number of bars in every story ex.: 2Ø18+2Ø18+2Ø18 each).

  • In real life there are some stories that require more reinforcement than others, ex.: 2Ø18+2Ø18+2Ø18 story 1, 2Ø18+2Ø18 story 2 and 2Ø18 story 3.

Here is the problem in the example above: the 2° and 3° row of bars are not in the 3 stories.

I want the data in the number of segments in red (5 and 4)…

Hope my problem is understood.

Thanks in advance!

@Jorge_Villarroel maybe I didn’t exaclty understand the issue but would this work for you ?

list.clean (lacing set to longest) will delete null elements from your sublists .

@Mostafa_El_Ayoubi The List.Clean helps with the null, but if you see the botom part of the image sent, it also creates some empty lists. What with those?

@Mostafa_El_Ayoubi I tried your recomendation, but i didn’t solve the issue (I think it is closer…). Look the red circes, it removed the null elements, but now, why PolyCurve.ByJoinedCurves node generates a null element?

Thanks in advance for your time.

The error in the node is this:

Thanks.

Hi @Jorge_Villarroel ,
it looks like your curves it the index 0 of the list at the index 1 are not joined … Could you share a dummy file reproducing the concept of what you’re trying to do ? It would allow me to provide better help.

@Mostafa_El_Ayoubi, Hi:

Here is a dummy model and a script for you to show the issue I’m having.

Wall Bars.dyn (142.0 KB)

Bars.part1.dyn (2 MB)

Bars.part2.dyn (2 MB)

Bars.part3.dyn (1.3 MB)

Please rename the extension of the “Bars.dyn” to “*.rar” is a sliced RAR file. The only script is the "Wall Bars.dyn"

The inputs are only selecting all the rebars of the section 1 and all the wall elements.

If you have some questions, don’t hesitate.

Thanks in advance.