Units/es: Difference between revisions

From FreeCAD Documentation
(Created page with 'Aquí hay algunos enlaces con información sobre unidades: *[http://es.wikipedia.org/wiki/Sistema_Internacional_de_Unidades Sistema Internacional de Unidades SI] *[http://en.wiki…')
 
(Updating to match new version of source page)
 
(72 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
{{TOCright}}

<div class="mw-translate-fuzzy">
Aquí hay algunos enlaces con información sobre unidades:
Aquí hay algunos enlaces con información sobre unidades:
*[http://es.wikipedia.org/wiki/Sistema_Internacional_de_Unidades Sistema Internacional de Unidades SI]
*[http://es.wikipedia.org/wiki/Sistema_Internacional_de_Unidades Sistema Internacional de Unidades SI]
Line 4: Line 8:
*[http://es.wikipedia.org/wiki/Unidades_derivadas_del_Sistema_Internacional Unidades derivadas del Sistema Internacional]
*[http://es.wikipedia.org/wiki/Unidades_derivadas_del_Sistema_Internacional Unidades derivadas del Sistema Internacional]
*[http://es.wikipedia.org/wiki/Grado_sexagesimal Unidades angulares]
*[http://es.wikipedia.org/wiki/Grado_sexagesimal Unidades angulares]
</div>


== Ejemplos ==
== Ejemplos ==


{{Code|code=
# -- some examples of the FreeCAD unit translation system --
# -- some examples of the FreeCAD unit translation system --
# make a shortcut for the examples
# make a shortcut for the examples
tu = App.Units.translateUnit
pq = FreeCAD.Units.parseQuantity
# 10 meters in internal numbers
tu('10 m')
# doing math
tu('3/8 in')
# combined stuff
tu('100 km/h')
# transfer to other units
tu('100 km/h')/tu('m/s')
# derived units (Ohm)
tu('m^2*kg*s^-3*A^-2')
# or
tu('(m^2*kg)/(A^2*s^3)')
# angles
tu('2*pi rad') # full circle
# as gon
tu('2*pi rad') / tu('gon')
# more imperial
tu('1fo+(3+7/16)in')
# or
tu('1\'+(3+7/16)"') # the ' we have to escape because of python
# trigonometry
tu('sin(pi)')
# Using translated units as parameters, this command will create a 50.8mm x 20mm x 10mm box
b = Part.makeBox(tu('2in'),tu('2m')/100,10)


# 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)
}}

== Supported units ==

<div class="mw-translate-fuzzy">
== Unidades soportadas ==
== Unidades soportadas ==
Aquí están las unidades definidas en FreeCAD hasta el momento. Es sencillo añadir una propia. La definición está [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Base/UnitsApi.l?view=markup Aquí].
Aquí están las unidades definidas en FreeCAD hasta el momento. Es sencillo añadir una nueva unidad definida por el usuario. La definición está [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Base/UnitsApi.l?view=markup Aquí].
</div>

== See Also ==

* The [[Expressions#Units|Expressions]] page for a list of all known units.
* The documentation of [[Quantity|Quantity]].
* The [[Std_UnitsCalculator|Std UnitsCalculator]] tool.



{{Powerdocnavi{{#translation:}}}}
Métricas de longitud
"mm" 1.0; // millimeter (internal standard length)
"m" 1000.0; // meter
"cm" 10.0; // centimeter
"dm" 100.0; // decimeter
"km" 1000000.0; // kilometer
Británicas de longitud
"in" "\"" 25.4; // inch
"fo" "'" 304.8; // foot
"th" 0.0254; // thou
"yr" 914.4; // yard
Métricas de masa
"kg" 1.0; // kilogram (internal standard mass)
"g" 0.001; // gram
"mg" 0.000001; // milligram
"t" 1000.0; // ton
Británicas de masa
"lb" 0.45359237; // pound
"oz" 0.45359237; // ounce
"st" 6.35029318; // Stone
"cwt" 50.80234544;// hundredweights
Angulares
"deg" 1.0; // degree (internal standard angle)
"rad" 180/M_PI; // radian
"gon" 360.0/400.0;// gon
Tiempo
"s" 1.0; // second (internal standard time)
"min" 60.0; // minute
"h" 3600.0; // hour
El resto del SI
"A" 1.0; // Ampere (internal standard electric current)
"K" 1.0; // Kelvin (internal standard thermodynamic temperature)
"cd" 1.0; // Candela (internal standard luminous intensity)
"mol" 1.0; // Mole (internal standard amount of substance)
Métricas de volumen
"yl" 1.0; // microliter mm^3(derived standard volume)
"ml" 1000.0; // milliliter cm^3
"l" 1000000.0; // Liter dm^3

Latest revision as of 14:04, 4 June 2022

Ejemplos

# -- 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)

Supported units

Unidades soportadas

Aquí están las unidades definidas en FreeCAD hasta el momento. Es sencillo añadir una nueva unidad definida por el usuario. La definición está Aquí.

See Also