Abaut rs.AddSrfPtGrid()

I already have points, I try to create surface by rs.AddSrfPtGrid(), Where I do wrong?

import rhinoscriptsyntax as rs
pois= rs.GetObjects("sel points")
v = len(pois)
count = [v,v]
points = [rs.coerce3dpoint(p) for p in pois]
rs.AddSrfPtGrid(count, points)

Unfortunately, in order for SrfPtGrid to work, the points list hast to be in the correct order and have the correct length relative to the count u and v (in other words u*v). The list will then be interpreted row by row, the first V number of points will make the first row in U, then the next, etc. until all your points are used.

That implies:
Your points really have to be organized in a grid like array (yours are not)
You have to pick or create them in order - not just a window selection.

What kind of result do you want to have with your illustrated points? Maybe there is another method that will work better…


Think you Helvetosaur, you are right, so I add Nurbscurve by the points and loft.

Think you.