generative modeling for Rhino
Thanks..(ps,Is there anyway to see the Guid component's code with Reflector?)
You can't, as geometry data is automatically converted to pure geometry before it goes into the Script component. The only way to get the guid in is to use a Guid parameter.
But I remember there is a ghx file named "findID" made by Giulio Piacentino,only he use the old C# script component..
But if you just plug your geometry into a Guid parameter it will find the ID of any referenced object. You do not need any custom code for this.
Yes, that component is over 2 year old... Now if you have a Guid it should be as simple as:
if(id != Guid.Empty)
var obj = Rhino.RhinoDoc.ActiveDoc.Objects.Find(id);
if(obj != null)
A = obj.Geometry;
Written by heart and not tested, but should be more or less like this. Hope this helps,