#Generate U V Surface Points import rhinoscriptsyntax as rs def Main(): intU = 10 intV = 10 Pt = {} #select surface srfGUID = rs.GetObject('select surface', rs.filter.surface) #find surface domain UDomain = rs.SurfaceDomain(srfGUID, 0) VDomain = rs.SurfaceDomain(srfGUID, 1) print UDomain, VDomain #set step Ustep = (UDomain[1] - UDomain[0]) / intU Vstep = (VDomain[1] - VDomain[0]) / intV print Ustep, Vstep #loop to plot points for i in range(intU + 1): for j in range(intV + 1): #define u and v values based on step u = UDomain[0] + Ustep * i v = VDomain[0] + Vstep * j #evaluate surface Pt[(i,j)] = rs.EvaluateSurface(srfGUID, u, v) #plot points point = rs.AddPoint(Pt[(i,j)]) #rs.AddTextDot((i,j), point) for i in range(intU + 1): for j in range(intV + 1): if i > 0 and j > 0: rs.AddCurve((Pt[(i,j)], Pt[(i-1,j)], Pt[(i-1,j-1)], Pt[(i,j-1)], Pt[(i,j)])) Main()