Rhino.Geometry.Curve[] in ...Generic.List<Rhino.Geometry.Curve> problem

Hello, I have two lists, one for the curves, one for the offset and an input for the surface and want to create a output list for all OffsetOnSurface but get the error what is shown in the lower picture. I tried many things but find no solution. Maybe someone has an idea how to work around the error.


Hello! Like this?
OffsetOnSurface.gh (9.3 KB)

1 Like

Hi, thanks, your script is very good but is there a way to use two for-loops.? The first is for the crv count and the second is for the offsets count (like my test before), because I want that when the offset count is lower that the last value is used for all crv with higher index.

cvr (3) | offset (3) (same count)
[0] | [0]
[1] | [1]
[2] | [2]

crv(5) | offset (3) (higher crv count)
[0] | [0]
[1] | [1]
[2] | [2]
[3] | [2]
[4] | [2]

If you want to use the same logic as Grasshopper when the counts are different, it is easier to use Item than to use List.

1 Like

Thank you, much easier than my first attempt at working with lists/arrays. :smiley: