Grasshopper

algorithmic modeling for Rhino

Hi all,

A little help would be great.

My goal is to use a part driver file that has all my parts (with sub orienting geometry) and bring them into my working file and perform arbitrary operations on them. I need to be able to sort these parts and their reference lines and geometry to help orient them.

I'm currently trying to use the default import 3dm, which brings them in and can filter based on layer and name. however, for some reason they loose any name/key value properties/assigned sorting method that I have added during their construction. This makes the reference geometry of little use unless some method of suff/prefix to separate and sort is used on the front end. however, I'm more interested in this as a long term work flow and do not understand why I'm loosing my other meaning sorting methods.

Let me know if this is a duplicate question or anything is unclear or if there is a better way to approach this.

really appreciate any help.

Views: 676

Replies to This Discussion

Update:

I thought I would add some clarification:

I can use the 3dm to filter a name or layer but then if I try to identify that name from the geometry it is not there to reference. I have used the Elefront and human attribute components for the above test.

a possible solution, for each name it forms a new branch for the geometry. I could make a dictionary of part names to pass to it and correlate the matching path of reference and base geometry.

Just done a little test, as you say it does seem to make a new branch for each new name. so you could check the branch name against the list name like this.. 

If you need to get data from the objects themselves i think this would need to be coded using Rhino Common and the command Rhino.FileIO Namespace though i don't know how best to do this yet.

Attachments:

Rhino Ref File Below. Uploaded the wrong one in reply before.

Attachments:

Hey Matt,

Thanks for your thoughts.

I think I may use this matching method in the immediate. I've been trying to get up to speed using python and I think I will try to get that working on pulling in the right attributes/geometry.

Greatly appreciate the help

This discussion maybe of help to you then, its how i know about the FileIO stuff though not had a chance to look into how to access attributes of an object in python so posted a simple native option.

http://www.grasshopper3d.com/forum/topics/referencing-3dm-files-lay...

Do post up the Python code if you work out how to do it directly.

I mostly work in python if i have to script things myself though usually just Camera etc

Hey Matt,

Here is the python that we came up with for get geometry, names and layers from another rhino file. 

I borrowed and had some help but this works for what I need.

Thanks for your help.

Attachments:

Nice work, Thanks for the update. 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service