Use when engraving or embossing text labels on FreeCAD part faces, using label/label_face.FCMacro in GUI or headless mode. Covers build_label_solid, apply_label_to_shape, and VarLabel custom properties.
Engraves or embosses VarSet variable values as text on a selected face of a body. Used to identify parts after 3D printing when doing parametric sweeps.
Modes:
VarLabel_Text feature to the document with custom properties for later automation.build_label_solid() and apply_label_to_shape() functions from the macro for use in generation scripts.Key functions:
build_label_solid(text, face, text_height, depth, emboss, font_dir, font_file) → returns list[Part.Shape] of per-glyph solids positioned on the faceapply_label_to_shape(body_shape, label_solids, emboss) → returns modified Part.Shape with text cut/fusedfind_font() → searches Flatpak, system, and matplotlib font paths for .ttf filesVarLabel_Variables — semicolon-separated list of VarSet variable namesVarLabel_Format — Python format string for the label textVarLabel_Target — target body labelVarLabel_Face — face name (e.g., Face11)VarLabel_TextHeight, VarLabel_Depth, VarLabel_Emboss — engraving parametersLimitations:
Part.makeWireString() (works in headless mode, unlike Part::ShapeString)./ for Part.makeWireString().