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: 19021

Replies to This Discussion

Hi Rodrigo,

 

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.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

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.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

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.

 

This is what I came up with. Let me know if you want more filters.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

In the image above is it one type only or can all four be selected?

Any combination can be selected.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

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.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

 

Hello David,

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.

For example:

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

M

Hello David,

Is it possible to change the name of geo pipeline automatically, like use slider or sth. else because I want to select one geo once a time and change to another geo automatically.  

the "Dynamic Pipeline" from Human works just like the Geometry Pipeline but it lets you supply layer, type, and name as an input. 

This is amazing. David is a rockstar (as everyone already know).

I am sharing my application of the Geometry Pipeline in conjunction with gHowl to calculate PV surface areas of different options.

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