OCC.Core.TFunction module¶
TFunction module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_tfunction.html
-
class
SwigPyIterator(*args, **kwargs)¶ Bases:
object-
advance()¶
-
copy()¶
-
decr()¶
-
distance()¶
-
equal()¶
-
incr()¶
-
next()¶
-
previous()¶
-
property
thisown¶ The membership flag
-
value()¶
-
-
class
TFunction_Array1OfDataMapOfGUIDDriver(*args)¶ Bases:
object-
Assign()¶
-
ChangeFirst()¶
-
ChangeLast()¶
-
ChangeValue()¶
-
First()¶
-
Init()¶
-
IsAllocated()¶
-
IsDeletable()¶
-
IsEmpty()¶
-
Last()¶
-
Length()¶
-
Lower()¶
-
Move()¶
-
Resize()¶
-
Set()¶
-
SetValue()¶
-
Size()¶
-
Upper()¶
-
Value()¶
-
begin()¶
-
cbegin()¶
-
cend()¶
-
end()¶
-
next()¶
-
property
thisown¶ The membership flag
-
-
class
TFunction_DataMapOfGUIDDriver(*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
TFunction_DataMapOfLabelListOfLabel(*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
TFunction_DoubleMapOfIntegerLabel(*args)¶ Bases:
object-
AreBound()¶
-
Assign()¶
-
Bind()¶
-
Clear()¶
-
Exchange()¶
-
Find1()¶
-
Find2()¶
-
IsBound1()¶
-
IsBound2()¶
-
ReSize()¶
-
Seek1()¶
-
Seek2()¶
-
Set()¶
-
Size()¶
-
UnBind1()¶
-
UnBind2()¶
-
property
thisown¶ The membership flag
-
-
class
TFunction_Driver(*args, **kwargs)¶ Bases:
OCC.Core.Standard.Standard_TransientEmpty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Arguments()¶ - The method fills-in the list by labels, where the arguments of the function are located.
- param args
- type args
TDF_LabelList &
- rtype
void
-
static
DownCast(t)¶
-
Execute()¶ - Executes the function in this function driver and puts the impacted labels in the logbook log. arguments & results of functions ================================
- param log
- type log
opencascade::handle<TFunction_Logbook> &
- rtype
int
-
Init()¶ - Initializes the label L for this function prior to its execution.
- param L
- type L
TDF_Label &
- rtype
None
-
Label()¶ - Returns the label of the driver for this function.
- rtype
TDF_Label
-
MustExecute()¶ - Analyzes the labels in the logbook log. Returns true if attributes have been modified. If the function label itself has been modified, the function must be executed.
- param log
- type log
opencascade::handle<TFunction_Logbook> &
- rtype
bool
-
Results()¶ - The method fills-in the list by labels, where the results of the function are located.
- param res
- type res
TDF_LabelList &
- rtype
void
-
Validate()¶ - Validates labels of a function in <log>. This function is the one initialized in this function driver. Warning In regeneration mode, the solver must call this method even if the function is not executed. execution of function =====================
- param log
- type log
opencascade::handle<TFunction_Logbook> &
- rtype
void
-
property
thisown¶ The membership flag
-
class
TFunction_DriverTable(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient- Default constructor
- rtype
None
-
AddDriver()¶ - Returns true if the driver has been added successfully to the driver table.
- param guid
- type guid
Standard_GUID &
- param driver
- type driver
opencascade::handle<TFunction_Driver> &
- param thread
default value is 0
- type thread
int
- rtype
bool
-
Clear()¶ - Removes all drivers. Returns true if the driver has been removed successfully.
- rtype
None
-
static
DownCast(t)¶
-
DumpToString(TFunction_DriverTable self) → std::string¶
-
FindDriver()¶ - Returns true if the driver was found.
- param guid
- type guid
Standard_GUID &
- param driver
- type driver
opencascade::handle<TFunction_Driver> &
- param thread
default value is 0
- type thread
int
- rtype
bool
-
static
Get()¶ - Returns the driver table. If a driver does not exist, creates it.
- rtype
opencascade::handle<TFunction_DriverTable>
-
HasDriver()¶ - Returns true if the driver exists in the driver table.
- param guid
- type guid
Standard_GUID &
- param thread
default value is 0
- type thread
int
- rtype
bool
-
RemoveDriver()¶ - Removes a driver with the given GUID. Returns true if the driver has been removed successfully.
- param guid
- type guid
Standard_GUID &
- param thread
default value is 0
- type thread
int
- rtype
bool
-
property
thisown¶ The membership flag
-
class
TFunction_Function(*args)¶ Bases:
OCC.Core.TDF.TDF_Attribute- Return type
-
static
DownCast(t)¶
-
DumpToString(TFunction_Function self) → std::string¶
-
Failed()¶ - Returns true if the execution failed
- rtype
bool
-
GetDriverGUID()¶ - Returns the GUID for this function’s driver.
- rtype
Standard_GUID
-
GetFailure()¶ - Returns an index of failure if the execution of this function failed. If this integer value is 0, no failure has occurred. Implementation of Attribute methods: ===================================
- rtype
int
-
static
GetID()¶ - Returns the GUID for functions. Returns a function found on the label. Instance methods: ================
- rtype
Standard_GUID
-
static
Set()¶ - Static methods: ============== Finds or Creates a function attribute on the label <L>. Returns the function attribute.
- param L
- type L
TDF_Label &
- rtype
opencascade::handle<TFunction_Function>* Finds or Creates a function attribute on the label <L>. Sets a driver ID to the function. Returns the function attribute.
- param L
- type L
TDF_Label &
- param DriverID
- type DriverID
Standard_GUID &
- rtype
opencascade::handle<TFunction_Function>
-
SetDriverGUID()¶ - Sets the driver for this function as that indentified by the GUID guid.
- param guid
- type guid
Standard_GUID &
- rtype
None
-
SetFailure()¶ - Sets the failed index.
- param mode
default value is 0
- type mode
int
- rtype
None
-
property
thisown¶ The membership flag
-
class
TFunction_GraphNode(*args)¶ Bases:
OCC.Core.TDF.TDF_Attribute- Return type
-
AddNext()¶ - Defines a reference to the function as a next one.
- param funcID
- type funcID
int
- rtype
bool* Defines a reference to the function as a next one.
- param func
- type func
TDF_Label &
- rtype
bool
-
AddPrevious()¶ - Defines a reference to the function as a previous one.
- param funcID
- type funcID
int
- rtype
bool* Defines a reference to the function as a previous one.
- param func
- type func
TDF_Label &
- rtype
bool
-
static
DownCast(t)¶
-
DumpToString(TFunction_GraphNode self) → std::string¶
-
static
GetID()¶ - Returns the GUID for GraphNode attribute. Instant methods =============== Constructor (empty).
- rtype
Standard_GUID
-
GetNext()¶ - Returns a map of next functions.
- rtype
TColStd_MapOfInteger
-
GetPrevious()¶ - Returns a map of previous functions.
- rtype
TColStd_MapOfInteger
-
GetStatus()¶ - Returns the execution status of the function.
- rtype
TFunction_ExecutionStatus
-
RemoveAllNext()¶ - Clears a map of next functions.
- rtype
None
-
RemoveAllPrevious()¶ - Clears a map of previous functions.
- rtype
None
-
RemoveNext()¶ - Removes a reference to the function as a next one.
- param funcID
- type funcID
int
- rtype
bool* Removes a reference to the function as a next one.
- param func
- type func
TDF_Label &
- rtype
bool
-
RemovePrevious()¶ - Removes a reference to the function as a previous one.
- param funcID
- type funcID
int
- rtype
bool* Removes a reference to the function as a previous one.
- param func
- type func
TDF_Label &
- rtype
bool
-
static
Set()¶ - Static methods ============== Finds or Creates a graph node attribute at the label <L>. Returns the attribute.
- param L
- type L
TDF_Label &
- rtype
opencascade::handle<TFunction_GraphNode>
-
SetStatus()¶ - Defines an execution status for a function. Implementation of Attribute methods ===================================
- param status
- type status
TFunction_ExecutionStatus
- rtype
None
-
property
thisown¶ The membership flag
-
class
TFunction_HArray1OfDataMapOfGUIDDriver(*args)¶ Bases:
OCC.Core.TFunction.TFunction_Array1OfDataMapOfGUIDDriver,OCC.Core.Standard.Standard_TransientEmpty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Array1()¶
-
ChangeArray1()¶
-
static
DownCast(t)¶
-
property
thisown¶ The membership flag
-
class
TFunction_IFunction(*args)¶ Bases:
object- Return type
None* A constructor. Initializes the interface by the label of function. :param L: :type L: TDF_Label & :rtype: None
-
Arguments()¶ - The method fills-in the list by labels, where the arguments of the function are located.
- param args
- type args
TDF_LabelList &
- rtype
None
-
static
DeleteFunction()¶ - Deletes a function attached to a label <L>. It deletes a TFunction_Function attribute and a TFunction_GraphNode. It deletes the functions from the scope of function of this document.
- param L
- type L
TDF_Label &
- rtype
bool
-
GetAllFunctions()¶ - Returns the scope of all functions.
- rtype
TFunction_DoubleMapOfIntegerLabel
-
GetDriver()¶ - Returns a driver of the function.
- param thread
default value is 0
- type thread
int
- rtype
opencascade::handle<TFunction_Driver>
-
GetGraphNode()¶ - Returns a graph node of the function.
- rtype
opencascade::handle<TFunction_GraphNode>
-
GetLogbook()¶ - Returns the Logbook - keeper of modifications.
- rtype
opencascade::handle<TFunction_Logbook>
-
GetNext()¶ - Returns a list of next functions.
- param prev
- type prev
TDF_LabelList &
- rtype
None
-
GetPrevious()¶ - Returns a list of previous functions.
- param prev
- type prev
TDF_LabelList &
- rtype
None
-
GetStatus()¶ - Returns the execution status of the function.
- rtype
TFunction_ExecutionStatus
-
Init()¶ - Initializes the interface by the label of function.
- param L
- type L
TDF_Label &
- rtype
None
-
Label()¶ - Returns a label of the function.
- rtype
TDF_Label
-
static
NewFunction()¶ - Sets a new function attached to a label <L> with <ID>. It creates a new TFunction_Function attribute initialized by the <ID>, a new TFunction_GraphNode with an empty list of dependencies and the status equal to TFunction_ES_WrongDefinition. It registers the function in the scope of functions for this document.
- param L
- type L
TDF_Label &
- param ID
- type ID
Standard_GUID &
- rtype
bool
-
Results()¶ - The method fills-in the list by labels, where the results of the function are located.
- param res
- type res
TDF_LabelList &
- rtype
None
-
SetStatus()¶ - Defines an execution status for a function.
- param status
- type status
TFunction_ExecutionStatus
- rtype
None
-
UpdateDependencies()¶ - Updates dependencies for all functions of the scope. It returns false in case of an error. An empty constructor.
- param Access
- type Access
TDF_Label &
- rtype
bool* Updates the dependencies of this function only.
- rtype
bool
-
property
thisown¶ The membership flag
-
class
TFunction_Iterator(*args)¶ Bases:
object- An empty constructor.
- rtype
None* A constructor. Initializes the iterator.
- param Access
- type Access
TDF_Label &
- rtype
None
-
Current()¶ - Returns the current list of functions. If the iterator uses the execution status, the returned list contains only the functions with ‘not executed’ status.
- rtype
TDF_LabelList
-
DumpToString(TFunction_Iterator self) → std::string¶
-
GetMaxNbThreads()¶ - Analyses the graph of dependencies and returns maximum number of threads may be used to calculate the model.
- rtype
int
-
GetStatus()¶ - A help-function aimed to help the user to check the status of retrurned function. It calls TFunction_GraphNode::GetStatus() inside.
- param func
- type func
TDF_Label &
- rtype
TFunction_ExecutionStatus
-
GetUsageOfExecutionStatus()¶ - Returns usage of execution status by the iterator.
- rtype
bool
-
Init()¶ - Initializes the Iterator.
- param Access
- type Access
TDF_Label &
- rtype
void
-
More()¶ - Returns false if the graph of functions is fully iterated.
- rtype
bool
-
Next()¶ - Switches the iterator to the next list of current functions.
- rtype
void
-
SetStatus()¶ - A help-function aimed to help the user to change the execution status of a function. It calls TFunction_GraphNode::SetStatus() inside.
- param func
- type func
TDF_Label &
- param status
- type status
TFunction_ExecutionStatus
- rtype
None
-
SetUsageOfExecutionStatus()¶ - Defines the mode of iteration - usage or not of the execution status. If the iterator takes into account the execution status, the method ::Current() returns only ‘not executed’ functions while their status is not changed. If the iterator ignores the execution status, the method ::Current() returns the functions following their dependencies and ignoring the execution status.
- param usage
- type usage
bool
- rtype
None
-
property
thisown¶ The membership flag
-
class
TFunction_Logbook(*args)¶ Bases:
OCC.Core.TDF.TDF_Attribute- The methods manipulating the data (touched, impacted and valid labels) Constructor (empty).
- rtype
None
-
Clear()¶ - Clears this logbook to its default, empty state.
- rtype
None
-
Done()¶ - Sets status of execution.
- param status
- type status
bool
- rtype
None
-
static
DownCast(t)¶
-
DumpToString(TFunction_Logbook self) → std::string¶
-
static
GetID()¶ - Returns the GUID for logbook attribute.
- rtype
Standard_GUID
-
GetImpacted()¶ - Returns the map of impacted labels contained in this logbook.
- rtype
TDF_LabelMap
-
GetTouched()¶ - Returns the map of touched labels in this logbook. A touched label is the one modified by the end user.
- rtype
TDF_LabelMap
-
GetValid()¶ - Returns the map of valid labels in this logbook.
- rtype
TDF_LabelMap:param Ls:
- type Ls
TDF_LabelMap &
- rtype
None
-
IsDone()¶ - Returns status of execution.
- rtype
bool
-
IsModified()¶ - Returns True if the label L is touched or impacted. This method is called by <TFunction_FunctionDriver::MustExecute>. If <WithChildren> is set to true, the method checks all the sublabels of <L> too.
- param L
- type L
TDF_Label &
- param WithChildren
default value is Standard_False
- type WithChildren
bool
- rtype
bool
-
static
Set()¶ - Finds or Creates a TFunction_Logbook attribute at the root label accessed by <Access>. Returns the attribute.
- param Access
- type Access
TDF_Label &
- rtype
opencascade::handle<TFunction_Logbook>
-
SetImpacted()¶ - Sets the label L as an impacted label in this logbook. This method is called by execution of the function driver.
- param L
- type L
TDF_Label &
- param WithChildren
default value is Standard_False
- type WithChildren
bool
- rtype
None
-
SetTouched()¶ - Sets the label L as a touched label in this logbook. In other words, L is understood to have been modified by the end user.
- param L
- type L
TDF_Label &
- rtype
None
-
SetValid()¶ - Sets the label L as a valid label in this logbook.
- param L
- type L
TDF_Label &
- param WithChildren
default value is Standard_False
- type WithChildren
bool
- rtype
None:param Ls:
- type Ls
TDF_LabelMap &
- rtype
None
-
property
thisown¶ The membership flag
-
class
TFunction_Scope(*args)¶ Bases:
OCC.Core.TDF.TDF_Attribute- Return type
-
AddFunction()¶ - Adds a function to the scope of functions.
- param L
- type L
TDF_Label &
- rtype
bool
-
ChangeFunctions()¶ - Returns the scope of functions for modification. Warning: Don’t use this method if You are not sure what You do!
- rtype
TFunction_DoubleMapOfIntegerLabel
-
static
DownCast(t)¶
-
DumpToString(TFunction_Scope self) → std::string¶
-
GetFunction()¶ - Returns an ID of the function.
- param L
- type L
TDF_Label &
- rtype
int* Returns the label of the function with this ID.
- param ID
- type ID
int
- rtype
TDF_Label
-
GetFunctions()¶ - Returns the scope of functions.
- rtype
TFunction_DoubleMapOfIntegerLabel
-
static
GetID()¶ - Returns the GUID for Scope attribute. Instant methods =============== Constructor (empty).
- rtype
Standard_GUID
-
GetLogbook()¶ - Returns the Logbook used in TFunction_Driver methods. Implementation of Attribute methods ===================================
- rtype
opencascade::handle<TFunction_Logbook>
-
HasFunction()¶ - Returns true if the function exists with such an ID.
- param ID
- type ID
int
- rtype
bool* Returns true if the label contains a function of this scope.
- param L
- type L
TDF_Label &
- rtype
bool
-
RemoveAllFunctions()¶ - Removes all functions from the scope of functions.
- rtype
None
-
RemoveFunction()¶ - Removes a function from the scope of functions.
- param L
- type L
TDF_Label &
- rtype
bool* Removes a function from the scope of functions.
- param ID
- type ID
int
- rtype
bool
-
static
Set()¶ - Static methods ============== Finds or Creates a TFunction_Scope attribute at the root label accessed by <Access>. Returns the attribute.
- param Access
- type Access
TDF_Label &
- rtype
opencascade::handle<TFunction_Scope>
-
SetFreeID()¶ - Parameters
ID –
- type ID
int
- rtype
None
-
property
thisown¶ The membership flag