Grasshopper

algorithmic modeling for Rhino

hi!

i've problems coding a custom component in c#, i hope somebody can help:

i get my input, e.g. pManager.Register_PointParam("Points", "P1", "Points to store");
and after the first runtime error i know thats a GH_Point.

How can I convert the GH_Point into a On3DPoint so i can calculate some geometry out of it?
And how do i cast this geometry back into a GH_Something?

I'd really appreciate any kind of help,

matthias

Views: 625

Replies to This Discussion

Hi Matthias,

On3dPoint is an old-skool SDK type. If you're developing for Grasshopper 0.7 and beyond, you'll need to use the new SDK (enticingly called RhinoCommon) which uses Point3d instead of On3dPoint.

Anyway, to answer your question, all (or at least most) basic data types in Grasshopper such as GH_Point, GH_Vector, GH_Surface and GH_Boolean have a Value property that provides access to the actual data being wrapped.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
thanks a lot! i missed referencing to rhinocommon.dll, everything works great now.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service