|
Get X coordinate.
[Example]
olpPosition = teachHandler.GetTpElementPosition(tpElement, POSRELATION_BASEFRAME)
xValue = olpPosition.X()
Get y coordinate.
[Example]
olpPosition = teachHandler.GetTpElementPosition(tpElement, POSRELATION_BASEFRAME)
yValue = olpPosition.Y()
Get z coordinate.
[Example]
olpPosition = teachHandler.GetTpElementPosition(tpElement, POSRELATION_BASEFRAME)
zValue = olpPosition.Z()
|
|
RX orientation in degrees
|
Get RX orientation.
[Example]
olpPosition = teachHandler.GetTpElementPosition(tpElement, POSRELATION_BASEFRAME)
rxValue = olpPosition.RX()
|
|
RY orientation in degrees
|
Get RY orientation.
[Example]
olpPosition = teachHandler.GetTpElementPosition(tpElement, POSRELATION_BASEFRAME)
ryValue = olpPosition.RY()
|
|
RZ orientation in degrees
|
Get RZ orientation.
[Example]
olpPosition = teachHandler.GetTpElementPosition(tpElement, POSRELATION_BASEFRAME)
rzValue = olpPosition.RZ()
|
|
List with X, Y and Z coordinates in meters
|
Get toolpath element coordinates in a list.
[Example]
coordinates = olpPosition.GetCoordinates()
•GetCoordinatesToBaseFrame(): list |
|
|
|
List with X, Y and Z coordinates in meters relative to the current baseframe
|
Get toolpath element coordinates relative to the current baseframe in a list.
Note : this was the output format of GetCoordinates before R2023.4
[Example]
coordinates = olpPosition.GetCoordinatesToBaseFrame()
•SetCoordinates(x: float, y: float, z: float) |
|
|
x coordinate in meters
|
|
|
y coordinate in meters
|
|
|
z coordinate in meters
|
Set toolpath element coordinates.
[Example]
olpPosition.SetCoordinates(-1, 2.2, 3)
•SetCoordinates([x: float, y: float, z: float]) |
|
|
x coordinate in meters
|
|
|
y coordinate in meters
|
|
|
z coordinate in meters
|
Set toolpath element coordinates using a list.
[Example]
olpPosition.SetCoordinates([-1, 2.2, 3])
•GetViaPointCoordinates(): list |
|
|
List with X, Y and Z coordinates in meters
|
Get Via point coordinates in a list.
[Example]
coordinates = olpPosition.GetViaPointCoordinates()
•SetViaPointCoordinates(x: float, y: float, z: float) |
|
|
x coordinate in meters
|
|
|
y coordinate in meters
|
|
|
z coordinate in meters
|
Set Via point coordinates.
[Example]
olpPosition.SetViaPointCoordinates(-1, 2.2, 3)
•SetViaPointCoordinates([x: float, y: float, z: float]) |
|
|
x coordinate in meters
|
|
|
y coordinate in meters
|
|
|
z coordinate in meters
|
Set Via point coordinates using a list.
[Example]
olpPosition.SetViaPointCoordinates([-1, 2.2, 3])
|
|
List with RX, RY and RZ orientations in degrees
|
Get toolpath element orientations in a list.
[Example]
coordinates = olpPosition.GetOrientation()
•SetOrientation(rx: float, ry: float, rz: float) |
|
|
RX orientation in degrees
|
|
|
RY orientation in degrees
|
|
|
RZ orientation in degrees
|
Set toolpath element orientations.
[Example]
olpPosition.SetOrientation(10, 15, 30)
•SetOrientation([rx: float, ry: float, rz: float]) |
|
|
RX orientation in degrees
|
|
|
RY orientation in degrees
|
|
|
RZ orientation in degrees
|
Set toolpath element orientations using a list.
[Example]
olpPosition.SetOrientation([10, 15, 30])
Get the reference toolpath element stored in CENPyOlpPosition class.
[Example]
refTpe = olpPosition.GetRefTpElement()
Set the reference toolpath element in CENPyOlpPosition class.
[Example]
olpPosition.SetRefTpElement(refTpe)
Get the current relation of the position.
[Example]
posRelation = olpPosition.GetPositionRelation()
Set the new relation for the position.
[Example]
olpPosition.SetPositionRelation(POSRELATION_WORKPIECEROOT)
•SetPositionRelation(posRel: PosRelation, baseFrameIndex: int) |
|
|
Enum value of the PosRelation. In this case it should be POSRELATION_BASEFRAME
|
|
|
Base frame index to set. The default value is the index of an active base frame
|
Set the position relation to Base frame and the base frame index.
[Example]
olpPosition.SetPositionRelation(POSRELATION_BASEFRAME) #Index of an active base frame used
or
olpPosition.SetPositionRelation(POSRELATION_BASEFRAME, 1)
Get the represented toolpath element matrix. The matrix will always represent the current PosRelation
[Example]
tpeMatrix = olpPosition.GetMatrix()
Get the represented Via point matrix. The matrix will always represent the current PosRelation
[Example]
viaMatrix = olpPosition.GetViaPointMatrix()
•TranslatePosition(x: float, y: float, z: float, posRel: PosRelation) |
|
|
Direction in local X in meters
|
|
|
Direction in local Y in meters
|
|
|
Direction in local Z in meters
|
|
|
Position relation the local translation should be done in
|
Translates the toolpath element position locally in given direction.
[Example]
olpPosition.TranslatePosition(0.1, 0, 0.1, POSRELATION_WORKPIECEROOT)
•TranslatePosition(x: float, y: float, z: float, posRel: PosRelation, baseFrameIndex: int) |
|
|
Direction in local X in meters
|
|
|
Direction in local Y in meters
|
|
|
Direction in local Z in meters
|
|
|
Position relation the local translation should be done in
|
|
|
Index of the base frame to be used for translation. The default value is the index of an active base frame
|
Translates the toolpath element position locally in given direction relative to the base frame, specified by its index.
[Example]
olpPosition.TranslatePosition(0, 0, 0.1, POSRELATION_BASEFRAME) #Index of an active base frame used
or
olpPosition.TranslatePosition(0, 0, 0.1, POSRELATION_BASEFRAME, 2)
•TranslateViaPointPosition(x: float, y: float, z: float, posRel: PosRelation) |
|
|
Direction in local X in meters
|
|
|
Direction in local Y in meters
|
|
|
Direction in local Z in meters
|
|
|
Position relation the local translation should be done in
|
Translates the Via point position locally in given direction.
[Example]
olpPosition.TranslateViaPointPosition(0.1, 0, 0.1, POSRELATION_WORKPIECEROOT)
•TranslateViaPointPosition(x: float, y: float, z: float, posRel: PosRelation, baseFrameIndex: int) |
|
|
Direction in local X in meters
|
|
|
Direction in local Y in meters
|
|
|
Direction in local Z in meters
|
|
|
Position relation the local translation should be done in
|
|
|
Index of the base frame to be used for translation. The default value is the index of an active base frame
|
Translates the Via point position locally in given direction relative to the base frame, specified by its index.
[Example]
olpPosition.TranslateViaPointPosition(0, 0, 0.1, POSRELATION_BASEFRAME) #Index of an active base frame used
or
olpPosition.TranslateViaPointPosition(0, 0, 0.1, POSRELATION_BASEFRAME, 2)
•RotatePosition(rx: float, ry: float, rz: float, posRel: PosRelation) |
|
|
Rotation around local X in degrees
|
|
|
Rotation around local Y in degrees
|
|
|
Rotation around local Z in degrees
|
|
|
Position relation the local translation should be done in
|
Rotates the position locally around given direction.
[Example]
olpPosition.RotatePosition(0, 0, -45, POSRELATION_LOCALTOOLPATHELEMENT)
•RotatePosition(rx: float, ry: float, rz: float, posRel: PosRelation, baseFrameIndex: int) |
|
|
Rotation around local X in degrees
|
|
|
Rotation around local Y in degrees
|
|
|
Rotation around local Z in degrees
|
|
|
Position relation the local translation should be done in
|
|
|
Index of the base frame to be used for translation. The default value is the index of an active base frame
|
Rotates the position locally around given direction relative to the base frame, specified by its index.
[Example]
olpPosition.RotatePosition(11, 22, 33, POSRELATION_BASEFRAME) #Index of an active base frame used
or
olpPosition.RotatePosition(11, 22, 33, POSRELATION_BASEFRAME, 3)
•GetViaPointName(): string |
Get the name of the Via point if it exists, None otherwise.
[Example]
viaPointName = olpPosition.GetViaPointName()
|
|
List with joint values in degrees
|
Get all toolpath element joint values in a list.
[Example]
jointValues = olpPosition.GetJointValues()
•SetJointValues([j1: float, j2: float,.. jn: float]) |
|
|
Value of the first joint in degrees
|
|
|
Value of the second joint in degrees
|
|
|
Value of the n joint in degrees
|
Set all toolpath element joint values using a list.
[Example]
jointValues = olpPosition.GetJointValues()
jointValues[0] = -10
jointValues[3] = 45
olpPosition.SetJointValues(jointValues)
•GetExternalJointValues(): list |
|
|
List with joint values in degrees
|
Get all toolpath element external joint values in a list.
[Example]
extJointValues = olpPosition.GetExternalJointValues()
•SetExternalJointValues([e1: float, e2: float,.. en: float]) |
|
|
Value of the first external joint in degrees
|
|
|
Value of the second external joint in degrees
|
|
|
Value of the n external joint in degrees
|
Set all toolpath element external joint values using a list.
[Example]
extJointValues = olpPosition.GetExternalJointValues()
extJointValues[0] = 0.135
extJointValues[1] = -10
olpPosition.SetExternalJointValues(extJointValues)
|