Grasshopper

algorithmic modeling for Rhino

Hi guys,

 

With the C# code below (and attached) I get the following output. How could I get actual points?

 


private void RunScript(List crv, double nb, ref object Brep, ref object DivPts)

List<Point3d[]> pts = new List<Point3d[]>();

for(int i = 0; i < crv.Count;i = i + 2)

Point3d[] pointArray; crv[i].DivideByLength(nb, true, out   pointArray);

pts.Add(pointArray);

}

DivPts = pts;

}

Many thanks,

Arthur

Views: 366

Attachments:

Replies to This Discussion

Sorry I confused list and array. In this case I needed a list and not an array. Answer below:

 


List pts = new List();

for(int i = 0; i < crv.Count;i = i + 2)
{
Point3d[] arr;
crv[i].DivideByLength(nb, true, out arr);
pts.AddRange(arr);
}

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service