Grasshopper Text Dot visibility/overlap

I don’t have a rhino 8 license. :frowning:

You can draw into the screen foreground, see:

And this content for further context:

Edit: I see I already suggested this above, but didn’t post an example. I’ll try to do that when I’m on my laptop again.

1 Like

Thanks for this. Yes, i’ve seen the conversation and some examples, but i still haven’t manage to find a solution. Elefront TextDot component seems to work, but i’m not able to change the color of the text dot.

Here’s a quick example, where we use the same colors, font, and size for dots with different points/strings:


230621_DrawTextDots_00.gh (9.2 KB)

If you want to use different colors, fonts, sizes, you can iterate over those in the loop at line 22 as well. Hope that helps get you going :slight_smile:

4 Likes

Oh wao, this is great. Thank you for this. :smile:

1 Like

If you want full control over size and color also in layouts, I’d suggest to set up an annotation style with the mask option set to capsule.

It is possible to change this script to work with multiple colors? I do need to color every dot with a different color. Also I do need to bake the result as surfaces for later printing.

Thank you.

One should probably separate concerns better, but here’s a quick edit of the existing script that adds multiple fill colors, and the option to bake the dots (note: the component preview must be enabled to bake):


240727_DrawBakeTextDots_00.gh (7.8 KB)

3 Likes

Thank you very much. This solves only half of my needs. It is possible to bake as Surfaces instead of Dot text? I do need to print this Dots and they looks very small on paper even if I increase the font size.

I’d recommend starting a new topic.

2 Likes

I’m just seeing this now, because I was trying to remind myself how to do the depth testing. I ended up re-discovering the solution in my own code.

I’m really surprised no one has mentioned that within the DrawViewportBrep or Wires overrides you can turn depth testing on and off for drawing of certain things.

args.Display.EnableDepthTesting(false);
args.Draw…something that should be in front…
args.Display.EnableDepthTesting(true);

1 Like

Hi @AndersDeleuran
Your script is fantastic, but I noticed one issue. When toggling “Draw preview for selected geometry only” image, the dots don’t disappear, as expected.

Thanks for this tip!

Was having difficulty using DrawForeground because I thought it handled this automatically but actually glad to know this as one can control each draw more nuanced. Like points coming through but surfaces not, for instance.

Cheers!

I just tried editing the script I posted above, but that does not appear to work here, at least:


240727_DrawBakeTextDots_00_EnableDepthTesting.gh (7.2 KB)

Maybe you can elaborate/provide a working example?

Ah yes, I never noticed that. One can add an additional conditional statement here to prevent that:


250106_DrawBakeTextDots_00.gh (6.9 KB)

1 Like

It looks like you’ve figured out the issue from your next post, yes? I think also you are working with a cube that is within the Rhino model itself, and I should note that when I was doing this all my geometry was coming through the GH component. That could cause different behavior.

I might be misunderstanding, but I thought you were posting an alternative to implementing the DrawForeground or DrawOverlay methods. Which I then tried and it did not appear to work. My second post was addressing a secondary/later issue.

Hi,

Current issues with TextDot display are fixed on the current WIP and will be available on next 8.17

2 Likes