Hi,
I’m running into an issue where transforming a TextEntity with a scaling transform does not work:
Both the text and the rectangle are transformed with the same matrix, yet the text height does not change.
Am I missing something or is this a bug, see code below to test:
Thanks
-Willem
import Rhino
import scriptcontext as sc
text_geom = Rhino.Geometry.TextEntity()
text_geom.TextHeight = 100
text_geom.Text = 'foo-bar'
bbox = text_geom.GetBoundingBox(True)
box_poly = Rhino.Geometry.PolylineCurve([bbox.Corner(0,0,0) , bbox.Corner(1,0,0), bbox.Corner(1,1,0), bbox.Corner(0,1,0), bbox.Corner(0,0,0)])
text_id1 = sc.doc.Objects.Add(text_geom)
print 'text_geom.TextHeight ',text_geom.TextHeight
box_id1 = sc.doc.Objects.Add(box_poly)
xform = Rhino.Geometry.Transform.Scale(Rhino.Geometry.Point3d(200,200,200), 0.3)
_ = [geom.Transform(xform) for geom in [text_geom,box_poly]]
print 'text_geom.TextHeight ',text_geom.TextHeight
text_id1 = sc.doc.Objects.Add(text_geom)
box_id2 = sc.doc.Objects.Add(box_poly)