generative modeling for Rhino
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.
Any thoughts? Is it even possible?
Thanks in advance.
it's easy enough to harvest all geometry from a layer and it's easy enough to update Grasshopper when a referenced piece of geometry changes in Rhino. What is not particularly easy is detecting when a new object is added to a layer. You'd have to basically watch all object events and then update as soon as an object appears or disappears from a layer.
This request comes up quite a lot, I'll see if I can add a component specifically for this for the next release.
I added a Geometry Pipeline object that maintains a live feed of geometry from Rhino into Grasshopper. You can filter by type (point, curve, brep, mesh or any combination of the above), layer name (including wildcards) and object name (including wildcards).
I haven't been able to make it respond to layer name changes yet as there doesn't seem to be an event associated with those, but that will need some further scrutiny.
Geometry Pipeline will be available in the next release.
Thanks for the quick reply, David.
I'm happy to hear the news. Keep up the great job.
Even if it doesn't respond to layer name changes, it'll be of great assistance.
In the image above is it one type only or can all four be selected?
Any combination can be selected.
ooh nice, gotta ask now, any idea on release? ;-
Not sure, not too long I hope. I'm working on some optimizations and bug fixes so once I'm done with the easy ones I'll probably release. Few days if nothing goes terribly wrong.
Thanks for the update. I was wondering if it is at all possible to feed a list to either the Layer or the Name filters.
I wanted to move the geometry on layer 1 by 1 meter, the geometry on layer 2 by 2m and so on. There are a lot of layers and being able to input a series of strings would solve that problem.
Thanks in advance
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.