4 posts
emilio morello (emilio) wrote:
Hi
my Python script builds a TextEntity object and then tries to get its bounding box:
pla = Rhino.Geometry.Plane.WorldXY
pla.Origin = Rhino.Geometry.Point3d( 50, 50, 0 )
tex = '12345678'
hei = 10
jus = Rhino.Geometry.TextJustification.None
ftable = Rhino.RhinoDoc.ActiveDoc.Fonts
findex = ftable.FindOrCreate( 'Arial', False, False )
texent = Rhino.Geometry.TextEntity()
texent.Justification = jus
texent.FontIndex = findex
texent.Plane = pla
texent.TextHeight = hei
texent.Text = texbox = texent.GetBoundingBox( False )
but the bounding box has zero height and width
I have to add the text to the Rhino document and get back its TextEntity object to get a working bounding box
Is this expected behaviour ?
Or am I making mistakes in building the object ?