Grasshopper

generative modeling for Rhino

I want to change the color of object with GH SDK,But I can't find the class about this. Can you give me some suggest? not Preview commpont ,it can't be baked.

Views: 366

Reply to This

Replies to This Discussion

Hi,

currently there are no colors, layers, linestyles or other attributes in the Grasshopper SDK.

Thanks,

- Giulio
________________
giulio@mcneel.com

Is the question: How can I bake something with colour attributes assigned?

In which case use Giulio's BakeAttributes component, found here*: http://www.giuliopiacentino.com/grasshopper-tools/

-Danny

*cue 70's pimp music....... bow wow chick a chick a 

if the question is "is it possible to change the rhino object color with grasshopper" then it can be divided into several points:

1) input object into the grasshopper.    - easy, yeah?

2) inherit it (?) and delete object in rhino (?) instead, I suggest you to bake a new one on the different layer, and delete this one manually after

3) bake object in rhino using the script which Danny mentioned above.

Actually, I think that you can delete object automatically via lunchbox command component, at the same time with baking. You also can read objects layer with local code components.

Thank you. I have writed a code to preview the srf with different color. The color is difined by a data i get from every srf. It's about 3000 more srfs. The color are hundreds of kinds.

I use VB.net but the code from http://www.giuliopiacentino.com/grasshopper-tools/ is writed by C sharp.What's more the ghx I down load Can't perform well. There are two much errors.

This color problem  really can't be solved in GH SDK? I am Waiting for The better replies. Thanks you all.

'

Thanks Huaxiamengqing,

so, maybe you mean you want to create a component that does the same of the 'Custom Preview' component, but that is able to bake? That is a good idea and I believe a possible one. If I remember correctly, David was going to do that at some point. Let's see what he says.

Otherwise, maybe you could upload a sample of what you have and what you would like (simplified)?

Cheers,

- Giulio
________________
giulio@mcneel.com

Hi Huaxiamengqing,

When you say:

What's more the ghx I down load Can't perform well. There are two much errors.

What are the errors. Note if you haven't got matching data structures across the inputs you will not get the results you expect.

Please tell me which of the following you are trying to accomplish:

  1. Change the colour of an object in Rhino using Grasshopper
  2. Change the preview colour of Grasshopper geometry
  3. Bake Grasshopper geometry with a specified object colour
  4. Something else?

--

David Rutten

david@mcneel.com

Poprad, Slovakia

The third one,Thank you

Hope you can open the attached file. There are more secure ways to always delete the old geometry from the document, let me know if my implementation is not consistent enough.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Attachments:

Add to the Last line of the Private Sub RunScript. 

guids = m_guids

Otherwise the guids output will be null

Ah yes indeed. Good catch.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Error: "add" is not "Rhino.docobjects.Tables.object Table" 's member.

What's the time in your country david?

RSS

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2013   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service