Grasshopper

algorithmic modeling for Rhino

Hi,

I am trying to get started with using the ghpythonlib library. I've installed 0.6.0.3 Grasshopper Components as Functions.

I made a simle test where I'm trying to move a point using ghpythonlib. I was expecting to get the moved point as my output. Instead I seem to be getting "None".

What am I getting wrong here? Thanks in advance for your help.

Views: 650

Attachments:

Replies to This Discussion

Hi Antti

opening your definition in Rhino WIP will show this:

The new warning outputs of ghpythonlib should be pretty self-explanatory: the component first input fails because it expects a Geometry type. Then the solver fails because of that input.

You can have x as Geometry by right-clicking the parameter x, then choosing Type Hints. Guids are good for rhinoscriptsyntax. If you have a Guid, you can also convert it to stuff using one of the rs.coerce_xxx() functions.

See the Help of the GhPython component for more rhinoscriptsyntax help.
I hope this was useful,

Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Thanks Giulio!! Using the Type Hint solved the issue!

No problem at all. If you have a chance to try the new ghpythonlib, it would be great to have your feedback.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service