Grasshopper

algorithmic modeling for Rhino

when I type in 'dim x as new On3dPoint', it throw me an error as 'type of On3dPoint is not defined.

no wonder there is no drop down menu when I type On3dPoint.

I mean, where is the 'On3dPoint'?



Views: 664

Replies to This Discussion

Hi Jim,

Grasshopper 0.7 and beyond are build against the new SDK of Rhino5 called RhinoCommon (available on Rhino4 only via Grasshopper). On3dPoint is not longer defined.

You'll find all geometry types in the Rhino.Geometry namespace. RMA.OpenNurbs.On3dPoint is now Rhino.Geometry.Point3d.

Do note that a lot of the 'small' types such as Points, Vectors, Planes, Circles, Transforms are no longer Classes but ValueTypes in RhinoCommon. This means you cannot have a null Point3d, as ValueTypes always have some value. Also, if you assign one value type to another, the data is copied. Thus:

Dim ptA As New Point3d(2,3,4)
Dim ptB As Point3d = ptA
ptB.X = 20


will result in a different coordinate for ptA and ptB. This was not the case with On3dPoint.


We are still writing the RhinoCommon SDK and some functions are not available yet (other functions are only available in RhinoCommon). If you come across something you're missing, let me know and I'll see about getting it added.

--
David Rutten
david@mcneel.com
Seattle, WA

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service