OCC.Core.MoniTool module¶
MoniTool module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_monitool.html
-
class
MoniTool_AttrList
(*args)¶ Bases:
object
- Creates an AttrList, empty
- rtype
None* Creates an AttrList from another one, definitions are shared (calls SameAttributes)
- param other
- type other
MoniTool_AttrList
- rtype
None
-
AttrList
()¶ - Returns the exhaustive list of attributes
- rtype
NCollection_DataMap<TCollection_AsciiString, opencascade::handle<Standard_Transient> >
-
Attribute
()¶ - Returns an attribute from its name. Null Handle if not recorded (whatever Transient, Integer, Real …) Integer is recorded as IntVal Real is recorded as RealVal Text is recorded as HAsciiString
- param name
- type name
char *
- rtype
opencascade::handle<Standard_Transient>
-
AttributeType
()¶ - Returns the type of an attributeValueInt , ValueReal , ValueText (String) , ValueIdent (any) or ValueVoid (not recorded)
- param name
- type name
char *
- rtype
MoniTool_ValueType
-
GetAttribute
()¶ - Returns an attribute from its name, filtered by a type If no attribute has this name, or if it is not kind of this type, <val> is Null and returned value is False Else, it is True
- param name
- type name
char *
- param type
- type type
Standard_Type
- param val
- type val
Standard_Transient
- rtype
bool
-
GetAttributes
()¶ - Gets the list of attributes from <other>, by copying it By default, considers all the attributes from <other> If <fromname> is given, considers only the attributes with name beginning by <fromname> //! For each attribute, if <copied> is True (D), its value is also copied if it is a basic type (Integer,Real,String), else it remains shared between <other> and <self> //! These new attributes are added to the existing ones in <self>, in case of same name, they replace the existing ones
- param other
- type other
MoniTool_AttrList
- param fromname
default value is
- type fromname
char *
- param copied
default value is Standard_True
- type copied
bool
- rtype
None
-
GetIntegerAttribute
()¶ - Returns an attribute from its name, as integer If no attribute has this name, or not an integer, <val> is 0 and returned value is False Else, it is True
- param name
- type name
char *
- param val
- type val
int
- rtype
bool
-
GetRealAttribute
()¶ - Returns an attribute from its name, as real If no attribute has this name, or not a real <val> is 0.0 and returned value is False Else, it is True
- param name
- type name
char *
- param val
- type val
float
- rtype
bool
-
GetStringAttribute
()¶ - Returns an attribute from its name, as String If no attribute has this name, or not a String <val> is 0.0 and returned value is False Else, it is True
- param name
- type name
char *
- param val
- type val
char *
- rtype
bool
-
IntegerAttribute
()¶ - Returns an integer attribute from its name. 0 if not recorded
- param name
- type name
char *
- rtype
int
-
RealAttribute
()¶ - Returns a real attribute from its name. 0.0 if not recorded
- param name
- type name
char *
- rtype
float
-
RemoveAttribute
()¶ - Removes an attribute Returns True when done, False if this attribute did not exist
- param name
- type name
char *
- rtype
bool
-
SameAttributes
()¶ - Gets the list of attributes from <other>, as such, i.e. not copiedattributes are shared, any attribute edited, added, or removed in <other> is also in <self> and vice versa The former list of attributes of <self> is dropped
- param other
- type other
MoniTool_AttrList
- rtype
None
-
SetAttribute
()¶ - Adds an attribute with a given name (replaces the former one with the same name if already exists)
- param name
- type name
char *
- param val
- type val
Standard_Transient
- rtype
None
-
SetIntegerAttribute
()¶ - Adds an integer value for an attribute
- param name
- type name
char *
- param val
- type val
int
- rtype
None
-
SetRealAttribute
()¶ - Adds a real value for an attribute
- param name
- type name
char *
- param val
- type val
float
- rtype
None
-
SetStringAttribute
()¶ - Adds a String value for an attribute
- param name
- type name
char *
- param val
- type val
char *
- rtype
None
-
StringAttribute
()¶ - Returns a String attribute from its name. ‘’ if not recorded
- param name
- type name
char *
- rtype
char *
-
property
thisown
¶ The membership flag
-
class
MoniTool_CaseData
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Creates a CaseData with a CaseId and a Name (by default not defined)
- param caseid
default value is
- type caseid
char *
- param name
default value is
- type name
char *
- rtype
None
-
AddAny
()¶ - Adds a Transient, with no more meaning
- param val
- type val
Standard_Transient
- param name
default value is
- type name
char *
- rtype
None
-
AddCPU
()¶ - Adds the CPU time between lastCPU and now if <curCPU> is given, the CPU amount is curCPU-lastCPU else it is currently measured CPU - lastCPU lastCPU has been read by call to GetCPU See GetCPU to get amount, and LargeCPU to test large amount
- param lastCPU
- type lastCPU
float
- param curCPU
default value is 0
- type curCPU
float
- param name
default value is
- type name
char *
- rtype
None
-
AddData
()¶ - Unitary adding a data; rather internal
- param val
- type val
Standard_Transient
- param kind
- type kind
int
- param name
default value is
- type name
char *
- rtype
None
-
AddEntity
()¶ - Adds a Transient, as an Entity from an InterfaceModel for instanceit will then be printed with the help of a DBPE
- param ent
- type ent
Standard_Transient
- param name
default value is
- type name
char *
- rtype
None
-
AddGeom
()¶ - Adds a Geometric as a Transient (Curve, Surface …)
- param geom
- type geom
Standard_Transient
- param name
default value is
- type name
char *
- rtype
None
-
AddInteger
()¶ - Adds an Integer
- param val
- type val
int
- param name
default value is
- type name
char *
- rtype
None
-
AddRaised
()¶ - Adds the currently caught exception
- param theException
- type theException
Standard_Failure
- param name
default value is
- type name
char *
- rtype
None
-
AddReal
()¶ - Adds a Real
- param val
- type val
float
- param name
default value is
- type name
char *
- rtype
None
-
AddReals
()¶ - Adds two reals (for instance, two parameters)
- param v1
- type v1
float
- param v2
- type v2
float
- param name
default value is
- type name
char *
- rtype
None
-
AddShape
()¶ - Adds a Shape (recorded as a HShape)
- param sh
- type sh
TopoDS_Shape
- param name
default value is
- type name
char *
- rtype
None
-
AddText
()¶ - Adds a Text (as HAsciiString)
- param text
- type text
char *
- param name
default value is
- type name
char *
- rtype
None
-
AddXY
()¶ - Adds a XY
- param aXY
- type aXY
gp_XY
- param name
default value is
- type name
char *
- rtype
None
-
AddXYZ
()¶ - Adds a XYZ
- param aXYZ
- type aXYZ
gp_XYZ
- param name
default value is
- type name
char *
- rtype
None
-
CaseId
()¶ - Returns the CaseId
- rtype
char *
-
Data
()¶ - Returns a data item (n0 <nd> in the set <num>)
- param nd
- type nd
int
- rtype
opencascade::handle<Standard_Transient>
-
static
DefCheck
()¶ - Returns Check Status for a Code0 non/info (default), 1 warning, 2 fail //! RemarkDefCheck is used to set the check status of a CaseData when it is attached to a case code, it can be changed later (by SetFail, SetWarning, ResetCheck)
- param acode
- type acode
char *
- rtype
int
-
static
DefMsg
()¶ - Returns the message definition for a case code Empty if no message attached
- param casecode
- type casecode
char *
- rtype
char *
-
static
DownCast
(t)¶
-
GetCPU
()¶ - Returns the current amount of CPU This allows to laterly test and record CPU amount Its value has to be given to LargeCPU and AddCPU
- rtype
float
-
GetData
()¶ - Returns a data item, under control of a Type If the data item is kind of this type, it is returned in <val> and the returned value is True Else, <val> is unchanged and the returned value is False
- param nd
- type nd
int
- param type
- type type
Standard_Type
- param val
- type val
Standard_Transient
- rtype
bool
-
Integer
()¶ - Returns an Integer
- param nd
- type nd
int
- param val
- type val
int
- rtype
bool
-
IsCheck
()¶ - Tells if <self> is Check (Warning or Fail), else it is Info
- rtype
bool
-
IsFail
()¶ - Tells if <self> is Fail
- rtype
bool
-
IsWarning
()¶ - Tells if <self> is Warning
- rtype
bool
-
Kind
()¶ - Returns the kind of a dataKIND TYPE MEANING 0 ANY any (not one of the followings) 1 EX raised exception 2 EN entity 3 G geom 4 SH shape 5 XYZ XYZ 6 XY or UV XY 7 RR 2 reals 8 R 1 real 9 CPU CPU (1 real) 10 T text 11 I integer //! For NameNum, these codes for TYPE must be given exact i.e. SH for a Shape, not S nor SHAPE nor SOLID etc
- param nd
- type nd
int
- rtype
int
-
LargeCPU
()¶ - Tells if a CPU time amount is large <maxCPU> gives the amount over which an amount is large <lastCPU> gives the start CPU amount if <curCPU> is given, the tested CPU amount is curCPU-lastCPU else it is currently measured CPU - lastCPU
- param maxCPU
- type maxCPU
float
- param lastCPU
- type lastCPU
float
- param curCPU
default value is 0
- type curCPU
float
- rtype
bool
-
Msg
()¶ - Returns a Msg from a CaseDatait is build from DefMsg, which gives the message code plus the designation of items of the CaseData to be added to the Msg Empty if no message attached //! Remains to be implemented
- rtype
Message_Msg
-
Name
()¶ - Returns the Name
- rtype
char ** Returns the name of a data. If it has no name, the string is empty (length = 0)
- param nd
- type nd
int
- rtype
TCollection_AsciiString
-
NameNum
()¶ - Returns the first suitable data rank for a given name Exact maching (exact case, no completion) is required Firstly checks the recorded names If not found, considers the name as followsName = ‘TYPE’search for the first item with this TYPE Name = ‘TYPE:nn’search for the nn.th item with this TYPE See allowed values in method Kind
- param name
- type name
char *
- rtype
int
-
NbData
()¶ - Returns the count of data recorded to a set
- rtype
int
-
Real
()¶ - Returns a real or CPU amount (stored in Geom2d_CartesianPoint) (allows an Integer converted to a Real)
- param nd
- type nd
int
- param val
- type val
float
- rtype
bool
-
Reals
()¶ - Returns a couple of reals (stored in Geom2d_CartesianPoint)
- param nd
- type nd
int
- param v1
- type v1
float
- param v2
- type v2
float
- rtype
bool
-
RemoveData
()¶ - Removes a Data from its rank. Does nothing if out of range
- param num
- type num
int
- rtype
None
-
ResetCheck
()¶ - Resets Check Status, i.e. sets <self> as Info
- rtype
None
-
SetCaseId
()¶ - Sets a CaseId
- param caseid
- type caseid
char *
- rtype
None
-
SetChange
()¶ - Sets the next Add… not to add but to change the data item designated by its name. If next Add… is not called with a name, SetChange is ignored Reset by next Add… , whatever <num> is correct or not
- rtype
None
-
static
SetDefFail
()¶ - Sets a Code to give a Fail
- param acode
- type acode
char *
- rtype
void
-
static
SetDefMsg
()¶ - Attaches a message definition to a case code This definition includes the message code plus designation of items of the CaseData to be added to the message (this part not yet implemented)
- param casecode
- type casecode
char *
- param mesdef
- type mesdef
char *
- rtype
void
-
static
SetDefWarning
()¶ - Sets a Code to give a Warning
- param acode
- type acode
char *
- rtype
void
-
SetFail
()¶ - Sets <self> as Fail
- rtype
None
-
SetName
()¶ - Sets a Name
- param name
- type name
char *
- rtype
None
-
SetReplace
()¶ - Sets the next Add… not to add but to replace the data item <num>, if <num> is between 1 and NbData. Reset by next Add… , whatever <num> is correct or not
- param num
- type num
int
- rtype
None
-
SetWarning
()¶ - Sets <self> as Warning
- rtype
None
-
Shape
()¶ - Returns a data as a shape, Null if not a shape
- param nd
- type nd
int
- rtype
TopoDS_Shape
-
Text
()¶ - Returns a text (stored in TCollection_HAsciiString)
- param nd
- type nd
int
- param text
- type text
char *
- rtype
bool
-
XY
()¶ - Returns a data as a XY (i.e. Geom2d_CartesianPoint) Returns False if not the good type
- param nd
- type nd
int
- param val
- type val
gp_XY
- rtype
bool
-
XYZ
()¶ - Returns a data as a XYZ (i.e. Geom_CartesianPoint) Returns False if not the good type
- param nd
- type nd
int
- param val
- type val
gp_XYZ
- rtype
bool
-
property
thisown
¶ The membership flag
-
class
MoniTool_DataInfo
¶ Bases:
object
-
static
Type
()¶ - Returns the Type attached to an object Here, the Dynamic Type of a Transient. Null Type if unknown
- param ent
- type ent
Standard_Transient
- rtype
opencascade::handle<Standard_Type>
-
static
TypeName
()¶ - Returns Type Name (string) Allows to name type of non-handled objects
- param ent
- type ent
Standard_Transient
- rtype
char *
-
property
thisown
¶ The membership flag
-
static
-
class
MoniTool_DataMapOfShapeTransient
(*args)¶ Bases:
object
-
Assign
()¶
-
Bind
()¶
-
Bound
()¶
-
ChangeFind
()¶
-
ChangeSeek
()¶
-
Clear
()¶
-
Exchange
()¶
-
Find
()¶
-
IsBound
()¶
-
ReSize
()¶
-
Seek
()¶
-
Set
()¶
-
Size
()¶
-
UnBind
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
MoniTool_DataMapOfTimer
(*args)¶ Bases:
object
-
Assign
()¶
-
Bind
()¶
-
Bound
()¶
-
ChangeFind
()¶
-
ChangeSeek
()¶
-
Clear
()¶
-
Exchange
()¶
-
Find
()¶
-
IsBound
()¶
-
ReSize
()¶
-
Seek
()¶
-
Set
()¶
-
Size
()¶
-
UnBind
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
MoniTool_ElemHasher
¶ Bases:
object
-
static
HashCode
()¶ - Returns hash code for the given element, in the range [1, theUpperBound]. Asks theElement its HashCode, then transforms it to be in the required range. @param theElement the element which hash code is to be computed @param theUpperBound the upper bound of the range a computing hash code must be within returns a computed hash code, in the range [1, theUpperBound]
- param theElement
- type theElement
MoniTool_Element
- param theUpperBound
- type theUpperBound
int
- rtype
int
-
static
IsEqual
()¶ - Returns True if two keys are the same. The test does not work on the Elements themselves but by calling their methods Equates
- param K1
- type K1
MoniTool_Element
- param K2
- type K2
MoniTool_Element
- rtype
bool
-
property
thisown
¶ The membership flag
-
static
-
class
MoniTool_Element
(*args, **kwargs)¶ Bases:
OCC.Core.Standard.Standard_Transient
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
ChangeAttr
()¶ - Returns (modifiable) the Attribute List
- rtype
MoniTool_AttrList
-
static
DownCast
(t)¶
-
Equates
()¶ - Specific testof equallityto be defined by each sub-class, must be False if Elements have not the same true Type, else their contents must be compared
- param other
- type other
MoniTool_Element
- rtype
bool
-
GetHashCode
()¶ - Returns the HashCode which has been stored by SetHashCode (remark that HashCode could be deferred then be defined by sub-classes, the result is the same)
- rtype
int
-
ListAttr
()¶ - Returns (readonly) the Attribute List
- rtype
MoniTool_AttrList
-
ValueType
()¶ - Returns the Type of the Value. By default, returns the DynamicType of <self>, but can be redefined
- rtype
opencascade::handle<Standard_Type>
-
ValueTypeName
()¶ - Returns the name of the Type of the Value. Default is name of ValueType, unless it is for a non-handled object
- rtype
char *
-
property
thisown
¶ The membership flag
-
class
MoniTool_HSequenceOfElement
(*args)¶ Bases:
OCC.Core.MoniTool.MoniTool_SequenceOfElement
,OCC.Core.Standard.Standard_Transient
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Append
()¶
-
ChangeSequence
()¶
-
static
DownCast
(t)¶
-
Sequence
()¶
-
property
thisown
¶ The membership flag
-
class
MoniTool_IndexedDataMapOfShapeTransient
(*args)¶ Bases:
object
-
Add
()¶
-
Assign
()¶
-
ChangeFromIndex
()¶
-
ChangeFromKey
()¶
-
ChangeSeek
()¶
-
Clear
()¶
-
Contains
()¶
-
Exchange
()¶
-
FindFromIndex
()¶
-
FindFromKey
()¶
-
FindIndex
()¶
-
FindKey
()¶
-
ReSize
()¶
-
RemoveFromIndex
()¶
-
RemoveKey
()¶
-
RemoveLast
()¶
-
Seek
()¶
-
Set
()¶
-
Size
()¶
-
Substitute
()¶
-
Swap
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
MoniTool_IntVal
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Parameters
val – default value is 0 :type val: int :rtype: None
-
static
DownCast
(t)¶
-
GetCValue
(MoniTool_IntVal self) → Standard_Integer¶
-
SetCValue
(MoniTool_IntVal self, Standard_Integer value)¶
-
property
thisown
¶ The membership flag
-
class
MoniTool_MTHasher
¶ Bases:
object
-
static
HashCode
()¶ - Returns hash code for the given string, in the range [1, theUpperBound] @param theString the string which hash code is to be computed @param theUpperBound the upper bound of the range a computing hash code must be within returns a computed hash code, in the range [1, theUpperBound]
- param theString
- type theString
char *
- param theUpperBound
- type theUpperBound
int
- rtype
int
-
static
IsEqual
()¶ - Returns True when the two CString are the same. Two same strings must have the same hashcode, the contrary is not necessary. Default Str1 == Str2
- param Str1
- type Str1
char *
- param Str2
- type Str2
char *
- rtype
bool
-
property
thisown
¶ The membership flag
-
static
-
class
MoniTool_RealVal
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Parameters
val – default value is 0.0 :type val: float :rtype: None
-
static
DownCast
(t)¶
-
GetCValue
(MoniTool_RealVal self) → Standard_Real¶
-
SetCValue
(MoniTool_RealVal self, Standard_Real value)¶
-
property
thisown
¶ The membership flag
-
class
MoniTool_SequenceOfElement
(*args)¶ Bases:
object
-
Append
()¶
-
Assign
()¶
-
ChangeFirst
()¶
-
ChangeLast
()¶
-
ChangeValue
()¶
-
Clear
()¶
-
Exchange
()¶
-
First
()¶
-
InsertAfter
()¶
-
InsertBefore
()¶
-
IsEmpty
()¶
-
Last
()¶
-
Length
()¶
-
Lower
()¶
-
Prepend
()¶
-
Remove
()¶
-
Reverse
()¶
-
Set
()¶
-
SetValue
()¶
-
Size
()¶
-
Split
()¶
-
Upper
()¶
-
Value
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
static
delNode
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
MoniTool_SignShape
(*args)¶ Bases:
OCC.Core.MoniTool.MoniTool_SignText
- Return type
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
MoniTool_SignText
(*args, **kwargs)¶ Bases:
OCC.Core.Standard.Standard_Transient
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
static
DownCast
(t)¶
-
Name
()¶ - Returns an identification of the Signature (a word), given at initialization time
- rtype
char *
-
Text
()¶ - Gives a text as a signature for a transient object in a context If the context is senseless, it can be given as Null Handle empty result if nothing to give (at least the DynamicType could be sent ?)
- param ent
- type ent
Standard_Transient
- param context
- type context
Standard_Transient
- rtype
TCollection_AsciiString
-
TextAlone
()¶ - Gives a text as a signature for a transient object alone, i.e. without defined context. By default, calls Text with undefined context (Null Handle) and if empty, then returns DynamicType
- param ent
- type ent
Standard_Transient
- rtype
TCollection_AsciiString
-
property
thisown
¶ The membership flag
-
class
MoniTool_Stat
(*args)¶ Bases:
object
- Creates a Stat form. At start, one default phase is defined, with one default step. Then, it suffises to start with a count of items (and cycles if several) then record items, to have a queryable report.
- param title
default value is
- type title
char *
- rtype
None* used when starting
- param other
- type other
MoniTool_Stat
- rtype
None
-
Add
()¶ - Directly addes items
- param nb
default value is 1
- type nb
int
- rtype
None
-
AddEnd
()¶ - Ends the AddSub and cumulates the sub-count to current level
- rtype
None
-
AddSub
()¶ - Declares a count of items to be added later. If a sub-counter is opened, its percentage multiplies this sub-count to compute the percent of current level
- param nb
default value is 1
- type nb
int
- rtype
None
-
Close
()¶ - Parameters
id –
- type id
int
- rtype
None
-
static
Current
()¶ - Return type
-
Open
()¶ - Opens a new counter with a starting count of items
- param nb
default value is 100
- type nb
int
- rtype
int
-
OpenMore
()¶ - Adds more items to be counted by Add… on current level
- param id
- type id
int
- param nb
- type nb
int
- rtype
None
-
Percent
()¶ - Parameters
fromlev – default value is 0 :type fromlev: int :rtype: float
-
property
thisown
¶ The membership flag
-
class
MoniTool_Timer
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Create timer in empty state
- rtype
None
-
Amend
()¶ - Return value of accumulated amendment on CPU time
- rtype
float
-
CPU
()¶ - Return value of CPU time minus accumulated amendment
- rtype
float
-
static
ClearTimers
()¶ - Clears map of timers
- rtype
void
-
static
ComputeAmendments
()¶ - Computes and remembers amendments for times to access, start, and stop of timer, and estimates second-order error measured by 10 nested timers
- rtype
void
-
Count
()¶ - Return value of hits counter (count of Start/Stop pairs)
- rtype
int
-
static
Dictionary
()¶ - Returns map of timers
- rtype
MoniTool_DataMapOfTimer
-
static
DownCast
(t)¶
-
DumpTimersToString
(MoniTool_Timer self) → std::string¶
-
DumpToString
(MoniTool_Timer self) → std::string¶
-
static
GetAmendments
()¶ - The computed amendmens are returned (for information only)
- param Access
- type Access
float
- param Internal
- type Internal
float
- param External
- type External
float
- param Error10
- type Error10
float
- rtype
void
-
IsRunning
()¶ - Returns value of nesting counter
- rtype
int
-
Reset
()¶ - Start, Stop and reset the timer In addition to doing that to embedded OSD_Timer, manage also counter of hits
- rtype
None
-
static
Start
()¶ - Return type
None:param name: :type name: char * :rtype: None
-
static
Stop
()¶ - Return type
None* Inline methods to conveniently start/stop timer by name Shortcut to Timer(name)->Start/Stop() :param name: :type name: char * :rtype: None
-
static
Timer
()¶ - Return type
OSD_Timer* Returns a timer from a dictionary by its name If timer not existed, creates a new one :param name: :type name: char * :rtype: opencascade::handle<MoniTool_Timer>
-
property
thisown
¶ The membership flag
-
class
MoniTool_TimerSentry
(*args)¶ Bases:
object
- Constructor creates an instance and runs the corresponding timer
- param cname
- type cname
char *
- rtype
None* Constructor creates an instance and runs the corresponding timer
- param timer
- type timer
MoniTool_Timer
- rtype
None
-
Stop
()¶ - Manually stops the timer
- rtype
None
-
Timer
()¶ - Return type
opencascade::handle<MoniTool_Timer>
-
property
thisown
¶ The membership flag
-
class
MoniTool_TransientElem
(*args)¶ Bases:
OCC.Core.MoniTool.MoniTool_Element
- Creates a TransientElem with a Value. This Value can then not be changed. It is used by the Hasher to compute the HashCode, which will then be stored for an immediate reading.
- param akey
- type akey
Standard_Transient
- rtype
None
-
static
DownCast
(t)¶
-
Value
()¶ - Returns the contained value
- rtype
opencascade::handle<Standard_Transient>
-
property
thisown
¶ The membership flag
-
class
MoniTool_TypedValue
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Creates a TypedValue, with a name //! type gives the type of the parameter, default is free text Also availableInteger, Real, Enum, Entity (i.e. Object) More precise specifications, titles, can be given to the TypedValue once created //! init gives an initial value. If it is not given, the TypedValue begins as ‘not set’, its value is empty
- param name
- type name
char *
- param type
default value is MoniTool_ValueText
- type type
MoniTool_ValueType
- param init
default value is
- type init
char *
- rtype
None* Creates a TypedValue from another one, by duplication
- param other
- type other
MoniTool_TypedValue
- rtype
None
-
AddDef
()¶ - Completes the definition of a TypedValue by command <initext>, once created with its type Returns True if done, False if could not be interpreted <initext> may beimin ivalminimum value for an integer imax ivalmaximum value for an integer rmin rvalminimum value for a real rmax rvalmaximum value for a real unit namename of unit ematch ienum from integer value i, match required enum ienum from integer value i, match not required eval textadd an enumerative value (increments max by 1) evaladd a non-authorised enum value (to be skipped) tmax lmaximum length for a text
- param initext
- type initext
char *
- rtype
bool
-
AddEnum
()¶ - Adds enumerative definitions. For more than 10, several calls
- param v1
default value is
- type v1
char *
- param v2
default value is
- type v2
char *
- param v3
default value is
- type v3
char *
- param v4
default value is
- type v4
char *
- param v5
default value is
- type v5
char *
- param v6
default value is
- type v6
char *
- param v7
default value is
- type v7
char *
- param v8
default value is
- type v8
char *
- param v9
default value is
- type v9
char *
- param v10
default value is
- type v10
char *
- rtype
None
-
AddEnumValue
()¶ - Adds an enumeration definition, by its string and numeric values. If it is the first setting for this value, it is recorded as main value. Else, it is recognized as alternate string for this numeric value
- param val
- type val
char *
- param num
- type num
int
- rtype
None
-
static
AddLib
()¶ - Adds a TypedValue in the library. It is recorded then will be accessed by its Name Its Definition may be imposed, else it is computed as usual By default it will be accessed by its Definition (string) Returns True if done, False if tv is Null or brings no Definition or <def> not defined //! If a TypedValue was already recorded under this name, it is replaced
- param tv
- type tv
MoniTool_TypedValue
- param def
default value is
- type def
char *
- rtype
bool
-
CStringValue
()¶ - Returns the value, as a cstring. Empty if not set.
- rtype
char *
-
ClearValue
()¶ - Clears the recorded Valueit is now unset
- rtype
None
-
Definition
()¶ - Returns the Definition By priority, the enforced one, else an automatic one, computed from the specification
- rtype
TCollection_AsciiString
-
static
DownCast
(t)¶
-
EnumCase
()¶ - Returns the case number which cooresponds to a string value Works with main and additionnal values Returns (StartEnum - 1) if not OK, -1 if not an Enum
- param val
- type val
char *
- rtype
int
-
EnumDef
()¶ - Gives the Enum definitionsstart value, end value, match status. Returns True for an Enum, False else.
- param startcase
- type startcase
int
- param endcase
- type endcase
int
- param match
- type match
bool
- rtype
bool
-
EnumVal
()¶ - Returns the value of an enumerative definition, from its rank Empty string if out of range or not an Enum
- param num
- type num
int
- rtype
char *
-
static
FromLib
()¶ - Returns a COPY of the TypedValue bound with a given Name Null Handle if none recorded
- param def
- type def
char *
- rtype
opencascade::handle<MoniTool_TypedValue>
-
GetObjectValue
()¶ - Same as ObjectValue, but avoids DownCastthe receiving variable is directly loaded. It is assumed that it complies with the definition of ObjectType ! Otherwise, big trouble
- param val
- type val
Standard_Transient
- rtype
None
-
HStringValue
()¶ - Returns the value, as a opencascade::handle<canthenbeshared> Null if not defined
- rtype
opencascade::handle<TCollection_HAsciiString>
-
HasInterpret
()¶ - Tells if a TypedValue has an Interpret
- rtype
bool
-
IntegerLimit
()¶ - Gives an Integer Limit (upper if <max> True, lower if <max> False). Returns True if this limit is defined, False else (in that case, gives the natural limit for Integer)
- param max
- type max
bool
- param val
- type val
int
- rtype
bool
-
IntegerValue
()¶ - Returns the value as integer, i.e.For type = Integer, the integer itself; 0 if not set For type = Enum, the designated rank (see Enum definition) StartEnum - 1 if not set or not in the definition Else, returns 0
- rtype
int
-
Internals
()¶ - Access to internal data which have no other access
- param interp
- type interp
MoniTool_ValueInterpret
- param satisf
- type satisf
MoniTool_ValueSatisfies
- param satisname
- type satisname
char *
- param enums
- type enums
NCollection_DataMap<TCollection_AsciiString, int>
- rtype
None
-
Interpret
()¶ - Interprets a value. <native> Truereturns a native value <native> Falsereturns a coded value If the Interpret function is set, calls it Else, for an Enum, Native returns the Text, Coded returns the number STANDARD RETURNS= hval means no specific interpretation Null means senseless Can also be redefined
- param hval
- type hval
TCollection_HAsciiString
- param native
- type native
bool
- rtype
opencascade::handle<TCollection_HAsciiString>
-
IsSetValue
()¶ - Returns True if the value is set (not empty/not null object)
- rtype
bool
-
Label
()¶ - Returns the label, if set; else returns an empty string
- rtype
char *
-
static
Lib
()¶ - Returns the TypedValue bound with a given Name Null Handle if none recorded Warningit is the original, not duplicated
- param def
- type def
char *
- rtype
opencascade::handle<MoniTool_TypedValue>
-
static
LibList
()¶ - Returns the list of names of items of the Library of Types – Library of TypedValue as Valued Parameters, – – accessed by parameter name for use by management of Static Parameters
- rtype
opencascade::handle<TColStd_HSequenceOfAsciiString>
-
MaxLength
()¶ - Returns the maximum length, 0 if not set
- rtype
int
-
Name
()¶ - Returns the name
- rtype
char *
-
ObjectType
()¶ - Returns the type of which an Object TypedValue must be kind of Default is Standard_Transient Null for a TypedValue not an Object
- rtype
opencascade::handle<Standard_Type>
-
ObjectTypeName
()¶ - Returns the type name of the ObjectValue, or an empty string if not set
- rtype
char *
-
ObjectValue
()¶ - Returns the value as Transient Object, only for Object/Entity Remark that the ‘HString value’ is IGNORED here Null if not set; remains to be casted
- rtype
opencascade::handle<Standard_Transient>
-
Print
()¶ - Prints definition, specification, and actual status and value
- param S
- type S
Message_Messenger
- rtype
void
-
PrintValue
()¶ - Prints only the Value
- param S
- type S
Message_Messenger
- rtype
None
-
RealLimit
()¶ - Gives an Real Limit (upper if <max> True, lower if <max> False). Returns True if this limit is defined, False else (in that case, gives the natural limit for Real)
- param max
- type max
bool
- param val
- type val
float
- rtype
bool
-
RealValue
()¶ - Returns the value as real, for a Real type TypedValue Else, returns 0.
- rtype
float
-
Satisfies
()¶ - Returns True if a value statifies the specification (remarkdoes not apply to Entitysee ObjectType, for this type, the string is just a comment)
- param hval
- type hval
TCollection_HAsciiString
- rtype
bool
-
SatisfiesName
()¶ - Returns name of specific satisfy, empty string if none
- rtype
char *
-
SetCStringValue
()¶ - Changes the value. The new one must satisfy the specification Returns False (and did not set) if the new value does not satisfy the specification Can be redefined to be managed (in a subclass)
- param val
- type val
char *
- rtype
bool
-
SetDefinition
()¶ - Enforces a Definition
- param deftext
- type deftext
char *
- rtype
None
-
SetHStringValue
()¶ - Forces a new Handle for the Value It can be empty, else (if Type is not free Text), it must satisfy the specification. Not only the value is changed, but also the way it is shared Remarkfor Type=Object, this value is not controlled, it can be set as a comment Returns False (and did not set) if the new value does not satisfy the specification Can be redefined to be managed (in a subclass)
- param hval
- type hval
TCollection_HAsciiString
- rtype
bool
-
SetIntegerLimit
()¶ - Sets an Integer limit (included) to <val>, the upper limit if <max> is True, the lower limit if <max> is False
- param max
- type max
bool
- param val
- type val
int
- rtype
None
-
SetIntegerValue
()¶ - Changes the value as an integer, only for Integer or Enum
- param ival
- type ival
int
- rtype
bool
-
SetInterpret
()¶ - Sets a specific Interpret function
- param func
- type func
MoniTool_ValueInterpret
- rtype
None
-
SetLabel
()¶ - Sets a label, which can then be displayed
- param label
- type label
char *
- rtype
None
-
SetMaxLength
()¶ - Sets a maximum length for a text (active only for a free text)
- param max
- type max
int
- rtype
None
-
SetObjectType
()¶ - Sets type of which an Object TypedValue must be kind of Error for a TypedValue not an Object (Entity)
- param typ
- type typ
Standard_Type
- rtype
None
-
SetObjectValue
()¶ - Changes the value as Transient Object, only for Object/Entity Returns False if DynamicType does not satisfy ObjectType Can be redefined to be managed (in a subclass)
- param obj
- type obj
Standard_Transient
- rtype
bool
-
SetRealLimit
()¶ - Sets a Real limit (included) to <val>, the upper limit if <max> is True, the lower limit if <max> is False
- param max
- type max
bool
- param val
- type val
float
- rtype
None
-
SetRealValue
()¶ - Changes the value as a real, only for Real
- param rval
- type rval
float
- rtype
bool
-
SetSatisfies
()¶ - Sets a specific Satisfies functionit is added to the already defined criteria It must match the formstatisfies (valHAsciiString) returns Boolean
- param func
- type func
MoniTool_ValueSatisfies
- param name
- type name
char *
- rtype
None
-
SetUnitDef
()¶ - Sets (Clears if <def> empty) a unit definition, as an equation of dimensions. TypedValue just records this definition, does not exploit it, to be done as required by user applications
- param def
- type def
char *
- rtype
None
-
StartEnum
()¶ - For an enumeration, precises the starting value (default 0) and the match conditionif True (D), the string value must match the definition, else it may take another valuein that case, the Integer Value will be Start - 1. (empty value remains allowed)
- param start
default value is 0
- type start
int
- param match
default value is Standard_True
- type match
bool
- rtype
None
-
static
StaticValue
()¶ - Returns a static value from its name, null if unknown
- param name
- type name
char *
- rtype
opencascade::handle<MoniTool_TypedValue>
-
UnitDef
()¶ - Returns the recorded unit definition, empty if not set
- rtype
char *
-
ValueType
()¶ - Returns the type of the value
- rtype
MoniTool_ValueType
-
property
thisown
¶ The membership flag