algorithmic modeling for Rhino
Hi,
I have trouble running Rhino Commands in the Python component for Grasshopper :
rs.Command("_SelNone") doesn't work,
rs.SelectObjects(objectIds)
Basically I want to :
- feed the component with curves
- select those curves in the Python code ...
- ... before running a Rhino Command on them ( a Rhino plug-in command to be precise )
Thanks for your help,
Thomas
Tags:
Hi Thomas,
have a look at this script.
It targets the Rhino document. You can then use Rhino commands with that geometry.
Remember to clean after yourself, or the document will be quickly filled!
This is something that is done for you in the Grasshopper special document.
- Giulio
_______________
giulio@mcneel.com
Thanks for the quick answer,
I get that Rhino v.s. GH document thing now but would you mind those questions :
- Is the " scriptcontext " part of the RhinoCommon language ?
What is RhinoCommon ? Where can I find informations on It ? What's the difference with RhinoScript or IronPython, I m a bit confused !
- Is there any way that I can apply the Rhino Plug-in (T-Splines) in the GH document itself ?
the obvious reason as you can imagine is that all my elements come from GH so I would rather not having to bake them and then select them ...
Thanks for your help,
Thomas
Hi Thomas,
answering the two questions:
- scriptcontext is a module used in rhinoscriptsyntax
- it depends if t-splines exposes a programming interface other than a set of commands. Unless they do, no -- but you can finish the script I sent and it will work. All selection and deselection can be done automatically. You can use rs.coerce___() to obtain object references to pass down in Grasshopper.
But since now you are mentioning t-splines they have a Grasshopper component.
If you decide to write the script nevertheless, remembering to delete all objects after you are done.
More Q&A about RhinoCommon and RhinoScriptSyntax are here:
7 questions you migth have about RhinoCommon and RhinoScriptSyntax
Cheers,
- Giulio
_______________
giulio@mcneel.com
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by