OCC.Quantity module

class OCC.Quantity.Handle_Quantity_HArray1OfColor(*args)

Bases: OCC.MMgt.Handle_MMgt_TShared

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.Quantity.Quantity_Array1OfCoefficient(*args)

Bases: object

Assign()
Parameters:Other (Quantity_Array1OfCoefficient &) –
Return type:Quantity_Array1OfCoefficient
ChangeValue()
Parameters:Index (Standard_Integer) –
Return type:Quantity_Coefficient
Destroy()
Return type:None
Init()
Parameters:V (Quantity_Coefficient &) –
Return type:None
IsAllocated()
Return type:bool
Length()
Return type:int
Lower()
Return type:int
Set()
Parameters:Other (Quantity_Array1OfCoefficient &) –
Return type:Quantity_Array1OfCoefficient
SetValue()
Parameters:
  • Index (Standard_Integer) –
  • Value (Quantity_Coefficient &) –
Return type:

None

Upper()
Return type:int
Value()
Parameters:Index (Standard_Integer) –
Return type:Quantity_Coefficient
thisown

The membership flag

class OCC.Quantity.Quantity_Array1OfColor(*args)

Bases: object

Assign()
Parameters:Other (Quantity_Array1OfColor &) –
Return type:Quantity_Array1OfColor
ChangeValue()
Parameters:Index (Standard_Integer) –
Return type:Quantity_Color
Destroy()
Return type:None
Init()
Parameters:V (Quantity_Color &) –
Return type:None
IsAllocated()
Return type:bool
Length()
Return type:int
Lower()
Return type:int
Set()
Parameters:Other (Quantity_Array1OfColor &) –
Return type:Quantity_Array1OfColor
SetValue()
Parameters:
  • Index (Standard_Integer) –
  • Value (Quantity_Color &) –
Return type:

None

Upper()
Return type:int
Value()
Parameters:Index (Standard_Integer) –
Return type:Quantity_Color
thisown

The membership flag

class OCC.Quantity.Quantity_Array2OfColor(*args)

Bases: object

Assign()
Parameters:Other (Quantity_Array2OfColor &) –
Return type:Quantity_Array2OfColor
ChangeValue()
Parameters:
  • Row (Standard_Integer) –
  • Col (Standard_Integer) –
Return type:

Quantity_Color

ColLength()
Return type:int
Destroy()
Return type:None
Init()
Parameters:V (Quantity_Color &) –
Return type:None
LowerCol()
Return type:int
LowerRow()
Return type:int
RowLength()
Return type:int
Set()
Parameters:Other (Quantity_Array2OfColor &) –
Return type:Quantity_Array2OfColor
SetValue()
Parameters:
  • Row (Standard_Integer) –
  • Col (Standard_Integer) –
  • Value (Quantity_Color &) –
Return type:

None

UpperCol()
Return type:int
UpperRow()
Return type:int
Value()
Parameters:
  • Row (Standard_Integer) –
  • Col (Standard_Integer) –
Return type:

Quantity_Color

thisown

The membership flag

class OCC.Quantity.Quantity_Color(*args)

Bases: object

static Argb2color(*args)
  • Convert integer ARGB value to Color. Alpha bits are ignored
Parameters:
  • theARGB (Standard_Integer) –
  • theColor (Quantity_Color &) –
Return type:

void

Assign()
  • Updates the colour <self> from the definition of the //! colour <Other>.
Parameters:Other (Quantity_Color &) –
Return type:Quantity_Color
Blue()
  • Returns the Blue component (quantity of blue) of the //! color <self>.
Return type:Quantity_Parameter
ChangeContrast()
  • Increases or decreases the contrast by <ADelta>. //! <ADelta> is a percentage. Any value greater than zero //! will increase the contrast. //! The variation is expressed as a percentage of the //! current value. //! It is a variation of the saturation.
Parameters:ADelta (Quantity_Rate) –
Return type:None
ChangeIntensity()
  • Increases or decreases the intensity by <ADelta>. //! <ADelta> is a percentage. Any value greater than zero //! will increase the intensity. //! The variation is expressed as a percentage of the //! current value. //! It is a variation of the lightness.
Parameters:ADelta (Quantity_Rate) –
Return type:None
static Color2argb(*args)
  • Convert the Color value to ARGB integer value. theARGB has Alpha equal to zero, so the output is formatted as 0x00RRGGBB
Parameters:
  • theColor (Quantity_Color &) –
  • theARGB (Standard_Integer &) –
Return type:

void

Delta()
  • Returns the percentage change of contrast and intensity //! between <self> and <AColor>. //! <DC> and <DI> are percentages, either positive or negative. //! The calculation is with respect to the current value of <self> //! If <DC> is positive then <self> is more contrasty. //! If <DI> is positive then <self> is more intense.
Parameters:
  • AColor (Quantity_Color &) –
  • DC (Quantity_Parameter &) –
  • DI (Quantity_Parameter &) –
Return type:

None

Distance()
  • Returns the distance between two colours. It’s a //! value between 0 and the square root of 3 //! (the black/white distance)
Parameters:AColor (Quantity_Color &) –
Return type:float
static Epsilon()
  • Returns the specified value used to compare <self> and //! an other color in IsDifferent and in IsEqual methods.
Return type:Quantity_Parameter
Green()
  • Returns the Green component (quantity of green) of the //! color <self>.
Return type:Quantity_Parameter
static HlsRgb(*args)
  • Converts HLS components into RGB ones.
Parameters:
  • H (Quantity_Parameter) –
  • L (Quantity_Parameter) –
  • S (Quantity_Parameter) –
  • R (Quantity_Parameter &) –
  • G (Quantity_Parameter &) –
  • B (Quantity_Parameter &) –
Return type:

void

Hue()
  • Returns the Hue component (hue angle) of the //! color <self>.
Return type:Quantity_Parameter
IsDifferent()
  • Returns Standard_True if the distance between <self> and //! <Other> is greater than Epsilon ().
Parameters:Other (Quantity_Color &) –
Return type:bool
IsEqual()
  • Returns true if the Other color is - different from, or - equal to this color. Two colors are considered to be equal if their distance is no greater than Epsilon(). These methods are aliases of operator != and operator ==.
Parameters:Other (Quantity_Color &) –
Return type:bool
Light()
  • Returns the Light component (value of the lightness) of the //! color <self>.
Return type:Quantity_Parameter
static Name(*args)
  • Returns the name of the color defined by its quantities of red R, green G and blue B; more precisely this is the nearest color from the Quantity_NameOfColor enumeration. Exceptions Standard_OutOfRange if R, G or B is less than 0. or greater than 1.
Return type:Quantity_NameOfColor
  • Returns the name of the colour for which the RGB components //! are nearest to <R>, <G> and <B>.
Parameters:
  • R (Quantity_Parameter) –
  • G (Quantity_Parameter) –
  • B (Quantity_Parameter) –
Return type:

Quantity_NameOfColor

Red()
  • Returns the Red component (quantity of red) of the //! color <self>.
Return type:Quantity_Parameter
static RgbHls(*args)
  • Converts RGB components into HLS ones.
Parameters:
  • R (Quantity_Parameter) –
  • G (Quantity_Parameter) –
  • B (Quantity_Parameter) –
  • H (Quantity_Parameter &) –
  • L (Quantity_Parameter &) –
  • S (Quantity_Parameter &) –
Return type:

void

Saturation()
  • Returns the Saturation component (value of the saturation) //! of the color <self>.
Return type:Quantity_Parameter
Set()
Parameters:Other (Quantity_Color &) –
Return type:Quantity_Color
static SetEpsilon(*args)
  • Sets the specified value used to compare <self> and //! an other color in IsDifferent and in IsEqual methods. Warning: The default value is 0.0001
Parameters:AnEpsilon (Quantity_Parameter) –
Return type:void
SetValues()
  • Updates the colour <self> from the definition of the //! colour <AName>.
Parameters:AName (Quantity_NameOfColor) –
Return type:None
  • Updates a colour according to the mode specified by //! TypeOfColor //! TOC_RGB : <R1> the value of red between 0. and 1. //! <R2> the value of green between 0. and 1. //! <R3> the value of blue between 0. and 1. //! TOC_HLS : <R1> is the hue angle in degrees, 0. being red //! <R2> is the lightness between 0. and 1. //! <R3> is the saturation between 0. and 1.
Parameters:
  • R1 (Quantity_Parameter) –
  • R2 (Quantity_Parameter) –
  • R3 (Quantity_Parameter) –
  • AType (Quantity_TypeOfColor) –
Return type:

None

SquareDistance()
  • Returns the square of distance between two colours.
Parameters:AColor (Quantity_Color &) –
Return type:float
static StringName(*args)
  • Returns the name of the color identified by AName in the Quantity_NameOfColor enumeration. For example, the name of the color which corresponds to Quantity_NOC_BLACK is ‘BLACK’. Exceptions Standard_OutOfRange if AName in not known in the Quantity_NameOfColor enumeration.
Parameters:AColor (Quantity_NameOfColor) –
Return type:char *
static Test()
  • Internal test
Return type:void
Values()
  • Returns in R1, R2 and R3 the components of this color according to the color system definition AType. - if AType is Quantity_TOC_RGB R1 is the quantity of red, R2 is the quantity of green and R3 is the quantity of blue in this color. - if AType is Quantity_TOC_HLS R1 is the hue angle in degrees (0 being red), R2 is the lightness and R3 is the saturation of this color.
Parameters:
  • R1 (Quantity_Parameter &) –
  • R2 (Quantity_Parameter &) –
  • R3 (Quantity_Parameter &) –
  • AType (Quantity_TypeOfColor) –
Return type:

None

thisown

The membership flag

OCC.Quantity.Quantity_Color_Argb2color(*args)
  • Convert integer ARGB value to Color. Alpha bits are ignored
Parameters:
  • theARGB (Standard_Integer) –
  • theColor (Quantity_Color &) –
Return type:

void

OCC.Quantity.Quantity_Color_Color2argb(*args)
  • Convert the Color value to ARGB integer value. theARGB has Alpha equal to zero, so the output is formatted as 0x00RRGGBB
Parameters:
  • theColor (Quantity_Color &) –
  • theARGB (Standard_Integer &) –
Return type:

void

OCC.Quantity.Quantity_Color_Epsilon()
  • Returns the specified value used to compare <self> and //! an other color in IsDifferent and in IsEqual methods.
Return type:Quantity_Parameter
OCC.Quantity.Quantity_Color_HlsRgb(*args)
  • Converts HLS components into RGB ones.
Parameters:
  • H (Quantity_Parameter) –
  • L (Quantity_Parameter) –
  • S (Quantity_Parameter) –
  • R (Quantity_Parameter &) –
  • G (Quantity_Parameter &) –
  • B (Quantity_Parameter &) –
Return type:

void

OCC.Quantity.Quantity_Color_Name(*args)
  • Returns the name of the color defined by its quantities of red R, green G and blue B; more precisely this is the nearest color from the Quantity_NameOfColor enumeration. Exceptions Standard_OutOfRange if R, G or B is less than 0. or greater than 1.
Return type:Quantity_NameOfColor
  • Returns the name of the colour for which the RGB components //! are nearest to <R>, <G> and <B>.
Parameters:
  • R (Quantity_Parameter) –
  • G (Quantity_Parameter) –
  • B (Quantity_Parameter) –
Return type:

Quantity_NameOfColor

OCC.Quantity.Quantity_Color_RgbHls(*args)
  • Converts RGB components into HLS ones.
Parameters:
  • R (Quantity_Parameter) –
  • G (Quantity_Parameter) –
  • B (Quantity_Parameter) –
  • H (Quantity_Parameter &) –
  • L (Quantity_Parameter &) –
  • S (Quantity_Parameter &) –
Return type:

void

OCC.Quantity.Quantity_Color_SetEpsilon(*args)
  • Sets the specified value used to compare <self> and //! an other color in IsDifferent and in IsEqual methods. Warning: The default value is 0.0001
Parameters:AnEpsilon (Quantity_Parameter) –
Return type:void
OCC.Quantity.Quantity_Color_StringName(*args)
  • Returns the name of the color identified by AName in the Quantity_NameOfColor enumeration. For example, the name of the color which corresponds to Quantity_NOC_BLACK is ‘BLACK’. Exceptions Standard_OutOfRange if AName in not known in the Quantity_NameOfColor enumeration.
Parameters:AColor (Quantity_NameOfColor) –
Return type:char *
OCC.Quantity.Quantity_Color_Test()
  • Internal test
Return type:void
class OCC.Quantity.Quantity_Convert

Bases: object

static ConvertSIToUser(*args)
  • Converts, from the conversion table, the value <aVal> from the SI system to the user system.
Parameters:
  • aQuantity (Quantity_PhysicalQuantity) –
  • aVal (float) –
Return type:

float

static ConvertUserToSI(*args)
  • Converts, from the conversion table, the value <aVal> from the user system to the SI system.
Parameters:
  • aQuantity (Quantity_PhysicalQuantity) –
  • aVal (float) –
Return type:

float

static IsPhysicalQuantity(*args)
  • if (aType is a physical quantity) returns True and the name of the associated PhysicalQuantity . else returns False.
Parameters:
  • aTypeName (TCollection_AsciiString &) –
  • anEnum (TCollection_AsciiString &) –
Return type:

bool

static SetQuantity(*args)
  • Updates the conversion table (correspondances between Quantities and conversion coefficients).
Parameters:
  • aQuantity (Quantity_PhysicalQuantity) –
  • aCoef (Quantity_Coefficient) –
Return type:

void

thisown

The membership flag

OCC.Quantity.Quantity_Convert_ConvertSIToUser(*args)
  • Converts, from the conversion table, the value <aVal> from the SI system to the user system.
Parameters:
  • aQuantity (Quantity_PhysicalQuantity) –
  • aVal (float) –
Return type:

float

OCC.Quantity.Quantity_Convert_ConvertUserToSI(*args)
  • Converts, from the conversion table, the value <aVal> from the user system to the SI system.
Parameters:
  • aQuantity (Quantity_PhysicalQuantity) –
  • aVal (float) –
Return type:

float

OCC.Quantity.Quantity_Convert_IsPhysicalQuantity(*args)
  • if (aType is a physical quantity) returns True and the name of the associated PhysicalQuantity . else returns False.
Parameters:
  • aTypeName (TCollection_AsciiString &) –
  • anEnum (TCollection_AsciiString &) –
Return type:

bool

OCC.Quantity.Quantity_Convert_SetQuantity(*args)
  • Updates the conversion table (correspondances between Quantities and conversion coefficients).
Parameters:
  • aQuantity (Quantity_PhysicalQuantity) –
  • aCoef (Quantity_Coefficient) –
Return type:

void

class OCC.Quantity.Quantity_Date(*args)

Bases: object

Add()
  • Adds a Period to a Date and returns the new Date.
Parameters:aPeriod (Quantity_Period &) –
Return type:Quantity_Date
Day()
  • Returns Day of a Date.
Return type:int
Difference()
  • Subtracts one Date from another one to find the period between and returns the value. The result is the absolute value between the difference of two dates.
Parameters:anOther (Quantity_Date &) –
Return type:Quantity_Period
Hour()
  • Returns Hour of a Date.
Return type:int
IsEarlier()
  • Returns True if <self> is earlier than <other>.
Parameters:anOther (Quantity_Date &) –
Return type:bool
IsEqual()
  • Returns True if both <self> and <other> are equal. This method is an alias of operator ==.
Parameters:anOther (Quantity_Date &) –
Return type:bool
IsLater()
  • Returns True if <self> is later then <other>.
Parameters:anOther (Quantity_Date &) –
Return type:bool
static IsLeap(*args)
  • Returns true if a year is a leap year. The leap years are divisable by 4 and not by 100 except the years divisable by 400.
Parameters:yy (Standard_Integer) –
Return type:bool
static IsValid(*args)
  • Checks the validity of a date - returns true if a date defined from the year yyyy, the month mm, the day dd, the hour hh, the minute mn, the second ss, the millisecond mis (defaulted to 0) and the microsecond mics (defaulted to 0) is valid. A date must satisfy the conditions above: - yyyy is greater than or equal to 1979, - mm lies within the range [1, 12] (with 1 corresponding to January and 12 to December), - dd lies within a valid range for the month mm (from 1 to 28, 29, 30 or 31 depending on mm and whether yyyy is a leap year or not), - hh lies within the range [0, 23], - mn lies within the range [0, 59], - ss lies within the range [0, 59], - mis lies within the range [0, 999], - mics lies within the range [0, 999].C
Parameters:
  • mm (Standard_Integer) –
  • dd (Standard_Integer) –
  • yy (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

bool

  • Checks the validity of a date - returns true if a date defined from the year yyyy, the month mm, the day dd, the hour hh, the minute mn, the second ss, the millisecond mis (defaulted to 0) and the microsecond mics (defaulted to 0) is valid. A date must satisfy the conditions above: - yyyy is greater than or equal to 1979, - mm lies within the range [1, 12] (with 1 corresponding to January and 12 to December), - dd lies within a valid range for the month mm (from 1 to 28, 29, 30 or 31 depending on mm and whether yyyy is a leap year or not), - hh lies within the range [0, 23], - mn lies within the range [0, 59], - ss lies within the range [0, 59], - mis lies within the range [0, 999], - mics lies within the range [0, 999].C
Parameters:
  • mm (Standard_Integer) –
  • dd (Standard_Integer) –
  • yy (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

bool

  • Checks the validity of a date - returns true if a date defined from the year yyyy, the month mm, the day dd, the hour hh, the minute mn, the second ss, the millisecond mis (defaulted to 0) and the microsecond mics (defaulted to 0) is valid. A date must satisfy the conditions above: - yyyy is greater than or equal to 1979, - mm lies within the range [1, 12] (with 1 corresponding to January and 12 to December), - dd lies within a valid range for the month mm (from 1 to 28, 29, 30 or 31 depending on mm and whether yyyy is a leap year or not), - hh lies within the range [0, 23], - mn lies within the range [0, 59], - ss lies within the range [0, 59], - mis lies within the range [0, 999], - mics lies within the range [0, 999].C
Parameters:
  • mm (Standard_Integer) –
  • dd (Standard_Integer) –
  • yy (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

bool

MicroSecond()
  • Returns microsecond of a Date.
Return type:int
MilliSecond()
  • Returns millisecond of a Date.
Return type:int
Minute()
  • Returns minute of a Date.
Return type:int
Month()
  • Returns month of a Date.
Return type:int
Second()
  • Returns seconde of a Date.
Return type:int
SetValues()
  • Assigns to this date the year yyyy, the month mm, the day dd, the hour hh, the minute mn, the second ss, the millisecond mis (defaulted to 0) and the microsecond mics (defaulted to 0). Exceptions Quantity_DateDefinitionError if mm, dd, hh, mn, ss, mis and mics are not components of a valid date.
Parameters:
  • mm (Standard_Integer) –
  • dd (Standard_Integer) –
  • yy (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

None

  • Assigns to this date the year yyyy, the month mm, the day dd, the hour hh, the minute mn, the second ss, the millisecond mis (defaulted to 0) and the microsecond mics (defaulted to 0). Exceptions Quantity_DateDefinitionError if mm, dd, hh, mn, ss, mis and mics are not components of a valid date.
Parameters:
  • mm (Standard_Integer) –
  • dd (Standard_Integer) –
  • yy (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

None

  • Assigns to this date the year yyyy, the month mm, the day dd, the hour hh, the minute mn, the second ss, the millisecond mis (defaulted to 0) and the microsecond mics (defaulted to 0). Exceptions Quantity_DateDefinitionError if mm, dd, hh, mn, ss, mis and mics are not components of a valid date.
Parameters:
  • mm (Standard_Integer) –
  • dd (Standard_Integer) –
  • yy (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

None

Subtract()
  • Subtracts a period from a Date and returns the new Date. Raises an exception if the result date is anterior to Jan 1, 1979.
Parameters:aPeriod (Quantity_Period &) –
Return type:Quantity_Date
Values()
  • Gets a complete Date. - in mm - the month, - in dd - the day, - in yyyy - the year, - in hh - the hour, - in mn - the minute, - in ss - the second, - in mis - the millisecond, and - in mics - the microsecond
Parameters:
  • mm (Standard_Integer &) –
  • dd (Standard_Integer &) –
  • yy (Standard_Integer &) –
  • hh (Standard_Integer &) –
  • mn (Standard_Integer &) –
  • ss (Standard_Integer &) –
  • mis (Standard_Integer &) –
  • mics (Standard_Integer &) –
Return type:

None

Year()
  • Returns year of a Date.
Return type:int
thisown

The membership flag

OCC.Quantity.Quantity_Date_IsLeap(*args)
  • Returns true if a year is a leap year. The leap years are divisable by 4 and not by 100 except the years divisable by 400.
Parameters:yy (Standard_Integer) –
Return type:bool
OCC.Quantity.Quantity_Date_IsValid(*args)
  • Checks the validity of a date - returns true if a date defined from the year yyyy, the month mm, the day dd, the hour hh, the minute mn, the second ss, the millisecond mis (defaulted to 0) and the microsecond mics (defaulted to 0) is valid. A date must satisfy the conditions above: - yyyy is greater than or equal to 1979, - mm lies within the range [1, 12] (with 1 corresponding to January and 12 to December), - dd lies within a valid range for the month mm (from 1 to 28, 29, 30 or 31 depending on mm and whether yyyy is a leap year or not), - hh lies within the range [0, 23], - mn lies within the range [0, 59], - ss lies within the range [0, 59], - mis lies within the range [0, 999], - mics lies within the range [0, 999].C
Parameters:
  • mm (Standard_Integer) –
  • dd (Standard_Integer) –
  • yy (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

bool

  • Checks the validity of a date - returns true if a date defined from the year yyyy, the month mm, the day dd, the hour hh, the minute mn, the second ss, the millisecond mis (defaulted to 0) and the microsecond mics (defaulted to 0) is valid. A date must satisfy the conditions above: - yyyy is greater than or equal to 1979, - mm lies within the range [1, 12] (with 1 corresponding to January and 12 to December), - dd lies within a valid range for the month mm (from 1 to 28, 29, 30 or 31 depending on mm and whether yyyy is a leap year or not), - hh lies within the range [0, 23], - mn lies within the range [0, 59], - ss lies within the range [0, 59], - mis lies within the range [0, 999], - mics lies within the range [0, 999].C
Parameters:
  • mm (Standard_Integer) –
  • dd (Standard_Integer) –
  • yy (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

bool

  • Checks the validity of a date - returns true if a date defined from the year yyyy, the month mm, the day dd, the hour hh, the minute mn, the second ss, the millisecond mis (defaulted to 0) and the microsecond mics (defaulted to 0) is valid. A date must satisfy the conditions above: - yyyy is greater than or equal to 1979, - mm lies within the range [1, 12] (with 1 corresponding to January and 12 to December), - dd lies within a valid range for the month mm (from 1 to 28, 29, 30 or 31 depending on mm and whether yyyy is a leap year or not), - hh lies within the range [0, 23], - mn lies within the range [0, 59], - ss lies within the range [0, 59], - mis lies within the range [0, 999], - mics lies within the range [0, 999].C
Parameters:
  • mm (Standard_Integer) –
  • dd (Standard_Integer) –
  • yy (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

bool

class OCC.Quantity.Quantity_HArray1OfColor(*args)

Bases: OCC.MMgt.MMgt_TShared

Array1()
Return type:Quantity_Array1OfColor
ChangeArray1()
Return type:Quantity_Array1OfColor
ChangeValue()
Parameters:Index (Standard_Integer) –
Return type:Quantity_Color
GetHandle()

Quantity_HArray1OfColor_GetHandle(Quantity_HArray1OfColor self) -> Handle_Quantity_HArray1OfColor

Init()
Parameters:V (Quantity_Color &) –
Return type:None
Length()
Return type:int
Lower()
Return type:int
SetValue()
Parameters:
  • Index (Standard_Integer) –
  • Value (Quantity_Color &) –
Return type:

None

Upper()
Return type:int
Value()
Parameters:Index (Standard_Integer) –
Return type:Quantity_Color
thisown

The membership flag

class OCC.Quantity.Quantity_Period(*args)

Bases: object

Add()
  • Adds one Period to another one.
Parameters:anOther (Quantity_Period &) –
Return type:Quantity_Period
IsEqual()
  • Returns True if both <self> and <other> are equal.
Parameters:anOther (Quantity_Period &) –
Return type:bool
IsLonger()
  • Returns True if <self> is longer then <other>.
Parameters:anOther (Quantity_Period &) –
Return type:bool
IsShorter()
  • Returns True if <self> is shorter than <other>.
Parameters:anOther (Quantity_Period &) –
Return type:bool
static IsValid(*args)
  • Checks the validity of a Period in form (dd,hh,mn,ss,mil,mic) With: 0 <= dd 0 <= hh 0 <= mn 0 <= ss 0 <= mis 0 <= mics
Parameters:
  • dd (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

bool

  • Checks the validity of a Period in form (dd,hh,mn,ss,mil,mic) With: 0 <= dd 0 <= hh 0 <= mn 0 <= ss 0 <= mis 0 <= mics
Parameters:
  • dd (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

bool

  • Checks the validity of a Period in form (dd,hh,mn,ss,mil,mic) With: 0 <= dd 0 <= hh 0 <= mn 0 <= ss 0 <= mis 0 <= mics
Parameters:
  • dd (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

bool

  • Checks the validity of a Period in form (ss,mic) With: 0 <= ss 0 <= mics
Parameters:
  • ss (Standard_Integer) –
  • mics (Standard_Integer) – default value is 0
Return type:

bool

  • Checks the validity of a Period in form (ss,mic) With: 0 <= ss 0 <= mics
Parameters:
  • ss (Standard_Integer) –
  • mics (Standard_Integer) – default value is 0
Return type:

bool

SetValues()
  • Assigns to this period the time interval defined - with dd days, hh hours, mn minutes, ss seconds, mis (defaulted to 0) milliseconds and mics (defaulted to 0) microseconds; or
Parameters:
  • dd (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

None

  • Assigns to this period the time interval defined - with dd days, hh hours, mn minutes, ss seconds, mis (defaulted to 0) milliseconds and mics (defaulted to 0) microseconds; or
Parameters:
  • dd (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

None

  • Assigns to this period the time interval defined - with dd days, hh hours, mn minutes, ss seconds, mis (defaulted to 0) milliseconds and mics (defaulted to 0) microseconds; or
Parameters:
  • dd (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

None

  • Assigns to this period the time interval defined - with Ss seconds and Mics (defaulted to 0) microseconds. Exceptions Quantity_PeriodDefinitionError: - if the number of seconds expressed either by: - dd days, hh hours, mn minutes and ss seconds, or - Ss is less than 0. - if the number of microseconds expressed either by: - mis milliseconds and mics microseconds, or - Mics is less than 0.
Parameters:
  • ss (Standard_Integer) –
  • mics (Standard_Integer) – default value is 0
Return type:

None

  • Assigns to this period the time interval defined - with Ss seconds and Mics (defaulted to 0) microseconds. Exceptions Quantity_PeriodDefinitionError: - if the number of seconds expressed either by: - dd days, hh hours, mn minutes and ss seconds, or - Ss is less than 0. - if the number of microseconds expressed either by: - mis milliseconds and mics microseconds, or - Mics is less than 0.
Parameters:
  • ss (Standard_Integer) –
  • mics (Standard_Integer) – default value is 0
Return type:

None

Subtract()
  • Subtracts one Period from another and returns the difference.
Parameters:anOther (Quantity_Period &) –
Return type:Quantity_Period
Values()
  • Decomposes this period into a number of days,hours, minutes,seconds,milliseconds and microseconds Example of return values: 2 days, 15 hours, 0 minute , 0 second 0 millisecond and 0 microsecond
Parameters:
  • dd (Standard_Integer &) –
  • hh (Standard_Integer &) –
  • mn (Standard_Integer &) –
  • ss (Standard_Integer &) –
  • mis (Standard_Integer &) –
  • mics (Standard_Integer &) –
Return type:

None

  • Returns the number of seconds in Ss and the number of remainding microseconds in Mics of this period. Example of return values: 3600 seconds and 0 microseconds
Parameters:
  • ss (Standard_Integer &) –
  • mics (Standard_Integer &) –
Return type:

None

thisown

The membership flag

OCC.Quantity.Quantity_Period_IsValid(*args)
  • Checks the validity of a Period in form (dd,hh,mn,ss,mil,mic) With: 0 <= dd 0 <= hh 0 <= mn 0 <= ss 0 <= mis 0 <= mics
Parameters:
  • dd (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

bool

  • Checks the validity of a Period in form (dd,hh,mn,ss,mil,mic) With: 0 <= dd 0 <= hh 0 <= mn 0 <= ss 0 <= mis 0 <= mics
Parameters:
  • dd (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

bool

  • Checks the validity of a Period in form (dd,hh,mn,ss,mil,mic) With: 0 <= dd 0 <= hh 0 <= mn 0 <= ss 0 <= mis 0 <= mics
Parameters:
  • dd (Standard_Integer) –
  • hh (Standard_Integer) –
  • mn (Standard_Integer) –
  • ss (Standard_Integer) –
  • mis (Standard_Integer) – default value is 0
  • mics (Standard_Integer) – default value is 0
Return type:

bool

  • Checks the validity of a Period in form (ss,mic) With: 0 <= ss 0 <= mics
Parameters:
  • ss (Standard_Integer) –
  • mics (Standard_Integer) – default value is 0
Return type:

bool

  • Checks the validity of a Period in form (ss,mic) With: 0 <= ss 0 <= mics
Parameters:
  • ss (Standard_Integer) –
  • mics (Standard_Integer) – default value is 0
Return type:

bool

class OCC.Quantity.SwigPyIterator(*args, **kwargs)

Bases: object

advance()
copy()
decr()
distance()
equal()
incr()
next()
previous()
thisown

The membership flag

value()