Grasshopper

algorithmic modeling for Rhino

 Howdy,

This condition has come up for me several times lately so I'm wondering if anyone has any suggestions...

Sometimes it's nice to use text tags (text dots) to display data, like say offset distances from a surface as dots on the surface, but I would like to apply different colors to each dot within a gradient range of colors to make the data more visual.

I know this can be scripted, but it would be nice to be able to use GH to have more control over the colors with the gradient component.

Is this feasible in some fashion or as some workflow if it can't be done in GH alone?

Thanks much.

Views: 4691

Replies to This Discussion

Taz,
Without scripting (Rhinoscript, .Net, etc) I am not aware of how this could happen. But I am in accordance that this would be usefull. It would be great to have text as a param type / object in GH...I can see the corresponding toolset...explode/decompose text would yield a string for the content, maybe curves, originating point...
The best I've been able to manage is to get color points with the data assigned as the name, but it's harder to see the points (I haven't figured out my anti-aliasing settings to get nice round points...). Some of Giulio's (old) components help to get part of the way there, but text dots... Grr...

Some color:


Need color:


Not surprising Taz that modelling tasks of yours would be similar to mine, I added color contouring to StructDrawRhino for similar reasons. It can be applied to any rhino object (right click for this option) or to sub layers. It does allow you to pick an interval of the available spectrum, if anyone has other ideas or suggestions, I'm glad to hear them. Certainly I can look to enable this for Grasshopper

There's a demonstration of this at http://geometrygym.blogspot.com/2009/12/structdrawrhino-contouring-...
Hi Jon,

You're right, layers would be the way to go if I had a discrete number of intervals but I'm being lazy and if GH can give me 100 distinct color values, gosh darnit, I wanna see 100 pretty colors.

I guess something similar to the link below but using GH to fiddle with the color...

http://madeincalifornia.blogspot.com/2010/02/rh-points-counter-labe...
Hi Taz,

it does not take too many lines now with RhinoCommon to write a script (here in C#) that bakes points:

if(active)
{
  Rhino.DocObjects.ObjectAttributes attr =
    new Rhino.DocObjects.ObjectAttributes();
  attr.ColorSource = Rhino.DocObjects.ObjectColorSource.ColorFromObject;
  attr.ObjectColor = cols;

  doc.Objects.AddTextDot(name, pts, attr);
}

I hope this helps,

- Giulio
_____________________
giulio@mcneel.com
McNeel Europe, Barcelona
Attachments:
Giulio,

Thanks! I shall have a play!
Wow, those 5 lines of code made my day. Thanks!

I figured out how to name the text dots! Even better! Thanks again!

Hi Taz,

Are you using rhino 5?
Yes he is.
Thanks luis,,,

I just found the gumball option .This feture is what I am after.
Hey Alpha...If I remember correctly in Rhino 4 Labs there is a Gumball Demo that you can install for Rhino 4: Rhino 4 Gumball

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