The object of the CENPyOlpEventRuleOperator class is passed to the PostExecute callback as a parameter.
It can be used to obtain the required operators within the scope of the PostExecute callback in the %EVENTRULENAME%.py script file, located in the folder of the plugin.
[Example]
def PostExecute(reo):
tpes = reo.FindTpElementsByType(EVENTPROCESS_INPROCESS)
for x in tpes:
reo.AddTpe(x)
[Example]
attribGetter = reo.GetAttribGetter()
[Example]
attribSetter = reo.GetAttribSetter()
[Example]
logger = reo.GetLoggerOperator()
[Example]
currentPGoperator = reo.GetCurrentProcessGeometryOperator()
This method does not return elements of given EventProcessType but it returns
those elements where it is possible to attach events of given EventProcessType.
[Example]
tpes = reo.FindTpElementsByType(EVENTPROCESS_INPROCESS)
Method returns olp toolpath elements fitting to positions in given array by taking given tolerance into account
[Example]
list = [0.25, 0.75]
tpesPos = reo.FindTpElementsByPositions(list, 0.1)
for x in tpes:
reo.AddTpe(x)
myMat = x.GetMatrix()
logOperator.LogDebug(str(myMat.GetPosition().GetXYZ()))
logOperator.LogDebug(str(myMat.GetRotation()))
Method returns olp toolpath elements fitting given request id
[Example]
tpes = reo.FindTpElementsByType(INT_ID)
|
|
Given technology request id - originally passed through by technology
|
|
|
list of CENPyOlpTpElement objects found
|
Method returns olp toolpath elements fitting given technology request id
[Example]
tpes = reo.FindTpeByTechRequestId(INT_ID)
•
|
SetActiveEvent(index: int)
|
Set the active event by the list index.
[Example]
reo.SetActiveEvent(1)
Adds event to toolpath element
[Example]
reo.AddTpe(x)
|