Grasshopper

algorithmic modeling for Rhino

Hi,

First of all, I'm fairly new to grasshopper, have been messing around with it  for almost two weeks and has already changed my workflow in quite a bit.

 

Before I started using GH, I had a brief experience writing Lisp routines for autocad. That sums up my scripting experience really.

 

I'd like to know if there is a way to get all objects from a layer in rhino and use them in GH. If I draw new geometry in that layer, the script "live updates" and that new geometry is automatically used in a GH definition.

For instance, let's say I have a circle and I draw cutting lines in the layer "Parcels". Those lines would cut the circle in diferent parcels withou me having to do the "set multiple geometries" routine everytime I feel like changing something.

 

I´ve found this script, but just can't manage to adapt it to the script in GH.

http://wiki.mcneel.com/developer/sdksamples/sellayer

 

Any thoughts? Is it even possible?

Thanks in advance.

Views: 19199

Replies to This Discussion

David,

Is there a piece of example code that can be used to detect a layer object change for c#?

Rodrigo,

 

I put a definition together which is kind of a hack but works well for me when adding new objects to Rhino space without selecting in GH.  Not live update, but uses a toggle.

 

To test, try adding new points to rhino space and then hit the boolean toggle.  The object should be updated.

 

Requires Horster reference tools.

 

Also, I haven't been able to download the new GH yet, so this is made using the old one.

Attachments:

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