I’ve been writing a few python scripts now again but I’ve never questioned which package is most appropriate to use until I came across two different approaches to generate curves from text with a big difference in calculation time.
The first example with Rhino is very fast to compute - 45ms:
import Rhino as rc preText = rc.RhinoDoc.ActiveDoc.Objects.AddText(text, location, text_height, font, True, False) postText = rc.RhinoDoc.ActiveDoc.Objects.Find(preText) textCrvs = postText.Geometry.Explode() rc.RhinoDoc.ActiveDoc.Objects.Delete(postText, True) crvs = textCrvs
However, the second example with rhinoscriptsyntax takes forever at 2.6s:
import rhinoscriptsyntax as rs geoList =  preText = rs.AddText(text, plane, height, font) textGeo = rs.ExplodeText(preText, True) for i in textGeo: geoList.append(rs.coercegeometry(i)) for i in textGeo: rs.DeleteObject(i)
Can someone clarify what’s going on? How does one decide to use Rhino vs Rhinoscriptsyntax?
text2curve.gh (6.9 KB)