Wandering insertion points for TextObjects?

I’m working on a coliseum-like data viz model.

In it, I would like to place text objects that represent what each pillar represents around the outside of the model (hopefully my screenshots will explain what I’m trying to do better than I can).

I’m placing text objects around a circle’s circumference based off a lovely script by Helvetosaur. The function is as follows:

def AddTextObjectAsCurves(x_pos, y_pos, z_pos, the_author):
text = the_author
insPt=Rhino.Geometry.Point3d(x_pos,y_pos,z_pos)
commStr="-_TextObject "
commStr="-_TextObject _GroupOutput=_Yes _FontName=Arial "
commStr+= "_Height=" + "1" + " "
commStr+="_Italic=_No _Bold=_No "+str(text)+" _Output=_Curves "
commStr+="_AllowOpenCurves=_No _LowerCaseAsSmallCaps=_No "
commStr+="_AddSpacing=_No "+ text +" "+str(insPt)

text_test = rs.Command(commStr, False)
#rs.RotateObjects(objs, insPt, 90, (0,1,0), False)
#rs.RotateObjects(objs, insPt, 90, (1,0,0), False)

This works fine, except if I pan around at all while the script is executing, my TextObjects wander around.

Here’s a close-up of the desired behaviour/placement:

If I pan around at all, or sometimes even just move my mouse without clicking at all, my text travels in seemingly random patterns. The image below is the full top-down view of the model. The dark lines within the circle are misplaced text. They are not aligned at the correct x, y or z level.

My question is: is this proper behaviour? It’s a bit frustrating to have my objects jump around, especially as a serial panner. I’m still learning Rhino and all the scripting that comes with it, so I apologize if this is something I should know.

Are the insertion points physically in the wrong place? If you Analyze>Point and hit the text insertion point, are the coordinates correct?

Because what you’re describing seems more like a display problem rather than a geometry problem. Once objects are placed, they don’t “move around” when panning or zooming… Unless… Are your objects very far from the origin? Your second image seems to indicate that your text objects are extremely tiny compared to the circle, or the circle is huge…

Can you post the file that exhibits the problem? Plus your video card and drivers might be helpful.

– Mitch

Thank you for your response!

It seems like you might be right about this being a display problem rather than a coordinate problem. If I hit Analyze>Point on a point that seems way off on the z-axis, it logs as at 0 on both world coordinates and cplane coordinates (provided I’m not somehow missing the text object).

However, the difference is quite dramatic.

Here’s a full-screen shot of the pillars on a fresh launch of Rhino when I kept a purely “hands-off” approach while it drew:

And here’s what happens if I pan around mid-drawing process:

The x, y and z positions passed to the text are the same as those passed to the functions that draw the pillars.

How can I be sure that this is simply a display problem? Should I render it and open it in another program?

Oh, and, yes, the points are semi-far from the origin. I’m also using Rhino 5 on a Windows platform right now.

And I can certainly post the file if that will be helpful. I’m reading data from a large database so it won’t be run-able on your end.

I’m running off a Bootcamp-ed Mac if that’s relevant.

Please post at least a portion of the Rhino file that exhibits the problem. The script file is not necessary.

–Mitch

I deleted most of the elements in the file other than a small selection of the TextObjects and one of the rings the text is more or less supposed to go around.
I also found that it doesn’t matter if I pan or not, I experience the problem if I’m not working in a “fresh” launch of Rhino (i.e. I get screwy text if I’ve done anything with Rhino other than RunPythonScript).
I apologize for the large file size.

Edit: Despite getting my file down to below the limit, I can’t seem to upload the .3dm file. The upload percentage is shown for a while and then just stops.

Knock on every even remotely wood-like object, I think I’ve figured out what I was doing wrong.

(If this is a noob-ish realization I apologize but thought I should document it just in case).

Anyways, I’ve only ever used RhinoScript and Rhino Common commands and not rs.Command-type commands for drawing geometry. I didn’t realize that drawing with rs.Commands means that I’m writing in CPlane-relative variables rather than world construction variables.

So long as I have the top plane selected before running my draw text command, everything runs peachy. Lesson learned, sorry for wasting anyone’s time!

Good you found the cause.
you can pass world coordinates in commands by passing them preceded by a w.
“w30,5,6”

HTH
Willem