Grasshopper

algorithmic modeling for Rhino

Hi,

I'm new with gI have a rhino script which i need to convert it to grasshopper3d. but I didnt figure out how to do it. Could any one help me please. 

id = rs.FirstObject(True)
a = Rhino.RhinoApp.RunScript("_ExtractPt", False);
pids = rs.ObjectsByType(1)
if(len(pids)):
i = 0
xa = []
ya = []
for pid in pids:
x,y,z = rs.PointCoordinates(pid)
xa.append(x)
ya.append(y)

Thank you very much in advance.

Views: 298

Replies to This Discussion

Hi a4411252,

rs.FirstObject function does not work with grasshopper document. Instead you will have to assign the desired geometry (from which you want to extract your points) manually.

The attached grasshopper file supports four type of geometry: curves, surfaces, polysurfaces, meshes.

If there's something you do not understand in the file, the best thing would by to first start reading Grasshopper Primer. It will explain the very basics of Grasshopper.

Attachments:

Thank you very much

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