This macro makes use of the Draft ShapeString tool to create a text line placed in different circular orientations, including circumferential and helical (in the fashion of a Trajan Column). It can also be used to create a clock face with Arabic numerals 1, 2, 3, etc., or Roman numerals I, II, III, etc.
Macro version: 0.24d Last modified: 2026/10/11 FreeCAD version: 0.19 and more Download: ToolBar Icon Author: Mario52
This macro makes use of the Draft ShapeString tool to create a text line placed in different circular orientations, including circumferential and helical in the fashion of a Trajan's Column. It can also be used to create a clock face with Arabic numerals 1, 2, 3, etc., or Roman numerals I, II, III, etc. This latter usage was inspired by the Forum thread Macro to Create Clock Face by FC community member, cblt2l.
Temporary code for external macro link. Do not use this code. This code is used exclusively by Addon Manager. Link for optional manual installation: Macro
# This code is copied instead of the original macro code
# to guide the user to the online download page.
# Use it if the code of the macro is larger than 64 KB and cannot be included in the wiki
# or if the RAW code URL is somewhere else in the wiki.
from PySide import QtGui, QtCore
diag = QtGui.QMessageBox(QtGui.QMessageBox.Information,
"Information",
"This macro must be downloaded from this link\n"
"\n"
"https://gist.githubusercontent.com/mario52a/a25e802498bae6959335/raw/39bfcbdad0771e7709effa87f7155b8bbbb0e151/Macro_FCCircularText.FCMacro" + "\n"
"\n"
"Quit this window to access the download page")
diag.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
diag.setWindowModality(QtCore.Qt.ApplicationModal)
diag.exec_()
import webbrowser
webbrowser.open("https://gist.githubusercontent.com/mario52a/a25e802498bae6959335/raw/39bfcbdad0771e7709effa87f7155b8bbbb0e151/Macro_FCCircularText.FCMacro")
Example of the macro displaying text in a 360 degree orientation
Usage
Launch the macro folder FcString for created characters and a file FcClock for created clocks.
All the characters are and remain independent. When creating extrusions nothing is deleted. If a Compound is created with Run Comp it is copied out of the folder.
The options are shaded by default and are active in all functions if they are checked :
Extrude Char.
Placement.
SP. inclination.
Except for one Clock Service Placement box Z is activated and moves the text in the direction Z to place the text on the support surface.
Notes
This macro will gray-out (deactivate) options that are not relevant for a selected function.
Interface
Overview
First section
TextEdit window that lets you copy the text to display (click on the Reset allows to know the number of the input string that is displayed in the window title)
The Reverse button reverses the text (ex: FreeCAD.the.best. → .tseb.eht.DACeerF)
The Inverse button invert the text (ex: FreeCAD.the.best. → .best.the.FreeCAD)
Word checked, this option consider the text as word, the text is cut on space and write the text word by word (instead character by character in normal use)
The Color button color the shape
(97/395) C:/Windows/Fonts/DejaVuSansMono-BoldOblique.ttf: display the position/number of fonts, the path and name of file font
Other button for search the font in other directory in case all directory is not discovery automatically
ComboView to choose the font
Origin return to origin system font path ex: "C:/Windows/Fonts/"
Default ARIAL.TTF
Available options
After the first use, you must modify the following parameters:
User parameter:BaseApp/Preferences/Macros/FCMmacros/FCCircularText
switchModeTextList
0 = normal text mode (and black) cuts the switchFontComBox
1 = allows switchFontComBox 1
switchFontComBox
0 = (and switchModeTextList= 1) text mode (in color) in ComboBox list, faster
1 = (and switchModeTextList= 1) fontFamily, slower but more beautiful ComboBoxst!
Mode Stand or Mode Flat : The text will be placed standing or flat (same as clock) options Outdoor and Indoor are reversed.
Mode StandOutdoor The text will be written up.
Mode FlatOutdoor The text will be placed flat.
Mode FlatIndoor The text will be placed flat.
Mode StandIndoor The text will stand registered (same as clock).
Second area
This section allows you to configure the overall behavior of characters in all the choices available but with some variation.
If the command is not used in the chosen option, it will be grayed out.
10.0 mm Radius of circle : Radius of the circle. (Default 10)
2.0 mm Size character : Character height. (Default 2)
0 deg Begin angle : Starting angle of the first character in the circle. (Default 0°)
360 deg End angle : End angle of the last character of the text. (Default 360)
10.0 deg Correction angle : Character correction angle to make it tangent to the circle. (Default 10°)
0.15 mm Correction radius : Fixed the radius of the circle characters (optional). (Default 0.15)
Bottom-Center Justification : Justification of the characters
-0,30 mm (Tracking) Tracking : Tracking between 2 characters only available with the Word mode
Placement : Text placement in the 3D view. (Inactive, Default)
Sp. inclination : Inclination of characters in three axes X, Y and Z (example to cover such a cone). (Inactive, Default)
Outdoor
Default mode. The text is written on the outside of the circumference of the circle.
Outdoor
Indoor
The text is written on the inner side of the circumference of the circle
Indoor
Helix
The text is entered on the outer circumference of a helix.
Helix
The helix area is hidden by default. The window is visible if the radio button Helix is checked.
All characters configuration options are available.
Step of helix which corresponds to the pitch of the helix turns and displays 2 (character height) by default.
Char. per turn activates and displays 10 by default, which corresponds to 10 characters per helical turn.
If Step of helix (helix pitch) is zero, Spinboxes Base Helix and End Helix are activated.
Base Helix provides the basis for starting the helix (even Placement Z). If 'Placement Z' is different from zero, the starting point is added to Z Placement
End Helix End of the helix pitch of the helix will be calculated relative to the height and the number of characters per helical turn.
Clock
The figures are part of a circle with Arabic numerals or Romans.
Clock
Axial
Redress
By default, the section is hidden. The window is visible if the radio button Clock is checked
When the selection is made, the following functions get dark and are usable:
Begin angle.
End angle.
Correction angle.
Correction radius.
The button Mode Stand or Mode Flat.
The area Clock is activated.
Radius of support : If a value is given, support will be created (default 0).
If Support number face is different from zero a support is created. (If Extrude support = zero then a face is created).
1 = A circle is created (circle appears).
2 = A rectangle is created (length = (Radius of media * 1.5) width = Radius of support) (Rectangle appears).
3 = A triangle is created (circumscribed) (Triangle appears).
4 = A square is created (Radius of support) (Square appears).
5 = A polygon with the number of faces displayed (circumscribed) (Polygon appears).
Extrude support is activated and an extrusion dimension can be given.
If Support number face is equal to zero there is no support.
Mode Roman : The writing will be in Roman figures I II III IIII V VI VII VIII IX X XI XII
Axial : The figures will be written axially.
Path section
The title section changes and displays the length of the selected wire.
If you select one wire, arc, circle, line or edge the section Path is coloured in green and the unused command is coloured in red
Orthogonal the character is Orthogonal to the view
Tangent the character is Tangent to point path on wire
Reverse wire the wire selected is "duplicate" one bspline is created and the Points BeginEnd are inverted and the direction of line is displayed the original object is hidden an restored after the operation finished
Delette text the text information Begin End of the latest creation is erased
the last used Radio Button is saved in the parameters of FreeCAD
Generator section
Integer: The data is Integer
Float: The data is Float
Unicode: The data is Unicode begin 32 to ... (0 to 31 are characters used by the system)
pi: The value of pi with X decimals
0,0000 (Integer) : Generator. For validate the first number, click the Return button or
for begin on click to 0 go to the preference option:
Tools → Edit parameters
User parameter:BaseApp/Preferences/Macros/FCMmacros/FCCircularText
change the parameter setDS_Generateur_Begin to -1"
1,0000 (Step) : Step of the generator
Characters separation (1): Characters to insert between each click increment or decrease generator, the number of character(s) is displayed
Clear generator: Clear the generator return to 0
Text: Result of the generator, all entry are concatenated only the pi erase the result without concatenation
You can concatenate after the pi entry
1 (Repetition) : the result is repeated X times
Ok: Validate the generator result
Clear lineEdit: Clear the lineEdit result
Command section
Points: Create one Draft Point at the base point of the character (the serial points is saved in the separate group)
Circle: Create on Draft Circle limit of the radius given.
BoundBox: Create the boundBox for each character.
Progression: Progression of the creation of the characters (the new version stay visible ?).
Reset: Reset all values and displays the number of characters displayed in the window.
Reset: The reset is performed for each character, if this option is checked no reset is performed,
if the result give errors or not give the expected result is corrupt: uncheck the checkBox click the Reset Button or close and restart the FCCircularText macro
Free: Mode free.
Del: Delete the last task performed
Run: Launches the macro, the characters are separate and saved in a directory.
Run + Comp: Launches the macro (characters are separate and saved in a directory) and creates one unique Compound object of all characters.
The Help button displays the wiki page in the FreeCAD browser
Exit: Leaves the macro (bye).
Parameters available
Certain parameter are available in the parameters of FreeCAD, see: Menu → Tools → Edit Parameters
User parameter: BaseApp/Preferences/Macros/FCMmacros/FCCircularText
switchModeTextList :
false normal text mode (and black) turns off switchFontComBox
true allow switchFontComBox 1 (default)
switchFontComBox :
false (and switchModeTextList = 1) text mode (in color) in Faster ComboBox list (default)
true (and switchModeTextList = 1) font Family in ComboBox list, slower but more beautiful!
setSystemFonts :
false matplotlib.font_manager.findSystemFonts ("C: /", "ttf") do all fonts (in all folders and subfolders of the HD) time !!
true fontman.findSystemFonts (self.pathFont) make all the fonts in the directory (and in all the subfolders) (default)
Note it is possible that an error may occur between versions. Please post the issue on the forum and wait for the updated fix or rollback to a previous version of the macro. Thank you.)
It is possible that two characters may overlap. If this happens, here's a workaround available using the Rotate-To-Point Macro.
Character overlap issue and the workaround
(not fully developed)
Planned:
Writing circular text on a path of the selected position object.
Change log
ver 0.24d 2026/10/11 : correction 0.24b: 4653, 4594, 4821 by Direction thanks
ver 24c 2026/10/03 : return to (code) instead the FreeCAD command Gui.Selection.clearSelection(), give error if one object is selected
# deselectionner tous les objetstry:forobjinFreeCAD.ActiveDocument.Objects:# deselectionne toutFreeCADGui.Selection.removeSelection(obj)exceptException:None
ver 0.24b 2026/09/29 : add create and reverse wire (create one bspline and reverse the Points), modify convert_Int_To_RGB case INT = 0
ver 0.24 2026/09/25 : add Generator of characters option
ver 0.23b 2026/09/13 : correct link to the images Path Base/orthogonal !!!
ver 0.23 2026/09/13 : add justification, tracking, inverse, option color
ver 0.22f 2025/09/25 : return to PySide, adding info for use of the MONOSPACE font
ver 0.22e 2024/07/11 : delete "ss.support = None"
ver 0.22d 2024/07/11 : delete "import WebGui" cause error in 0.22xxx FC and replaced by "import webbrowser"
ver 0.22c 2023/11/17 : adding restore selection after delete the last object , by TheMarkster , thanks
ver 0.21 2022/05/31 : adding button search other path fontmanuelly, and button return font origin of system
ver 0.20 2021/04/05 : adding icone in macro, Tab for diminish the heigth of the macro, remove all dimensions of widgets now fully compatible with the stylesheet, revisite the search version for compatibility and other little change.
ver 1.19 2021/03/15 : adding button Delete the last object created and the code FreeCAD.ActiveDocument.openTransaction("FCCTc") for Undo/Redo system
Adding CheckBox Reset for switched/activated (requested by users) the natural reset after all push button Runand Run comp. This use checkBox is not advised, is you constade one malfunction pusch the Reset button or quit FCCircularText and restart.
#### Test FreeCAD.Version simple ############################################################################################################ifint(FreeCAD.Version()[1])<18:# Version de FreeCADFreeCAD.Console.PrintMessage("This version "+__Title__+" rmu work with the FreeCAD 0.18 or higher."+"\n\n")FreeCAD.Console.PrintMessage("For the precedent version see the page "+"\n\n")FreeCAD.Console.PrintMessage("https://gist.githubusercontent.com/mario52a/a25e802498bae6959335/raw/db47f78f2b20a35137ac213b8d1a62d30f525dcb/Macro_FCCircularText.FCMacro"+"\n\n")#### Test FreeCAD.Version simple ############################################################################################################
forangleTrFloatinrange((debut*10000),(rotation*10000),int((round(((float(rotation)-float(debut))/float(nombre)),4)*10000))):# pour 4 decimalesangleTr=(float(angleTrFloat)/10000)
ver 0.10 17/05/2015 adding lines 1365, 1366 only created more clock face ?? ()
ver 0.8 10/05/2015 replace "String=texte[ii2]" to "String=unicode(texte[ii2])" line 1290. cause "TypeError: Property 'FontFile': type must be str or unicode, not QString"
# ver 0.8 10/05/2015 /_ # testing with OS :################################################################################################### OS: Ubuntu 14.04.1 LTS # OS: Ubuntu 14.04.2 LTS# Platform: 32-bit # Word size of OS: 32-bit# Version: 0.14.2935 (Git) # Word size of FreeCAD: 32-bit# Branch: master # Version: 0.16.4928 (Git)# Hash: eab159b6ee675012bf79de838c206a311e911d85 # Branch: master# Python version: 2.7.6 # Hash: d8f63bcfd10301f3d1e141cced4370f0782238d0# Qt version: 4.8.6 # Python version: 2.7.6# Coin version: 4.0.0a # Qt version: 4.8.6# SoQt version: 1.6.0a # Coin version: 4.0.0a# OCC version: 6.7.0 # OCC version: 6.8.0.oce-0.17################################################################################################### OS: Windows Vista # OS: Windows Vista# Word size of OS: 32-bit # Word size of OS: 32-bit# Word size of FreeCAD: 32-bit # Word size of FreeCAD: 32-bit# Version: 0.15.4527 (Git) # Version: 0.15.4671 (Git)# Branch: master # Branch: releases/FreeCAD-0-15# Hash: 0da2e4c45a9a259c26abd54c2a35393e1c15696f # Hash: 244b3aef360841646cbfe80a1b225c8b39c8380c# Python version: 2.7.8 # Python version: 2.7.8# Qt version: 4.8.6 # Qt version: 4.8.6# Coin version: 4.0.0a # Coin version: 4.0.0a# OCC version: 6.7.1 # OCC version: 6.8.0.oce-0.17##################################################################################################
ver 0.7 02/02/2015 suppression 2 str App.Console.PrintMessage(str(PolicePath)+"\n") to App.Console.PrintMessage((PolicePath)+"\n") that caused an error with the characters above 128 in the police path.
ver 0.6 23/11/2014 corrected "texte = unicode(self.textEdit.toPlainText())" now accept "'éèà@..."
ver 0.5 19/11/2014 Gui
ver 0.4 10/10/2014 add variable "rotation" in the loop (for i in range(0,rotation,(rotation/nombre)): # 360 a parametrer)
ver 0.4 27/08/2014 correction error of de radius (exterieur=0, debout=1)
ver 0.3 26/08/2014 add creation text of flat curve
ver 0.2 26/08/2014 add creation text of internal curve