Grasshopper

algorithmic modeling for Rhino

Hi guys,

I am currently trying to assign a value to a surface. I have a list of numbers that I want to assign to different surfaces. So for example, I want to assign list index 0 to surface A and list index 1 to Surface B. Is it possible to do so? 

Views: 2469

Replies to This Discussion

Grasshopper doesn't have a concept of meta data, so you cannot 'assign' in that sense. You also cannot combine the surface and the number into some larger data type, not unless you want to program such a type from scratch in code.

Rhino type geometry (surfaces, breps, meshes, curves) can have user data, but GH has no components for assigning or reading Rhino user data.

So what exactly do you require when you say "assign"? It's probably possible to re-order either the surface list or the number list so that they match up together.

Hi David,

Thank you for the quick reply. For me, I wanted to assign values on the surfaces so that if the surface has a certain value that I assigned to, the surface will be colored in a certain way. So what I wanted to create is somewhat like a visualization. An example would be like the image below. 

So, if I assign the number 0.30 to the surface, the surface will have the color blue.

Hi.

Check attachment if you want. Just for display purpose, there's no problem including assigning to mesh, but assigning as a material for rendering is a whole different problem.

Attachments:

Hi Hyunsoo, 

Thank you for your reply and help. For the color assigning in the image above, are the values manually assigned? Or is it directly from the surfaces?

 

Dear Hyungsoo,

Thank you very much for your help. If I may ask another question, is it possible to reference these numbers to these geometries in grasshopper? 

I have trouble referencing numbers or values to the geometries.

It seems, there's no problem of data matching with your two data sets.

It depends what would you like to do to your boxes with these numbers.

You can manipulate those numbers(remapping is one way)to assign unique colours to your boxes or transform them.(move or scale.. whatever..)

That is to say, if your data sets are perfectly matched in terms of "Data Tree", then all you have to do is take good care of them.

Hi Hyungsoo,

Thank you for your reply. I would like to extract the geometry using the values. If the values are smaller than a certain number, the associated geometry will be extracted.

Quick demo..

Hi Hyungsoo,

Thank you very much for the quick demo. 

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