Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

FreeCAD.Units

Quantity parsing, units and number formatting.

Generated page. tools/api_docs.py reads this surface from the module itself. Do not edit it by hand.

FreeCAD.Units — the units facade.

Functions

FunctionSummary
listSchemas(*args)Return the full schema tuple, or one schema name by index.
parseQuantity(expression)Parse a unit expression into a :class:Quantity.
schemaTranslate(quantity, schema)Translate a quantity into another schema’s textual pieces.
toNumber(value, format='g', decimals=0)Format a number or Quantity as a string.
translateUnit(expression)Return the value of expression in internal units.

Class NumberFormat

Format codes accepted by toNumber.

MemberSummary
Fixed (attribute)—
General (attribute)—
Scientific (attribute)—

Class Quantity

MemberSummary
Format (attribute)—
Unit (attribute)—
UserString (attribute)—
Value (attribute)—
getValueAs(unit)—
toStr()—
value_in(unit)—
value_mm()—

Class Unit

Values

NameSummary / value
Radian57.29577951308232 deg