The object of the CENPyOlpEvent_EventComputeOperator class is passed to the PostCompute callback as a parameter.
It can be used to obtain the required operators within the scope of the PostCompute callback in the %EVENT_NAME%.py script file, located in the folder of the plugin.
[Example]
def PostCompute(eco):
[Example]
attribGetter = eco.GetAttribGetter()
[Example]
logger = eco.GetLoggerOperator()
[Example]
mat = eco.CreateMatrix()
|
|
x coordinate in meters
|
|
|
y coordinate in meters
|
|
|
z coordinate in meters
|
|
|
Object of CENPyOlpPoint class
|
[Example]
point = eco.CreatePoint(0.0, 0.5, 1.0)
|
|
x coordinate in meters
|
|
|
y coordinate in meters
|
|
|
z coordinate in meters
|
|
|
Object of CENPyOlpVector class
|
[Example]
vector = eco.CreateVector(1.0, 0.0, 1.0)
Returns the reference toolpath element of the event
[Example]
refTP = eco.GetRefTpElement()
Adds a move lin element at the end
[Example]
tp = eco.MoveLin(destinationMat)
Adds a circular move element at the end
[Example]
tp = eco.MoveCir(destinationMat, viaMat)
|
|
Target matrix as object of CENPyOlpMatrix class
|
|
|
circle radius
|
|
|
direction of circle ([-1] = clockwise or [1] = counter clockwise)
|
|
|
Object of CENPyOlpTpElement class
|
Adds a circular move element at the end
Uses vector tangent current toolpath element and vector current toolpath element to target toolpath element for plane of circle
if vectors are co-linear use target as endpoint and middle of current to target as via point
[Example]
tp = eco.MoveCir(destinationMat, 0.1, -1)
Adds a circular move element at the end
[Example]
tp = eco.MoveCir(angle, radius)
|
|
start point matrix of the move circular
|
|
|
end point matrix of the move circ
|
|
|
tangent to start or end : UseTangentOf::Start, UseTangentOf::End
|
|
|
Object of CENPyOlpTpElement class
|
Adds a circular move element tangential to a matrix
[Example]
tp = eco.MoveTangentCir(startMat, endMat, USETANGENTOFSTART)
|
|
Target matrix of the move. Object of CENPyOlpMatrix class
|
|
|
PTP toolpath element added
|
Adds a point to point move element at the end
[Example]
tp = eco.MovePTP(destinationMat)
•
|
SkipPath(length: float, includeStartAndEnd: bool)
|
|
|
The lenght to be skipped
|
|
|
Flag determining whether or not to include start and end point
|
Skips the toolpath elements for a given length
[Example]
eco.SkipPath(10, False)
|
|
Length of the path after which the element should appear. Units: meters.
|
|
|
Matrix at given length, outputs warning "CENPyOlpMatrix::CENPyOlpMatrix, argument is nullptr" if could not be calculated
|
Gets initial path matrix of toolpath element at given length
Remark: When at given length no toolpath element exists temporary one is created (deleted after usage immediately)
[Example]
initMat = eco.GetToolpathElementByLength(0.1)
|
|
The element at given length, nullptr if there is none
|
Determines the base frame position of the reference element of an event.
[Example]
posMat = eco.GetRefToolpathElementPosition()
•
|
GetCurrentToolFrameIndex(): int
|
|
|
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 = eco.GetCurrentToolFrameIndex()
•
|
GetCurrentToolResourceName(): string
|
|
|
the resource name of the current tool
|
Returns the resource name of the current tool.
[Example]
resourceToolName = eco.GetCurrentToolResourceName()
•
|
GetCurrentBaseFrameIndex(): int
|
|
|
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 = eco.GetCurrentBaseFrameIndex()
|
|
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 = eco.GetCurrentToolFrameMatrix()
|
|
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 = eco.GetCurrentBaseFrameMatrix()
Returns current Controller
[Example]
controller = eco.GetController()
[Example]
def PostCompute(eco):
eventOperator = eco.GetEventOperator()
|
|
Object of CENPyOlpTpElement class.
|
|
|
Integer value to identify this toolpath element in event rules.
|
[Example]
def PostCompute(eco):
eventOperator = eco.SetTechnologyRequestId(CENPyOlpTpElement, INT_ID)
Default TechRequestIds used in Approach, LeadIn, LeadOut and Retract.
Get position of the toolpath element.
[Example]
refTpe = eco.GetRefTpElement()
olpPosition = eco.GetTpElementPosition(refTpe, POSRELATION_LOCALTPELEMENT)
|
|
Toolpath element object
|
|
|
Type of the position relation represented as enum PosRelation
|
|
|
Index of the base frame to be used for position representation. The default value is the index of an active base frame
|
|
|
Object of the CENPyOlpPosition class
|
Get position of the toolpath element.
[Example]
refTpe = eco.GetRefTpElement()
olpPosition = eco.GetTpElementPosition(refTpe, POSRELATION_BASEFRAME) #Index of an active base frame used
or
olpPosition = eco.GetTpElementPosition(refTpe, POSRELATION_BASEFRAME, 2)
|
|
Returns a TouchSensing Operator.
|
Gets a Touch Sensing Operator which contains touch sensing positions.
[Example]
touchSensingOperator = eco.GetTouchSensingOperator()
•
|
GetTechTabFolder(fileName: string, feedbackErrorWhenFileNotFound: bool): string
|
|
|
Name of the file with extension or relative path to the file
|
|
o
|
feedbackErrorWhenFileNotFound
|
|
Activates feedback if no file is found. It is optional parameter and is True by default
|
|
|
Full path to the specified file
|
Gets the technology table folder path. If the relative path contains a file name with extension then it will return the path to that file.
[Example]
filePath = Operator.GetTechTabFolder("WeldingAttrib.csv")
•
|
IsEventCreatedAutomatically(): bool
|
|
|
True if the Event was created by a rule or by another Event, False if inserted manually.
|
Get if the reference event was created by a rule, another event, or inserted manually.
[Example]
logging.LogInfo(f"Current event was created automatically = {eco.IsEventCreatedAutomatically()}.")
•
|
ExecuteBrushEventCompute(brushNumber: int, gunNumber: int)
|
|
|
The number of the brush to be set.
|
|
|
The number of the gun for which the brush should be set. 0 means all guns.
|
Executes everything that needs to be done for the compute of a brush event. That is an event that sets a specific brush number to a specific gun number.
Gun number 0 means all guns.
[Example]
eco.ExecuteBrushEventCompute(2, 5)
•
|
ExecuteBrushEventCompute(brushNumber: int, gunNumber: int, exactStop: bool, triggerRelatedToStart: bool, triggerTime: double, triggerDistance: double)
|
|
|
The number of the brush to be set.
|
|
|
The number of the gun for which the brush should be set. 0 means all guns.
|
|
|
Exact stop on event. Default = true.
|
|
|
Trigger delta related to start(true) or end point(false). Default = true.
|
|
|
Trigger time.
|
|
|
Trigger distance.
|
Executes everything that needs to be done for the compute of a brush event. That is an event that sets a specific brush number to a specific gun number.
Gun number 0 means all guns.
[Example]
eco.ExecuteBrushEventCompute(2, 5, false, true, 0.0, 30.0)
•
|
ExecuteGunEventCompute(gunState: bool, gunNumber: int)
|
|
|
Whether to turn the gun on or off.
|
|
|
The number of the gun to be turned on or off. 0 means all guns.
|
Executes everything that needs to be done for the compute of a gun event. That is an event that turns a specific gun number on or off.
Gun number 0 means all guns.
[Example]
eco.ExecuteGunEventCompute(true, 4)
•
|
ExecuteGunEventCompute(gunState: bool, gunNumber: int, exactStop: bool, triggerRelatedToStart: bool, triggerTime: double, triggerDistance: double)
|
|
|
Whether to turn the gun on or off.
|
|
|
The number of the gun to be turned on or off. 0 means all guns.
|
|
|
Exact stop on event. Default = true.
|
|
|
Trigger delta related to start(true) or end point(false). Default = true.
|
|
|
Trigger time.
|
|
|
Trigger distance.
|
Executes everything that needs to be done for the compute of a gun event. That is an event that turns a specific gun number on or off.
Gun number 0 means all guns.
[Example]
eco.ExecuteGunEventCompute(true, 4, false, false, 5.0, 0.0)
|