Grasshopper

algorithmic modeling for Rhino

Hello

is there a way to figure out how to find out the equivalent of a grasshopper command in python grasshopper ? for example id like to make a curve, which is found under CURVE/PRIMITIVE/LINE SDL, this takes a starting point, a vector and length to form a ray like line.

is there a way to figure these command out ? do I need to import a library ( pretty sure I do need to )

thanks in advance!

Views: 1136

Replies to This Discussion

Some of them have direct alternatives in RhinoCommon, others do not but should be reasonably obvious, and other components still have so much custom code in them that you'd be hard pressed to duplicate their functionality. Line SDL for example has an exactly analogous constructor on the RhinoCommon Line structure. Line has four constructors which you can find here.

I'm pretty sure python always has access to RhinoCommon, so you don't need to import any other libraries.

David ! big fan ! thank you for the instant reply, ok pardon me, but I am a bit of a noob in scripting, ive managed to shorten and script some of the things that I have created in Grasshopper into python scripts which made my canvas more neat. so I do have some knowledge in scripting. if RhinoCommon is incrypted then I dont need to import it, then I can use its functions instantly, right ? check the attached. I am having trouble making the RhinoCommon line which you linked me to. Thanks again

I'm not a python speaker myself, but Line is a type, not a method. How do you create a new instance of a type in python?

you need to import the module first.

thank you a lot Mustapha.

Hey guys, I replied already yesterday but somehow my post was not posted.

as David said, rhinocommon is incorporated in pythons library.

all I had to do is call the Line function and enter its variables! thank you for the support

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service