Display Text object from Cluster

Hi guys,

I am using overridden DrawViewportMeshes to draw Draw3dText.
When defined in script component - text is displayed, but when Component is converted to Cluster - it disappears.

Where is the problem?
this is most probably question to @DavidRutten but maybe somebody else can help.

I see that DrawViewportMeshes is even not called. Hm…


1 Like

Stuff inside clusters is not typically included in the preview, unless you specifically enable the preview of cluster contents. Is that option enabled?

Thanks @DavidRutten

I have activated Preview but it still doesn’t work. I mean - I still see that DrawViewportMeshes is not called…
Any other issues?


Found it,
internal component inside Cluster was not Preview Enabled. So, both (Cluster and component inside) should be Preview enabled to see objects drawn by DrawViewportMeshes.

One more question: as I mentioned about DrawText3D - how can I apply the same alignment as for TextEntity object?
For text entity I am using the following:

curtxt.TextHorizontalAlignment = TextHorizontalAlignment.Center
curtxt.TextVerticalAlignment = TextVerticalAlignment.Middle

Idea is to use the same plane for every text.


I think in Rhino6 there’s more options for this, but in Rhino5 you’ll have to create the text on the world XY plane, measure it’s bounding-box and then adjust the plane to position the text where you want. You have to do it all yourself.

Thanks for fast reply.
Actually, I am working in WIP. What does it change? In Text3d there is no new methods for alignment.
I have tried the approach with BB, however it seems that bb is not considering Font properly.
In case if I am performing shifting of bounding box with L/2 and H/2 - text is not in the middle as I want.

Would be great if TextHorizontalAlignment and TextVerticalAlignment could be added as properties to Text3d.


Rhino6/Wip has entirely new text rendering. There’s also been lots of work on rich text and stuff like alignment. However I don’t know how much of this -if any- has made it into RhinoCommon by now.

@stevebaer, do you know how to draw 2d/3d text with alignment settings?

We haven’t added alignment versions of text drawing to RhinoCommon. Please add a YT request for this if you need one.

Hi @stevebaer
Can you guide how to add a request?

I definitely need this option in RC, and I guess it can be useful for others as well.


You can add requests here:

Sorry, I didn’t mean to burden you with that responsibility. I was asking David to create a YT issue.
I was just about to make an issue for this and see you beat me.

Hi @stevebaer,

I see that text alignment is not working yet.
When is this feature supposed to be fixed?


The functions exist in RhinoCommon in SR4 with alignment options. They worked for me when I first worked on the code, but the issue was reopened when Giulio tried to test them because they weren’t working for him.

I don’t have a decent schedule for you at the moment, sorry

Ok, thanks @stevebaer

Exactly the same for me - I can see method supported but using of different alignment options bring no difference.

RH-38784 is fixed in the latest Service Release Candidate

Hello @brian and @stevebaer
Thanks for fixing it.

I did a comparison with Text command in Rhino and I still see a difference.

Blue one is the text generated with Rhino, Red one - showed via Display.Text3D
Both are using same origin, alignment and Font.

It seems that alignment of multi-line text is not supported, right?
See comparison below:

Blue is the one from text command, dark blue is the one from Display.Text3D

Could somebody check this?


Thanks, that’s logged as RH-46016.