Hello all,
I’m not experienced with Inside, and am running into this error that I just can’t figure out, can anyone shed some light on it?
As far as I can tell I’m supplying parameters of the types I need to according to the API, but for some reason I can’t understand, Inside tells me otherwise.
The error:
TypeError: No method matches given arguments for CreateNetworkSurface: (<class ‘Rhino.Geometry.Curve’>, <class ‘int’>, <class ‘float’>, <class ‘float’>, <class ‘float’>, <class ‘int’>)
My test code:
import rhinoinside
rhinoinside.load()
import System as sys
import Rhino as r
def createCurve( startCoords, endCoords ):
startCoords = [float(i) for i in startCoords]
endCoords = [float(i) for i in endCoords]
return r.Geometry.LineCurve(
r.Geometry.Point3d( startCoords[0], startCoords[1], startCoords[2] ),
r.Geometry.Point3d( endCoords[0], endCoords[1], endCoords[2] )
)
def createNetworkSurf( crvsList , continuity, tol, angle_tol ):
err_code = 0
return r.Geometry.NurbsSurface.CreateNetworkSurface( sys.Array[r.Geometry.Curve](crvsList), continuity, tol, tol, angle_tol, err_code )
#return r.Geometry.NurbsSurface.CreateNetworkSurface( crvsList, continuity, tol, tol, angle_tol)#, err_code )
c1 = createCurve( [0,0,0], [1,0,0])
c2 = createCurve( [1,1,0], [1,0,0])
c3 = createCurve( [1,1,0], [0,1,0])
c4 = createCurve( [0,0,0], [0,1,0])
c5 = createCurve( [0,0,0], [1,1,0])
c6 = createCurve( [0,1,0], [1,0,0])
surf = createNetworkSurf( [c1,c2,c3,c4,c5,c6], 1, 1.0, 1.0 )
The relevant Rhinocommon page is NurbsSurface.CreateNetworkSurface Method (IEnumerable(Curve), Int32, Double, Double, Double, Int32) (rhino3d.com)
I’ve taken advice from this old post, but it hasn’t solved the issue: GHPython: What is IEnumerable<int> edgeIndices? - #3 by AndersDeleuran