Soft Edit Surface uv Type Hint?


In Grasshopper, I want to soft edit a NURBS surface via Python: SoftEditSurface. My problem is that Python expects the type Point2d as uv input, but in Type Hints I find only Point3d.

I tried every variant (at least I think so) but to no avail. I’m am pretty new to using Python in GH so I may have missed something essential anyway.

Any hints are highly welcome.

Cheers, Horst (20.4 KB)

There is probably a more efficient way, but maybe something like this:

from Rhino.Geometry import Surface
from Rhino.Geometry import Point2d
import rhinoscriptsyntax as rs

pnt = rs.coerce3dpoint(uv)

a = Surface.CreateSoftEditSurface(s,Point2d(pnt.X,pnt.Y),d,ul,vl,t,fe)

Thanks a lot, it works!