Returns the name of the toolpath element.
[Example]
tpElement = Operator.GetRefTpElement()
tpeName = tpElement.GetName()
|
|
New toolpath element name
|
Sets the new name of the toolpath element.
[Example]
tpe = Operator.GetRefTpElement()
tpe.SetName("NewName")
|
|
Process type of the reference toolpath element
|
Returns the process type of the toolpath element.
[Example]
tpeProcessType = tpElement.GetProcessType()
|
|
Motion type of the reference toolpath element
|
Returns the motion type of the toolpath element.
[Example]
tpeMotionType = tpElement.GetMotionType()
|
|
Target type of the reference toolpath element
|
Returns the target type of the toolpath element.
[Example]
tpeTargetType = tpElement.GetTargetType()
|
|
Config behavior of the reference toolpath element
|
Returns the config behavior of the toolpath element.
[Example]
tpeConfigBehavior = tpElement.GetConfigBehavior()
•
|
GetConfigUserString(): string
|
|
|
Config user string of the reference toolpath element
|
Returns the config user string of the toolpath element.
[Example]
tpeConfigUserString = tpElement.GetConfigUserString()
|
|
Turn behavior of the reference toolpath element
|
Returns the turn behavior of the toolpath element.
[Example]
tpeTurnBehavior = tpElement.GetTurnBehavior()
•
|
GetTurnUserString(): string
|
|
|
Turn user string of the reference toolpath element
|
Returns the turn user string of the underlying toolpath element.
[Example]
tpeTurnUserString = tpElement.GetTurnUserString()
|
|
If True Via Point result is also included. Optional parameter. Default value is True.
|
|
|
Collision status of the reference toolpath element
|
Returns the collision status of the underlying toolpath element. Includes both cost evaluation and simulation results. Only COLLISIONSTATUS_NOCOLLISION or COLLISIONSTATUS_COLLISION results are possible.
[Example]
tpeCollisionStatus = tpElement.GetCollisionStatus()
|
|
Collision status of the reference toolpath element
|
Returns the simulation collision status of the toolpath element.
The collision status of each toolpath element will only be available after running the simulation, otherwise, COLLISIONSTATUS_NOTCHECKED will be returned.
[Example]
tpeSimCollisionStatus = tpElement.GetSimulationCollisionStatus()
|
|
Reachability status of the reference toolpath element
|
Returns the reachability status of the toolpath element.
[Example]
tpeReachabilityStatus = tpe.GetReachabilityStatus()
|
|
Singularity status of the reference toolpath element
|
Returns the singularity status of the toolpath element.
[Example]
tpeSingularityStatus = tpElement.GetSingularityStatus()
|
|
Teach flags as a bitmask.
|
Gets the teach flags indicating the modifications made to the underlying toolpath element.
[Example]
for counter, tpElement in enumerate(tpes, 1):
teachFlags = tpElement.GetTeachFlags()
if teachFlags is TEACHFLAGS_NONE:
logging.LogInfo(f"TPE <{counter}> is unmodified.")
if teachFlags & TEACHFLAGS_NAME:
logging.LogInfo(f"TPE <{counter}> name was changed.")
if teachFlags & TEACHFLAGS_POSITION:
logging.LogInfo(f"TPE <{counter}> position was changed.")
if teachFlags & TEACHFLAGS_ROTATION:
logging.LogInfo(f"TPE <{counter}> rotation was changed.")
if teachFlags & TEACHFLAGS_JOINTS:
logging.LogInfo(f"TPE <{counter}> joint values were changed.")
if teachFlags & TEACHFLAGS_EXTERNALJOINTS:
logging.LogInfo(f"TPE <{counter}> external joint values were changed.")
if teachFlags & TEACHFLAGS_TARGETTYPE:
logging.LogInfo(f"TPE <{counter}> target type was changed.")
if teachFlags & TEACHFLAGS_MOTIONTYPE:
logging.LogInfo(f"TPE <{counter}> motion tape was changed.")
if teachFlags & TEACHFLAGS_TURNBEHAVIOUR:
logging.LogInfo(f"TPE <{counter}> turn behavior were changed.")
if teachFlags & TEACHFLAGS_CONFIGBEHAVIOR:
logging.LogInfo(f"TPE <{counter}> config behavior values were changed.")
if teachFlags & TEACHFLAGS_SINGULARITY:
logging.LogInfo(f"TPE <{counter}> singularity was changed.")
if teachFlags & TEACHFLAGS_VIAPOSITION:
logging.LogInfo(f"TPE <{counter}> Via position was changed.")
Returns the matrix of the toolpath element relative to the internal (workpiece) base frame
[Example]
currentTpElement = Operator.GetRefTpElement()
tpMatrix = currentTpElement.GetMatrix()
Returns the initial path matrix which has been saved after PathCompute but before AlignmentCompute state with respect to internal (workpiece) base frame
[Example]
currentTpElement = Operator.GetRefTpElement()
tpInitMatrix = currentTpElement.GetInitialPathMatrix()
•
|
GetInitialPathMatrixTranslatedInBaseFrame(x: float,y: float, z: float, index: int): CENPyOlpMatrix
|
|
|
x coordinate (float)
|
|
|
y coordinate (float)
|
|
|
z coordinate (float)
|
|
|
Base frame index (int)
|
|
|
Translated initial path matrix
|
Returns the initial path matrix moved with the given coordinates relative to the specified base frame.
[Example]
currentTpElement = Operator.GetRefTpElement()
currentBaseFrameIndex = Operator.GetCurrentBaseFrameIndex()
translatedMatrix = currentTpElement.GetInitialPathMatrixTranslatedInBaseFrame(-0.1, 0.0, 0.0, currentBaseFrameIndex)
|
|
The global transformed path matrix in aligned state
|
Returns the path matrix which has been saved after global transformation compute in aligned state with respect to internal (workpiece) base frame
[Example]
currentTpElement = Operator.GetRefTpElement()
globalTransfMatrix = currentTpElement.GetGlobalTransformedMatrix()
|
|
The global transformed path matrix in unaligned state
|
Returns the path matrix which has been saved after global transformation compute in unaligned state with respect to internal (workpiece) base frame
[Example]
currentTpElement = Operator.GetRefTpElement()
globalTransfUnalignedMatrix = currentTpElement.GetGlobalTransformedMatrixUnaligned()
Returns the next or previous toolpath element matrix inside the current operation with respect to internal (workpiece) base frame. Default next value is True
[Example]
currentTpElement = Operator.GetRefTpElement()
initNextNeighbourMatrix = currentTpElement.GetInitialNeighbourMatrix()
|
|
Matrix relative to the active (output) base frame
|
Returns the matrix of the toolpath element relative to the active (output) base frame
[Example]
currentTpElement = Operator.GetRefTpElement()
activeBaseFrameMatrix = currentTpElement.GetMatrixToActiveBaseFrame()
if activeBaseFrameMatrix.IsValid():
logging.LogInfo("Active base frame matrix position: " + str(activeBaseFrameMatrix.GetPosition().GetXYZ()))
logging.LogInfo("Active base frame matrix rotation in degrees: " + str(activeBaseFrameMatrix.GetRotation(True)))
|
|
Index of the base frame to which this toolpath element matrix should be relative
|
|
|
Matrix relative to the given base frame index
|
Returns the matrix of the toolpath element relative to the specified base frame
[Example]
baseFrameIndex = 0
baseFrameMatrix = currentTpElement.GetMatrixToBaseFrame(baseFrameIndex)
if baseFrameMatrix.IsValid():
logging.LogInfo("Base frame index <" + str(baseFrameIndex) + "> position: " + str(baseFrameMatrix.GetPosition().GetXYZ()))
logging.LogInfo("Base frame index <" + str(baseFrameIndex) + "> rotation in degrees: " + str(baseFrameMatrix.GetRotation(True)))
Get the track corresponding to this toolpath element.
[Example]
program = Operator.GetActiveProgram()
tpes = program.GetTpElements()
track = tpes[5].GetTrack()
|