OCC.Core.UnitsAPI module¶
UnitsAPI module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_unitsapi.html
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
property
thisown
¶ The membership flag
-
value
()¶
-
-
class
unitsapi
¶ Bases:
object
-
static
AnyFromLS
()¶ - Converts the local system units value to the local unit value. Example: AnyFromLS(25.4,’in.’) returns 1. if the LocalSystem is MDTV. Note: aUnit is also used to identify the type of physical quantity to convert.
- param aData
- type aData
float
- param aUnit
- type aUnit
char *
- rtype
float
-
static
AnyFromSI
()¶ - Converts the SI system units value to the local unit value. Example: AnyFromSI(0.0254,’in.’) returns 0.001 Note: aUnit is also used to identify the type of physical quantity to convert.
- param aData
- type aData
float
- param aUnit
- type aUnit
char *
- rtype
float
-
static
AnyToAny
()¶ - Converts the local unit value to another local unit value. Example: AnyToAny(0.0254,’in.’,’millimeter’) returns 1. ;
- param aData
- type aData
float
- param aUnit1
- type aUnit1
char *
- param aUnit2
- type aUnit2
char *
- rtype
float
-
static
AnyToLS
()¶ - Converts the local unit value to the local system units value. Example: AnyToLS(1.,’in.’) returns 25.4 if the LocalSystem is MDTV.
- param aData
- type aData
float
- param aUnit
- type aUnit
char *
- rtype
float* Converts the local unit value to the local system units value. and gives the associated dimension of the unit
- param aData
- type aData
float
- param aUnit
- type aUnit
char *
- param aDim
- type aDim
Units_Dimensions
- rtype
float
-
static
AnyToSI
()¶ - Converts the local unit value to the SI system units value. Example: AnyToSI(1.,’in.’) returns 0.0254
- param aData
- type aData
float
- param aUnit
- type aUnit
char *
- rtype
float* Converts the local unit value to the SI system units value. and gives the associated dimension of the unit
- param aData
- type aData
float
- param aUnit
- type aUnit
char *
- param aDim
- type aDim
Units_Dimensions
- rtype
float
-
static
Check
()¶ - Checks the coherence between the quantity <aQuantity> and the unit <aUnits> in the current system and returns False when it’s WRONG.
- param aQuantity
- type aQuantity
char *
- param aUnit
- type aUnit
char *
- rtype
bool
-
static
CurrentFromAny
()¶ - Converts the aData value expressed in the unit aUnit, into the current unit for the working environment, as defined for the physical quantity aQuantity by the last call to the SetCurrentUnit function.
- param aData
- type aData
float
- param aQuantity
- type aQuantity
char *
- param aUnit
- type aUnit
char *
- rtype
float
-
static
CurrentFromLS
()¶ - Converts the local system units value to the current unit value. Example: CurrentFromLS(1000.,’LENGTH’) returns 1. if current length unit is meter and LocalSystem is MDTV.
- param aData
- type aData
float
- param aQuantity
- type aQuantity
char *
- rtype
float
-
static
CurrentFromSI
()¶ - Converts the SI system units value to the current unit value. Example: CurrentFromSI(0.001,’LENGTH’) returns 1 if current length unit is millimeter.
- param aData
- type aData
float
- param aQuantity
- type aQuantity
char *
- rtype
float
-
static
CurrentToAny
()¶ - Converts the aData value expressed in the current unit for the working environment, as defined for the physical quantity aQuantity by the last call to the SetCurrentUnit function, into the unit aUnit.
- param aData
- type aData
float
- param aQuantity
- type aQuantity
char *
- param aUnit
- type aUnit
char *
- rtype
float
-
static
CurrentToLS
()¶ - Converts the current unit value to the local system units value. Example: CurrentToLS(1.,’LENGTH’) returns 1000. if the current length unit is meter and LocalSystem is MDTV.
- param aData
- type aData
float
- param aQuantity
- type aQuantity
char *
- rtype
float
-
static
CurrentToSI
()¶ - Converts the current unit value to the SI system units value. Example: CurrentToSI(1.,’LENGTH’) returns 0.001 if current length unit is millimeter.
- param aData
- type aData
float
- param aQuantity
- type aQuantity
char *
- rtype
float
-
static
CurrentUnit
()¶ - Returns the current unit dimension <aUnit> from the unit quantity <aQuantity>.
- param aQuantity
- type aQuantity
char *
- rtype
char *
-
static
DimensionAmountOfSubstance
()¶ - Return type
opencascade::handle<Units_Dimensions>
-
static
DimensionElectricCurrent
()¶ - Return type
opencascade::handle<Units_Dimensions>
-
static
DimensionLength
()¶ - Return type
opencascade::handle<Units_Dimensions>
-
static
DimensionLess
()¶ - Return type
opencascade::handle<Units_Dimensions>
-
static
DimensionLuminousIntensity
()¶ - Return type
opencascade::handle<Units_Dimensions>
-
static
DimensionMass
()¶ - Return type
opencascade::handle<Units_Dimensions>
-
static
DimensionPlaneAngle
()¶ - Return type
opencascade::handle<Units_Dimensions>
-
static
DimensionSolidAngle
()¶ - Returns the basic dimensions.
- rtype
opencascade::handle<Units_Dimensions>
-
static
DimensionThermodynamicTemperature
()¶ - Return type
opencascade::handle<Units_Dimensions>
-
static
DimensionTime
()¶ - Return type
opencascade::handle<Units_Dimensions>
-
static
Dimensions
()¶ - return the dimension associated to the quantity
- param aQuantity
- type aQuantity
char *
- rtype
opencascade::handle<Units_Dimensions>
-
static
LSToSI
()¶ - Converts the local system units value to the SI system unit value. Example: LSToSI(1.,’LENGTH’) returns 0.001 if the local system length unit is millimeter.
- param aData
- type aData
float
- param aQuantity
- type aQuantity
char *
- rtype
float
-
static
LocalSystem
()¶ - Returns the current local system units.
- rtype
UnitsAPI_SystemUnits
-
static
Reload
()¶ - Return type
void
-
static
SIToLS
()¶ - Converts the SI system unit value to the local system units value. Example: SIToLS(1.,’LENGTH’) returns 1000. if the local system length unit is millimeter.
- param aData
- type aData
float
- param aQuantity
- type aQuantity
char *
- rtype
float
-
static
Save
()¶ - saves the units in the file .CurrentUnits of the directory pointed by the CSF_CurrentUnitsUserDefaults environment variable.
- rtype
void
-
static
SetCurrentUnit
()¶ - Sets the current unit dimension <aUnit> to the unit quantity <aQuantity>. Example: SetCurrentUnit(‘LENGTH’,’millimeter’)
- param aQuantity
- type aQuantity
char *
- param aUnit
- type aUnit
char *
- rtype
void
-
static
SetLocalSystem
()¶ - Sets the local system units. Example: SetLocalSystem(UnitsAPI_MDTV)
- param aSystemUnit
default value is UnitsAPI_SI
- type aSystemUnit
UnitsAPI_SystemUnits
- rtype
void
-
property
thisown
¶ The membership flag
-
static