Python scripting - Event operators

CENPyOlpEvent_PEOperatorUpload

Previous  Chapter  Next

 

The object of the CENPyOlpEvent_PEOperatorUpload class is passed to the PostProcessAttributesUpload callback as a parameter.

It can be used to obtain the required operators within the scope of the PostProcessAttributesUpload callback in the %EVENT_NAME%.py script file, located in the folder of the plugin.

 

PostProcessAttributesUpload  is inherited from PostProcessAttributes.

 

[Example]

 

def PostProcessAttributesUpload(eventPeOperatorUpload):

   pass

 

 

Methods

 

GetOperationAttribCreator(): CENPyOlpAttribCreator

 

o

return

Object of CENPyOlpAttribCreator class

 

[Example]

   attribCreator = eventPeOperatorUpload.GetOperationAttribCreator()

 

 

CreateMatrix(): CENPyOlpMatrix

 

o

return

Object of CENPyOlpMatrix class

 

[Example]

   mat = eventPeOperatorUpload.CreateMatrix()

 


 

CreatePoint(x: float, y: float, z: float): CENPyOlpPoint

 

o

x

x coordinate in meters

 

o

y

y coordinate in meters

 

o

z

z coordinate in meters

 

o

return

Object of CENPyOlpPoint class

 

[Example]

   point = eventPeOperatorUpload.CreatePoint(0.0, 0.5, 1.0)

 


 

CreateVector(x: CENPyOlpTpElement, y: float, z: float): CENPyOlpVector

 

o

x

x coordinate in meters

 

o

y

y coordinate in meters

 

o

z

z coordinate in meters

 

o

return

Object of CENPyOlpVector class

 

[Example]

   vector = eventPeOperatorUpload.CreateVector(1.0, 0.0, 1.0)

 


 

SetComputationStateMatrix(tpe: CENPyOlpTpElement, state: ComputeStateMatrix, newMatrix: CENPyOlpMatrix)

 

o

tpe

Toolpath element to set matrix

 

o

state

State to set matrix to

 

o

newMatrix

new Matrix

 

[Example]

   vector = eventPeOperatorUpload.SetComputationStateMatrix(tpe, state, newMatrix)

 


 

Inherited methods

 

GetAttribGetter(): CENPyOlpAttribGetter

 

o

return

Object of CENPyOlpAttribGetter class

 

[Example]

   attribGetter = eventPeOperatorUpload.GetAttribGetter()

 


 

GetAttribSetter(): CENPyOlpAttribSetter

 

o

return

Object of CENPyOlpAttribSetter class

 

[Example]

   attribSetter = eventPeOperatorUpload.GetAttribSetter()

 

 


 

GetLoggerOperator(): CENPyOlpLogOperator

 

o

return

Object of CENPyOlpLogOperator class

 

[Example]

   logOperator = eventPeOperatorUpload.GetLoggerOperator()

 

 


 

GetRefToolpathElementPosition(): CENPyOlpMatrix

 

o

return

Object of CENPyOlpMatrix class

 

[Example]

   pos = eventPeOperatorUpload.GetRefToolpathElementPosition()

 

 


 

GetCurrentToolFrameIndex(): int

 

 

o

return

Returns the index of the current tool frame for a specific toolpath element, defined on the operation level, or -1 if active tool is not set

 

GetCurrentToolframeIndex() with lowercase "frame" can also be used.

 

[Example]

currentToolFrameIndex = Operator.GetCurrentToolFrameIndex()

 

 


 

·

GetCurrentBaseFrameIndex(): int

 

 

o

return

Returns the index of the current base frame for a specific toolpath element, defined on the operation level, or -1 if active tool is not set

 

GetCurrentBaseframeIndex() with lowercase "frame" can also be used.

 

[Example]

currentBaseFrameIndex = Operator.GetCurrentBaseFrameIndex()

 

 


 

·

GetCurrentToolFrameMatrix(): CENPyOlpMatrix

 

 

o

return

Returns the matrix of the current tool frame for a specific toolpath element, defined on the operation level

 

GetCurrentToolframeMatrix() with lowercase "frame" can also be used.

 

[Example]

currentToolFrameMatrix = Operator.GetCurrentToolFrameMatrix()

 

 


 

·

GetCurrentBaseFrameMatrix(): CENPyOlpMatrix

 

 

o

return

Returns the matrix of the current base frame for a specific toolpath element, defined on the operation level

 

GetCurrentBaseframeMatrix() with lowercase "frame" can also be used.

 

[Example]

currentBaseFrameMatrix = Operator.GetCurrentBaseFrameMatrix()

 


 

backward1 top1 forward1 home1


Previous
Previous page
Chapter
Chapter page
Next
Next page