I’m having some problems creating a Nurbs.Surface using Python. I’m currently getting the error:
TypeError: expected Array[Array[Point]], got Array[Array]
My code looks like the following:
returnArray = System.Array.CreateInstance(System.Array, 3)
a1 = System.Array.CreateInstance(System.Array, 3)
a2 = System.Array.CreateInstance(System.Array, 3)
a3 = System.Array.CreateInstance(System.Array, 3)
b1 = System.Array.CreateInstance(Point, 1)
b2 = System.Array.CreateInstance(Point, 1)
b3 = System.Array.CreateInstance(Point, 1)
b4 = System.Array.CreateInstance(Point, 1)
b5 = System.Array.CreateInstance(Point, 1)
b6 = System.Array.CreateInstance(Point, 1)
b7 = System.Array.CreateInstance(Point, 1)
b8 = System.Array.CreateInstance(Point, 1)
b9 = System.Array.CreateInstance(Point, 1)
b1[0] = Point.ByCoordinates(meshXStart, meshYStart, assessmentLevel)
b2[0] = Point.ByCoordinates(lastDriveSectionEndingX, meshYStart, assessmentLevel)
b3[0] = Point.ByCoordinates(meshXEnd, meshYStart, assessmentLevel)
b4[0] = Point.ByCoordinates(meshXStart, lastDriveSectionEndingY, assessmentLevel)
b5[0] = Point.ByCoordinates(lastDriveSectionEndingX, lastDriveSectionEndingY, assessmentLevel)
b6[0] = Point.ByCoordinates(meshXEnd, lastDriveSectionEndingY, assessmentLevel)
b7[0] = Point.ByCoordinates(meshXStart, meshYEnd, assessmentLevel)
b8[0] = Point.ByCoordinates(lastDriveSectionEndingX, meshYEnd, assessmentLevel)
b8[0] = Point.ByCoordinates(meshXEnd, meshYEnd, assessmentLevel)
a1[0] = b1
a1[1] = b2
a1[2] = b3
a2[0] = b4
a2[1] = b5
a2[2] = b6
a3[0] = b7
a3[1] = b8
a3[2] = b9
returnArray[0] = a1
returnArray[1] = a2
returnArray[2] = a3
NurbsSurface.ByPoints(returnArray)
OUT = returnArray
Thanks for the help.