Invalid text lines via grasshopper text tags

Hi, I’m working on a laser cutting which needs seperate names and numbers per element. I found a useful script here: UMN Digital Design - Creating Vector Text in Grasshopper (for laser or CNC output) , and fixed an error: Error (BC30561): ‘Font’ is ambiguous and imported from the namespaces or types ‘System.Drawing, Rhino.DocObjects’. (line 82) with this thread as my guide.

I now do get text output, but the curves are not closed, preventing me from hatching the text later on. This happens with multiple fonts, but as my python nor my grasshopper skills are not that great I cannot find where this is going wrong. Is it a font problem or is it because something is missing in the script?


GH texts.gh (18.5 KB)

Hi @user1150,

You might have a look at these RhinoCommon methods:

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Curve_CreateTextOutlines.htm

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_TextEntity_CreateCurves.htm

– Dale

Hi Dale, thank you for your help! I was not able to work it out completely, but through your links I was able to find something else that worked for me!

Thank you for your time!