Grasshopper

algorithmic modeling for Rhino

I have a definition to realize a gradient from lines, but I can not bake it, to use it.

I have great difficulty understanding the entire logic of this software.
Someone would be kind to help me?

Views: 4583

Attachments:

Replies to This Discussion

I'm afraid the Custom Preview component does not bake the stuff it displays. You may either have to just bake the black lines first, assign them to the correct layer or assign the correct colour, then bake the white lines and modify them, or you can install some of the plugins that allow automated baking to specific layers or with specific attributes.

Hi,
As David said there are some plugins that allow baking with special attributes, like:
1- FabTools
2- Human
3- LunchBox
But actually you can make your own custom component using VB, C# or ghPython, here I've attach a very simple example of how to use C# to bake curves with specific color. Here is the code:

private void RunScript(bool bake, Curve curves, Color color)
{

  if(bake){

    Rhino.DocObjects.ObjectAttributes att = new Rhino.DocObjects.ObjectAttributes();

    att.ColorSource = Rhino.DocObjects.ObjectColorSource.ColorFromObject;

    att.ObjectColor = color;

    doc.Objects.AddCurve(curves, att);

  }

}

Attachments:

Really impress, thanks for the help.

It's exactly what I'm looking for. I will check the plugins. thanks again.

that is so great. thx!!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service