I'm trying to generate a surface with a function and using DPoint3D with coordinates read from excel. I worked out the following function but I'm getting the error: "Index was outside the bonds of the array"
Any idea what am I doing wrong here?
Thanks
function(CoordinateSystem CS, CoordinateSystem CSglob, ExcelRange Zs) { DPoint3d[][] Pontos = new DPoint3d(0, Series(-90,144,1), Zs.Value); BSplineSurface Superf = new BSplineSurface(); Superf.ByPointsAsDPoint3d(CS,Pontos); return Superf; }
Hi Pedro,
Sorry I am away from my computer today but I typically write it a slightly different way. Maybe it would work for you.
function(CoordinateSystem CS, CoordinateSystem CSglob, ExcelRange Zs) { DPoint3d[][] Pontos = new DPoint3d(0, Series(-90,144,1), Zs.Value); BSplineSurface Superf = new BSplineSurface().ByPointsAsDPoint3d(CS,Pontos); return Superf; }
Hi Wayne, Thanks but still got the same problem. Maybe it's something related with the lists and the nesting? CS is a 1D list with 201 elements, Zs is a 2D List with 235 elements in the top level, and 201 elements after.