Grasshopper

algorithmic modeling for Rhino

I just decided to experiment with Python scripting, especially that I've learned to program in Python about a year ago. I'm trying to import a list of points from grasshopper, then I got their coordinates using the rs.coerce3dpoint and I appended the coordinates to list. However, when I printed this list I got a list of coordinates and their attribute. I thought I should get a list of coordinates only! So what did I do wrong??

I'm trying to import a list of points from grasshopper, so I got the points' coordinates using the rs.coerce3dpoint and I appended the coordinates to a list. However, when I printed this list I got a list of coordinates and their attribute. I thought I should get a list of coordinates only! So what did I do wrong??

Views: 1018

Replies to This Discussion

That's where dir/help/type comes in :D

Adding to Tom: rs.coerce3dpoint does not return the point coordinates, but the Rhino.Geometry.Point3d from the Guid. If you pass your input data as a Point3d (right-click the input parameter -> Type hint -> Point3d) you can avoid all the coercing stuff and use RhinoCommon directly:

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service