Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4159

Rhino.Geometry.Point3d and Rhino.Geometey.Point questions

$
0
0

Nathan Coatney wrote:

I am working on a project in which I am storing string data in the geometry objects. Everything is working for curves. I also would like to store things in points. However, Point3d does not have a SetUserString method, which is what I am using on the curves. After looking around I find that Rhino.Geometey.Point seems to be what I want, as the .Location is the point3d, and it also has the geometry base that holds the user data. However, when I try to add the .Point to the document:

scriptcontext.doc.Objects.AddPoint(Rhino.Geometry.Point)

I get an error:

Message: expected Point3f, got Point

If I use the .Location of the .Point:

scriptcontext.doc.Objects.AddPoint(Rhino.Geometry.Point.Location)

I get a point added to the doc, but alas, no userData. I know the userData is in the .Point

So my question is, how can I add a Rhino.Geometry.Point to the document with the userData?

Thanks!

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4159

Latest Images

Trending Articles



Latest Images