i am building a list of 3d points and colors using multiprocessing. To keep those pairs together i add them to a stack of tuples like this:
stack = Sytem.Collections.Concurrent.ConcurrentStack[tuple]()
now i want to add the points with colors to a pointcloud. In Rhino 5 i iterate over each stack item and add the points and colors one by one:
for pt, color in stack.ToArray(): cloud.Add(pt, color)
Unfortunately, this takes very long in V6 compared to V5, so i tried to use the new PointCloud.AddRange method. Since i see no way to use automatic unpacking in the method call i need to create 2 seperate lists, one for points and one for colors. If i then pass the list of points to the method i get this error:
Message: expected PointCloud, got list
Shouldn’t it just accept a
Is there a better way to add the contents from the stack to the pointcloud ?