DimensionUnit¶
Inheritance diagram¶
Classes¶
DimensionUnit¶
-
class
ORSModel.ors.DimensionUnit¶ Bases:
ORSModel.ors.Unmanagedbrief_description: An entity describing a unit of measure used by author: Eric Fournier. All other members of ORS participated. version: 1.0 date: august 2005 An entity describing a unit of measure used by the SDK.
-
convertToUnit(self, aVolume: float, aDimensionUnit: ORSModel.ors.DimensionUnit) → float¶ Converts from a unit to another unit.
Note
Conversion can be applied only between units of the same type.
Parameters: - aVolume (float) –
- aDimensionUnit (ORSModel.ors.DimensionUnit) –
Returns: output (float) –
-
createFromPythonRepresentation(aPythonRepresentation: str) → DimensionUnit¶ Create aDimensionUnit from a python representation a static method.
Parameters: aPythonRepresentation (str) – Returns: output (ORSModel.ors.DimensionUnit) –
-
getAllCalibrationKeys(self) → ArrayString¶ Gets all the existing calibration keys of the dictionary of calibration values.
Note
it is the responsibility of the caller to delete the returned array
Returns: output (ORSModel.ors.ArrayString) – array of the calibration keys (an ArrayString)
-
getAllRegistrationKeys() → ArrayString¶ Gets all the existing registration keys of the dictionary of registered DimensionUnits.
Note
it is the responsibility of the caller to delete the returned array
Returns: output (ORSModel.ors.ArrayString) – array of the registration keys (an ArrayString)
-
getCalibrationValue(self, sCalibrationKey: str) → float¶ Gets a calibration value from the dictionary of calibration values.
Parameters: sCalibrationKey (str) – calibration key (a string) Returns: output (float) – calibration value (a double)
-
getClassNameStatic() → str¶ getClassNameStatic
Returns: output (str) –
-
getDefault(dimensionType: int) → DimensionUnit¶ Gets the default system unit.
Note
See the CxvUniverse_Dimension_Type enum in ORS_def.h to know the supported values.
Parameters: dimensionType (int) – a dimension type (an int) Returns: output (ORSModel.ors.DimensionUnit) – a DimensionUnit
-
getDimensionType(self) → int¶ Returns a CxvUniverse_Dimension_Type describing the dimensionality of the dimension unit.
Note
See the CxvUniverse_Dimension_Type enum in ORS_def.h to know the supported values.
Returns: output (int) – a CxvUniverse_Dimension_Type describing the dimensionality of the dimension unit (an int)
-
getFilenameCustomDimensionUnits() → str¶ Gets the filename of the custom dimension units.
Returns: output (str) – filename of the custom dimension units (a string)
-
getIsEqualTo(self, aDimensionUnit: ORSModel.ors.DimensionUnit) → bool¶ Checks for equality to anotherDimensionUnit.
Parameters: aDimensionUnit (ORSModel.ors.DimensionUnit) – a DimensionUnit (a DimensionUnit) Returns: output (bool) – true if the DimensionUnits are equal, false otherwise
-
getIsImperialUnit(self) → bool¶ Gets if the dimension unit corresponds to an imperial system of measurement.
Returns: output (bool) – true if the dimension unit is an imperial unit (inches, feet, …), false otherwise (a bool)
-
getReferenceUnitConvertedToUnit(self, aVolume: float) → float¶ Converts from MKS to another unit.
Parameters: aVolume (float) – Returns: output (float) –
-
getReferenceUnitToUnitFactor(self) → float¶ Gets the unit factor.
Note
All factors are expressed in relation to the base unit (1 meter, 1 square meter, 1 radian, …).
Returns: output (float) – a multiplying factor (a double)
-
getRegisteredUnit(registrationKey: str) → DimensionUnit¶ Gets theDimensionUnit associated to a registration key.
Parameters: registrationKey (str) – registration key (a string) Returns: output (ORSModel.ors.DimensionUnit) – a DimensionUnit (a DimensionUnit)
-
getRegistrationKey(self) → str¶ Gets the unit registration key.
Returns: output (str) – the unit registration key (a string)
-
getRegistrationKeyFromCxvDimensionUniverse(pDimension: int) → str¶ Gets the registration key of a dimension unit associated to the legacy CxvUniverse_Dimension enum.
Note
See the CxvUniverse_Dimension enum in ORS_def.h to know the supported values.
Parameters: pDimension (int) – a dimension index (an int) Returns: output (str) – registration key (a string)
-
getRegistrationKeysSpecificDimensionUnitType(dimensionType: int) → ArrayString¶ Gets the existing registration keys of the dictionary of registered DimensionUnits of the DimensionUnits of the provided type.
Note
See the CxvUniverse_Dimension_Type enum in ORS_def.h to know the supported values.
Note
it is the responsibility of the caller to delete the returned array
Parameters: dimensionType (int) – a dimension type (an int) Returns: output (ORSModel.ors.ArrayString) – array of the registration keys (an ArrayString)
-
getSupportsConversion(self) → bool¶ Gets if the unit supports conversion to another unit.
Note
Generic units don’t support conversion.
Returns: output (bool) – true if the unit can be converted to another unit, false otherwise (a bool)
-
getSupportsConversionToUnit(self, aDimensionUnit: ORSModel.ors.DimensionUnit) → bool¶ Gets if the unit can be converted in the other unit.
Note
Generic units don’t support conversion.
Note
Conversion can be applied only between units of the same type.
Parameters: aDimensionUnit (ORSModel.ors.DimensionUnit) – Returns: output (bool) – true if the unit can be converted to another unit, false otherwise (a bool)
-
getTypeForID(pDimension: int) → int¶ Returns a CxvUniverse_Dimension_Type describing the dimensionality of the dimension type.
Deprecated since version (unknown): use getDimensionType instead
Note
See the CxvUniverse_Dimension_Type enum in ORS_def.h to know the supported values.
Parameters: pDimension (int) – a dimension index (an int) Returns: output (int) – a CxvUniverse_Dimension_Type describing the dimensionality of the dimension unit (an int)
-
getUnitAbbreviation(self) → str¶ Gets the unit abbreviation.
Returns: output (str) – the unit abbreviation (a string)
-
getUnitConvertedToReferenceUnit(self, aVolume: float) → float¶ Converts to MKS from another unit.
Parameters: aVolume (float) – Returns: output (float) –
-
getUnitForID(pDimension: int) → DimensionUnit¶ Gets the unit for the specified index.
Deprecated since version (unknown): use getRegisteredUnit instead
Note
See the CxvUniverse_Dimension enum in ORS_def.h to know the supported values.
Parameters: pDimension (int) – a dimension index (an int) Returns: output (ORSModel.ors.DimensionUnit) – a DimensionUnit
-
getUnitName(self) → str¶ Gets the unit name.
Returns: output (str) – the unit name (a string)
-
getUnitWithAbbreviation(sAbbreviation: str) → DimensionUnit¶ Gets the unit that has the specified abbreviation.
Parameters: sAbbreviation (str) – a text abbreviation (a string) Returns: output (ORSModel.ors.DimensionUnit) – a DimensionUnit or none
-
getUnitWithName(sUnitName: str) → DimensionUnit¶ Gets the unit that has the specified name.
Parameters: sUnitName (str) – a text name (a string) Returns: output (ORSModel.ors.DimensionUnit) – a DimensionUnit or none
-
none() → DimensionUnit¶ Returns: output (DimensionUnit) –
-
removeFromRegisteredDimensionUnits(registrationKey: str) → bool¶ Removes aDimensionUnit from the dictionary of registered DimensionUnits, using the registration key.
Parameters: registrationKey (str) – registration key (a string) Returns: output (bool) – true if the removal from the dictionary is successful, false otherwise (a bool)
-
setFilenameCustomDimensionUnits(filenameCustomDimensionUnits: str) → bool¶ Sets the filename of the custom dimension units.
Note
the file should be accessible with reading and writing permissions
Parameters: filenameCustomDimensionUnits (str) – filename of the custom dimension units (a string) Returns: output (bool) – true if the file can be used, false otherwise (a bool)
-
Unmanaged¶
-
class
ORSModel.ors.Unmanaged Bases:
ORSModel.ors.ORSBaseClassbrief_description: Abstract class for objects that are not managed by the core library. author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005
-
atomicLoad(sFilename: str) → Unmanaged Creates an object from a file where an object was saved.
Parameters: sFilename (str) – path of the file to load Returns: output (Unmanaged) – a managed object, or none() if the load fails
-
atomicSave(self, aFilename: str) → int Saves the object to a file.
Parameters: aFilename (str) – path of the file to save Returns: output (int) – 0 if successful, otherwise an error code
-
createFromPythonRepresentation(aPythonRepresentation: str) → Unmanaged Create aUnmanaged Object from a python representation a static method.
Parameters: aPythonRepresentation (str) – Returns: output (ORSModel.ors.Unmanaged) –
-
fromPythonRepresentation(self, aPythonRepresentation: str) → bool Create aUnmanaged object from a Python string representation.
Parameters: aPythonRepresentation (str) – a Python evaluable string representation (a string) Returns: output (bool) – TRUE if parsing worked, FALSE otherwise (a bool)
-
classmethod
getAllSubclasses(outputCollection=None)
-
classmethod
getClassDenomination()
-
static
getClassFromProgId(progId)
-
getClassName(self) → str Retrieves the class name of the core object wrapped by this Interface object.
Returns: output (str) –
-
getClassNameStatic() → str getClassNameStatic
Returns: output (str) –
-
getDataChecksum(self) → str Returns: output (str) –
-
getIsInstanceOf(self, pProgId: str) → bool Queries the object to know if it is an instance of a certain class.
Parameters: pProgId (str) – Returns: output (bool) –
-
classmethod
getIsSubclassOf(parentClass)
-
getPythonRepresentation(self) → str Gets a Python evaluable string representation.
Returns: output (str) –
-
isNone(self) → bool Checks if the receiver is none.
Returns: output (bool) –
-
isNotNone(self) → bool Checks if the receiver is not none.
Returns: output (bool) –
-
none() → Unmanaged Returns: output (Unmanaged) –
-
ORSBaseClass¶
-
class
ORSModel.ors.ORSBaseClass brief_description: An abstract class from which all objects issued from the author: Eric Fournier. All other members of ORS participated. version: 1.0 date: Jan 2005
-
getPythonTraceBack() → typing.List[str] Set the python traceback for a call from python.
Returns: output (typing.List[str]) –
-
isManaged(self) → bool Returns: output (bool) –
-
isNone(self) → bool Returns: output (bool) –
-
setPythonTraceBack(tb: ORSModel.ors.typing.List[str]) → None Set the python traceback for a call from python.
Parameters: tb (typing.List[str]) –
-