Grasshopper

algorithmic modeling for Rhino

The code below is from a Guilio Piacentino component:

TextEntity text = new TextEntity();
TextJustification textj = new TextJustification();

text.FontIndex = doc.Fonts.FindOrCreate(face, Bold, Ital);
text.Text = Text;
text.Plane = Loc;
text.Justification = textj;
text.TextHeight = Size;

A = text.Explode();

I'm not very familiar with C#.  How can I adapt this to get the text and not the text outline?

The problem I'm trying to solve is to get better text outline in Illustrator for laser cutting.  The output from Giulio's component have kinks in the baked geometry.  I want to bake the text and export to AI where the text outline are smoother.

Views: 2492

Replies to This Discussion

Hi Tuan,

Check the attached file for baking text to Rhino.

Attachments:

exactly what i needed.  thanks!!!

is there a way to have the text output to A without baking?  i want to keep in in the GH pipeline so I can group the text with some other geometry.

Grasshopper currently does not support text entity objects. So as an output in grasshopper, you can either have list of curves (made from exploding of Rhino text - that's what Giulio's upper component is doing), or just a string from which text is created. If you are looking for the second option, check the attached file.

Attachments:

Here is the C# version of the baketext code. Just in case someone else need it.

Attachments:

It was great, thank you

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service