SCRIPTS4ALL

Txt2Sketch

smooth text for CATIA V5


Have you ever tried to work with text in CATIA V5 Part Design?

Yes? Then you already know that text is not directly supported in CATIA V5 parts. Unlike other CAD systems CATIA V5 does not have built-in feature to work with text. You have several options, either to use third-party applications or workarounds (usually importing text from external source) but neither is without drawbacks. Third-party applications usually do a good job but you have to pay some money for licenses, using workarounds you struggle with performance issues during rendering and sometimes you even need an external application to create text for you and store it in supported format.


Are there other options?

Yes, definitelly. And our Txt2Sketch application is one of them.


Main Features

  • Works with TrueType fonts installed on your system
  • Works with Unicode characters like: ! @ # $ % ^ & * © ® Ř §
  • Works also with collection of free to download ttf fonts from web
  • Produce text as set of lines and splines within a sketch
  • You can check result (and find possible interferences) on a Preview Tab before exporting it to CATIA V5
  • Option to set the number of points per spline
  • You can refine resulting shape by using smoothing algorithm
    • Join tangencial splines into one spline
    • You have an option to define Maximum tangential deviation

Options

Font Family, Font Style

Easy, choose a Font family you like to use as well as Font style e.g. regular, bold, italic. All properly installed fonts should be available.

Font Size

Font size is calculated in mm, based on the shape of capital letter "T". When size is set to 50mm, then size of capital "T" from top to bottom will be 50mm in sketch.

Points per Spline

Number of control points specifying a spline in sketch. Minimum is 3 points (startpoint, end point and 1 control point), maximum is limited to 50. More points slows down the performance of sketch creation, please keep it in reasonable range.

Smoothing

If checked, tangencial curves in sketch are joined into one and result is smoother. Work closely with Max Tangency Deviation option

Max Tangency Deviation

Maximum deviation between tangencial vectors of 2 curves in their common point. Curves below this limit value will be considered as tangencial and joined into one spline in catia sketch


Gallery

Txt2Sketch Application

User interface is very simple. There are two tabs, Main tab and Preview tab. In Main tab you can set all options like text, font properties (Font family, Font Style and Font size) and options like Points per Spline, Smoothing and Max Tangency Deviation which are responsible for quality and smoothness of the result. On Preview tab you can check result before exporting to CATIA. You can see whether font is suitable for work in CATIA, if there are no autocrossing or opened profiles or intersections in between letters. Not all fonts allows you to apply standard CATIA features like Pad or Pocket without generating errors, but most of them works without troubles. In this tab you move geometry with left mouse button, middle button is used for zooming.


  • Main App Window
    Main window of Txt2Sketch application.
  • Preview Tab
    Preview tab where you can check result before exporting to CATIA.

Dxf import vs. Txt2Sketch

One of methods for text creation in CATIA V5 is to create text in CATIA drawing, save it as .dxf file, open .dxf file and copy text from drawing directly to CATIA sketch. Unfortunatelly during dxf export curves are flattened (replaced by polylines), result is rough and rendering process is slow. But even more surprising is file size. Using word "Smooth" and "Heavy heap" as Font family in our example it was 2 857 KB for dxf import and only 838 KB for Txt2Sketch. Using Txt2Sketch smoothing we got down to 448 KB!. Check below to compare results visually.


  • Dxf import
    Dxf import with lot of redundant lines because of flattening
  • Txt2Sketch
    Txt2Sketch
  • Txt2Sketch & smoothing
    Txt2Sketch & smoothing algorithm

Not enough Fonts? Get more

Txt2Sketch works with any installed TrueType (ttf) fonts. There are plenty of amazing fonts available, lot of them free to dowload and free to use. In our example we used Font Awesome from here, Grunja from here and Poultrygeist from here.


  • Font Awesome
    Font Awesome, the iconic font and CSS toolkit
  • Grunja font
    Grunja from Apostrophic Labs
  • Poultrygeist
    Poultrygeist from Apostrophic Labs