Hi I just want to get points out of a points list. The steps are also in a list, every step is different.
For example: Get points by index from 0 to 10 than from 11 to 16.
The lists are examples. The real list are much bigger.
Here is my code:
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
number=[10,5,2,20,..,4)
pointlist=[point1,point2,..,point900]
result=[]
a=0
i=0
for elem in number:
result.append(list[a:a+number[i]])
i+=1
print = result
In the moment I got an error
TypeError: expected Array[Type], got slice
in line "result.append(list[a:a+number[i]])"
What im doing wrong? Any help would be great!
Here is a link to a similar topic: Explain Python's slice notation