Hey.
I have written a small python script for previewing text as curves in the rhino viewport, and then when toggled, bake the text as text objects so that they can be further edited in Rhino/Illustrator/etc. The script works fine on PC, but the preview is broken on Mac seemingly due to a broken rs.ExplodeText function? rs.AddText works although it doesn’t seem to automatically detect changes to the variables and re-compute and add the new text. When called from within an if statement it is however no problem. ie:
if BAKE == True:
bakeText = rs.AddText(text, plane, height, font, font_style=0, justification=None)
Below here is the small script working on PC but not on Mac, and attached is an example file with the GHpython component:
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
sc.doc = Rhino.RhinoDoc.ActiveDoc
crvsList = []
textCrvs = rs.ExplodeText(rs.AddText(text, plane, height, font, font_style=fontStyle, justification=None), True)
if textCrvs:
for i in textCrvs:
crvsList.append(rs.coercegeometry(i))
rs.DeleteObject(i)
else:
print "error creating textCrvs"
if BAKE == True:
bakeText = rs.AddText(text, plane, height, font, font_style=0, justification=None)
BakeAsText2.gh (6.0 KB)
Is it me doing something wrong or is the rs.ExplodeText really broken for Mac? I really need some help with this, and I’d be super grateful for any pointers or comments on whats up with this!!