Le unità di misura
Alcune letture sulle unità di misura:
- Metrologia
- Sistema Internazionale di Misura SI
- Sistema imperiale britannico
- SI derived unit (in italiano si trovano nella stessa pagina del SI)
- Grado d'arco - Unità angolari
- Unità implementate in OCC
Esempi
# -- some examples of the FreeCAD unit translation system --
# make a shortcut for the examples
pq = FreeCAD.Units.parseQuantity
# 10 meters in internal numbers
pq('10 m')
# doing math
pq('3/8 in')
# combined stuff
pq('100 km/h')
# transfer to other units
pq('100 km/h')/tu('m/s')
# derived units (Ohm)
pq('m^2*kg*s^-3*A^-2')
# or
pq('(m^2*kg)/(A^2*s^3)')
# angles
pq('2*pi rad') # full circle
# as gon
pq('2*pi rad') / tu('gon')
# more imperial
tu('1ft (3+7/16)in')
# or
pq('1\' (3+7/16)"') # the ' we have to escape because of python
# trigonometry
pq('sin(pi)')
# Using translated units as parameters, this command will create a 50.8mm x 20mm x 10mm box
b = Part.makeBox(pq('2in'), pq('2m')/100, 10)
Unità supportate
Un elenco completo di tutte le unità supportate si trova quì.
Vedere anche
- La pagina Espressioni per una lista dei tutte le unità conosciute.
- La documentazione Quantity.
- Lo strumento Convertitore di unità.
![](https://wiki.freecad.org/images/thumb/8/8f/Power_user_hub.png/24px-Power_user_hub.png)
- FreeCAD scripting: Python, Introduction to Python, Python scripting tutorial, FreeCAD Scripting Basics
- Modules: Builtin modules, Units, Quantity
- Workbenches: Workbench creation, Gui Commands, Commands, Installing more workbenches
- Meshes and Parts: Mesh Scripting, Topological data scripting, Mesh to Part, PythonOCC
- Parametric objects: Scripted objects, Viewproviders (Custom icon in tree view)
- Scenegraph: Coin (Inventor) scenegraph, Pivy
- Graphical interface: Interface creation, Interface creation completely in Python (1, 2, 3, 4, 5), PySide, PySide examples beginner, intermediate, advanced
- Macros: Macros, How to install macros
- Embedding: Embedding FreeCAD, Embedding FreeCADGui
- Other: Expressions, Code snippets, Line drawing function, FreeCAD vector math library (deprecated)
- Hubs: User hub, Power users hub, Developer hub