Grasshopper

algorithmic modeling for Rhino

How to use rhino python to set one curve for grasshopper component?

Hi all,

I remember I have seen some similar discussion about this before but fail to search out the talk...

What I want to do is to use rhino python (or rhino command) to set one curve for a specific grasshopper component (see attached image ).

Wondering if there is any easy way to do that?
Appreciate for any suggestion,

Jack

Views: 1799

Attachments:

Replies to This Discussion

I am not familiar with that, 

but I guess you need to load grasshopper script context before doing anything related to grasshopper

otherwise, you can start using Python inside the grasshopper

maybe this :

import ghpythonlib.components as ghb

ghb.Import3DM(file, layer, name) 


Hi Mohamed,

Thanks for your reply, I have try to import the 3dm file but don't know why I cannot access the object... did I miss something?

Thanks,

Attachments:

try this 

I just used Quotation marks (double flipped commas for texts) to define name and layer

Attachments:

or this 

But this is not what you want to do at the beginning

you wanted to use python editor, aren't you?  

Yes, Mohamed, I want to use the rhino python editor to assign geometry to grasshopper.

May I ask why you would want to do this?

Hi Giulio,

I am using HumanUI and GH-ArchiCAD live connection together. With HumanUI I can use a nice interface window to adjust some parameters to create base geometries which will be feeded into the ArchiCAD live connection. But I found that these 2 plug-ins cannot run together within the same GH definition (they would crash).

So I have to separate one script into 2, and that is why I am looking for a way to let the ArchiCAD live connection script to inherit the base geometries seamlessly.

Thanks,

Giulio is the scripting expert here, I am out Jack 

Hope I was helpful 

I think you did a great job Mohamed!

About this issue, Jack, then I think the best would be to let the developer of HumanUI know, and also the devs at GH-ArchiCAD. I am sure they both can improve their schemes so that the bug is fixed.

In fact, setting values from outside Grasshopper is not trivial and could lead to having errors surface. The best would really be to have them fix the bug!

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

Yep, you are right, I will let them know. Getting both plug-ins work in the same script will be the best solution.

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