What Is the FreeCAD Draft ShapeString Tool?
This article provides a comprehensive overview of the Draft ShapeString tool in FreeCAD, explaining its primary function, configuration, and practical applications. The Draft ShapeString tool is the standard method for generating 2D planar text geometries from font files within FreeCAD. By converting typographic glyphs into parametric wire and face shapes, it enables users to seamlessly incorporate text into 3D engineering models for engraving, embossing, labeling, and manufacturing.
The Primary Purpose of Draft ShapeString
In parametric CAD software, standard text annotations—such as those used in technical drawings—exist only as visual metadata and cannot be directly converted into solid 3D geometry. The Draft ShapeString tool solves this problem by generating actual CAD boundary representations (compound shapes of wires and planar faces) that outline each character of a text string.
Because the output is true geometric data rather than a simple font display, it can be mathematically manipulated, extruded, transformed, and combined with other CAD features.
How It Works
To generate text geometry, the Draft ShapeString tool requires four primary inputs:
- Point: The 3D coordinates defining the base placement or insertion point of the text string.
- String: The actual alphanumeric characters or symbols to be generated.
- Font File: A direct file system path to a valid
font file (typically
.ttf,.otf, or.pfb). FreeCAD uses this file to parse vector contours for each character. - Size: The baseline height of the characters, defined in standard model units (such as millimeters or inches).
Additionally, users can adjust tracking parameters to increase or decrease the spacing between individual glyphs.
Common Use Cases in 3D Modeling
Once a ShapeString object is created, it acts as a 2D profile ready for downstream 3D modeling operations:
- Embossing and Engraving: By combining the ShapeString with the Part or Part Design workbenches, users can extrude the text into a 3D solid. This solid can then be joined with a base part (embossing) or subtracted using a boolean cut (engraving).
- Part Identification: Adding serial numbers, part numbers, version indicators, and regulatory markings directly onto physical parts meant for 3D printing, CNC milling, or injection molding.
- Dial and Scale Markers: Positioning alphanumeric indicators alongside scale ticks on measuring equipment, control panels, or instrument faces.
Best Practices and Limitations
- Direct Font Path Requirement: FreeCAD does not use an OS-level font picker for ShapeStrings. You must navigate directly to the specific font file on your disk.
- Font Compatibility: Complex script fonts, overlapping cursive letters, or fonts with non-manifold self-intersections can cause boolean operation errors when extruding. Clean, geometric, sans-serif TrueType fonts are recommended for reliable solid modeling.
- Workflow Integration: To use a Draft ShapeString inside a PartDesign Body, it must typically be linked using a Sub-Shape Binder or extruded in the Part workbench and integrated via boolean operations.