Grasshopper

algorithmic modeling for Rhino

Is there a way to select objects in the Rhino window (i.e., yellow-outline-select) using Grasshopper? HDT Utilities, Horster Reference, etc., allow Grasshopper to pull object IDs, and there are several ways of sending information back to the Rhino command line, but trying to tell Rhino to select a certain ID, or object name, doesn't seem to work.

Another way of asking this might be, when you type in "Select" in the Rhino command line and it asks you to click an object, what information are you actually transmitting to it by clicking the object(s) in the Rhino windows? Is that information able to be entered manually in the command line?

Views: 19507

Replies to This Discussion

Grasshopper has a GUID parameter component that can 'pull' guid's from Rhino objects.  Other than using a script component I don't see how you could get a guid from Grasshopper back out to the Rhino command line (I'm not even certain that you can do it with a script component).  In theory I think you would want to use 'SelID' in the command line and then enter the ID you're working with.   

Chris - thanks for the idea! Andrew Heumann supplied me with the code using your suggestion. Perfect!

Not sure if this is what you were looking for, but there is a method in RhinoCommon called Select, which lets you select objects in the Rhino document via Grasshopper's script components. I'm inserting a screenshot here of a very straight-forward example, but you can obviously be more creative, depending on what exactly you want to select.

Great! Thanks.

See the attached definition - shows two ways of doing it, one with standard referenced rhino objects, the other with objects brought in through HDT Utilities. 

Attachments:

Fantastic, got it working to select objects (and deselect). Unfortunately, this still doesn't seem to be registering as a "Selection" in the Rhino commands. I.e., if you type in "Group" (or "Scale", or any command that asks for a geometry selection), and then use this method, it doesn't move on to the next step in the command (press Enter when done)....

Really? It works for me...

oh wait - now I see what you mean. You're entering the command and then selecting - I was selecting and then typing the command. Is there a particular workflow reason you need to do it this way?

Sort of - I'm fooling around with 3D gestural modeling (using webcams), and instead of trying to come up with an entire set of pre-determined patterns for the computer to recognize (two fingers = extrude, etc. etc.), I'm trying to work with the Rhino command line as-is. From what I can tell, every single Rhino command only ever uses three inputs: Place a Point, Select Geometry, or Hit Enter. I think (correct me if I'm wrong) that everything rides on those (after you've entered your particular command, of course....which could/should totally be a voice-recognition setup). If that is the case, then it would be pretty easy to program gestural input to solve those needs. I've got Place a Point and Hit Enter figured out, but Select Geometry is proving a little tricky.

Try this on for size. Credit to Chris Tietjen for the idea to use the SelID command.  

Attachments:

Perfect! Thanks man. This is stellar.

super excited to see what you come up with!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service