Units/fr: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
Line 60: Line 60:
==Voir aussi==
==Voir aussi==


<div class="mw-translate-fuzzy">
* La page [[Expressions/fr#Unit.C3.A9s|Expressions]] pour une liste de toutes les unités connues.
* La page [[Expressions/fr#Unit.C3.A9s|Expressions]] pour une liste de toutes les unités connues.
* La documentation de [[Quantity/fr|Quantity]].
* La documentation de [[Quantity/fr|Quantity]].
* L'outil [[Std_UnitsCalculator/fr|Std Convertisseur d'unités]].
* L'outil [[Std_UnitsCalculator/fr|Std Convertisseur d'unités]].
* [[Unit_Management_System_Proposal|Unit Management System Proposal]].
* [[Unit_Management_System_Proposal|Unit Management System Proposal]].
</div>





Revision as of 14:05, 4 June 2022

Un peu de lecture sur les unités :

Exemples

# -- 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és supportées

Une liste complète de toutes les unités prises en charge peut être trouvée ici.

Voir aussi