I have about 20 meshes stored within different layers in Rhino. I would like to transfer this into separate mesh components in Grasshopper automatically through a VB or C script or NET. Can anyone tell me whether this is possible. At the moment I am doing it manually but it tends to be tedious.
Hmmm... If you know their ID - and if it stays the same - you could select them as shown here and create a custom component with 20 outputs, one for each mesh.
Manually referencing is probably much faster for single files - if you want to perform this on multiple files, the IDs would have to be the same in each file.
If it's just about having the meshes as single items (and not as a list) you could make a simple component that has one output for each item in the list, thereby dividing them up.
It all depends on what you actually want to achieve - what I wrote above are just some random thoughts which might or might not be suitable for what you want to do. Please add some more infos about that if your question isn't resolved.
You could also assign them names, then import them via a layer + name reference (see second post in this discussion)
--
David Rutten
david@mcneel.com
Seattle, WA
Permalink Reply by WT4 on December 5, 2010 at 5:26pm
Hi David and Johannes
Many thanks for the info. It makes my life a lot easier.
I did not think that RAM files with all the colour information could be imported as a mesh file in Grasshopper and still retain the colour information but it does. Fantastic.
Was wondering whether it will be possible at some stage to import a pictureframe as a surface which also retains the image in Grasshopper.
Regards and thanks for all the development work.
William
Permalink Reply by WT4 on December 6, 2010 at 10:21pm
I have just found out that by using
layername.*
that I do not even need to set a name for the mesh or graphic entity