Strange. I count the CVs of a surface and display the totals. No problem.
I count the CVs in the U and V direction, and display the totals. No problem.
I check the degree in U and V direction, and display the numbers. No problem.
Then I try to collect the CVs as points, either as rows and columns (U & V), or as a one dimensional array, but my code doesn’t seem to pick them up (I get hold of only a few of the cvs).
Fig 1. Only a few cv’s (the green ones) was collected by the code shown far below:
// collect grips by rows and columns, or as list
var nsrf = srf.ToNurbsSurface();
var cv_points = new Point3d[nsrf.Points.Count()];
for (int i = 0; i < nsrf.Points.CountU; i++)
{
for (int j = 0; j < nsrf.Points.CountV; j++)
{
var k = i + j;
cv_points[k] = nsrf.Points.GetControlPoint(i, j).Location;
//cv_points[k] = grips[k].CurrentLocation;
}
}
CV = cv_points;
I expected all grips/cvs to be collected, but they’re not. What am I doing wrong?
// Rolf
The files (the surface is referenced via guid from the 3dm so that file needs to be attached as well)
CVs.3dm (1.2 MB) Grips_debug.gh (9.1 KB)