Grasshopper

algorithmic modeling for Rhino

Hello everyone,

Is there a way to add attributes to geometry - point/ curves ( like name, location/ area name, land-use type and others) and then filter them on the basis of these assigned attributes, like choosing curves with certain land-use type, or selecting curves from a certain area ( i know this can be done with containment component) but i want to base the selection using attributes

Views: 432

Replies to This Discussion

Khizer, There is nothing in the base geometry classes that allows you to add attributes.  There is a User Data class that you can use to create data and attach it to an object.  This would all need to be scripted somehow.  I have not messed around too much with it.

Another idea would be to make a custom class wrapper for geometric types that gives you the functionality to read / write custom data attributes...

Thanks Luis, i'll look into that and see if i can make it work... 

P.S. i wanted to post this question on the general discussions, accidentally posted it here... is there a way to redirect this to the general discussions?

Khizer,

You are probably best off reposting in the general discussion.  I do not have the privileges of moving the discussion...

Luis

I don't think any one can move discussions from groups to forums not even site admins

I've seen David move discussions...

Only within the "Forum". Groups are a very different entity.

When David moved the content of the FAQs Group to a FAQs Discussion Forum I think he just copied and pasted it, which is why it went from me being the poster to him. If he was able to move it then I would still be the author of those first few topics.

I'm not bitter or anything...

stop going on about...

alright, alright, I'll let it lie!

:))

Without scripting, the general way to accomplish this in grasshopper is simply to maintain parallel data structures. If I have a list of 20 points, I can maintain a list of 20 strings to represent their names, and another to represent their types, etc. etc. This however creates the slightly bulky situation of needing to perform list operations (sorting, culling, etc) on multiple lists at a time, which can be a hassle. However, the general goal (e.g. "selecting curves from a certain area") can certainly be accomplished this way. 

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