Text in custom pipeline behaves odd when printing viewport


I’m trying to create in my plugin a custom Pipeline that draw text tags in viewport for given shapes. When the command runs something like this appears:

Well, looks fine. However, when I try to print the viewport, the texts awkwardly get’s out of position:

Any ideas on why this is happening?

I created an example in github which replicates the pipeline functionality:

The example is really simple and is intended only to replicate the issue. The actual code is way smarter and also handles deleting the tags when the shapes are removed (which not happens in the example), but for sanity and confidentiality I cannot show the whole code.

Thanks in advance,


Hi Marcio,

Did you manage to fix it?

Without looking at the code I’d say the text ‘base point’ for drawing and printing is different.
Where the drawing is done using the text centerpoint for the printing the text starting point is used.

So first thing to check would be how the text for printing is positioned in relation to the rectangle.

Does that make sense?

Didn’t managed.

What you say makes sense indeed.

The problem is that I have no control of this as the text is just displayed in a pipeline, and it’s not actually a Rhino object in the document.

My guess is that Rhino prints pipeline text uses default positioning of the text, ignoring the positioning I set for the pipeline. I can try to set no positioning and see if both printing and viewport match and bring updates on that.

However it would be nice for the printer to grab the real positioning since this gives me way more control on it’s location.

Hi @marcio.sartorelli.so,

Does this work any better?

DisplayConduitExampleCommand.cs (3.7 KB)

– Dale

Yeah I manually adjust the positioning of my tag setting the alignment as default and it worked.

Looks like when printing a text drawn in a custom pipeline, the alignment of the text is always default when printing the drawing.