Grasshopper

algorithmic modeling for Rhino

Hello,

I am trying to get input an array of points from the points component of grasshopper into a c# component but it gets the inputs as 'object' type. When i select the typehint as Point3d, i can still not access the array of points input. I cant assign the input array to a Point3d array I created in c#. Any suggestions?

Views: 1271

Replies to This Discussion

Hi Cen,

You can select 'List Access' and then 'Point3d'.

Later you'll still have to make it an array, if you absolutely need an array. Otherwise, you could just use the list. Arrays and lists pretty much do the same job.

I hope this helps,

Giulio

--

Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

If you need the array version of that data, you can just use this code:

Point3d[] array = x.ToArray();

but I'd rather use the list if possible, as the code creates a new copy.

Giulio

--

Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Thank you very much Giulio

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service