Python: Does the ghcomp work with nested lists?

Hi,

I’m trying to figure this out. I have a nested list of curves, if I use the grasshopper component the outcome is the expect result but if I use the ghcomp.BoundarySurfaces it does not work. I’m just wondering if the ghcomp can be used with nested lists or shall I loop it.
my code goes something like this:

curves00 = [bunch of curves]
curves01 = [bunch of curves]
allcurves = zip[curves00,curves01]
planarSrf = ghcomp.BoundarySurfaces(allcurves )
#The output of this is empty
#My solution"""
planarSrf = [ghcomp.BoundarySurfaces(crv) for crv in allcurves ]
#I'm just wondering if it should work with nested lists

best,

Miguel

I doubt it works with nested lists. These are the types of things that we need to figure out and fix in future releases.

Hi Steve,

Is there a way to make it work now?

Best

Paul

@piac did made quite a number of changes recently to improve ghcomp. He may be able to better answer this than me.

@PaulPoinet

Yes – however you need to use the ghpythonlib.treehelpers functions to feed the result of zip(). I think they are pretty much self-explanatory.

Please let me know if you spot anything inconsistent.

I will. thanks!