Vector
Quick Facts
| Property | Value |
|---|---|
| Class | CENPyOlpVector |
| Module | cenpylib.CENPyOlpVector |
| Package | cenpylib |
| Release | R2025.2.4 |
| Methods | 12 |
Quick Start
# Boilerplate Example
vector = ... # obtained from the runtime context
result = vector.GetXYZ()Method Index
| Method | Returns | Summary |
|---|---|---|
SetXYZ | — | Set new coordinates. |
GetXYZ | tuple | Get the coordinates as tuple. |
GetX | float | Get the X value. |
GetY | float | Get the Y value. |
GetZ | float | Get the Z value. |
SetX | — | Set the X value. |
SetY | — | Set the Y value. |
SetZ | — | Set the Z value. |
Normalize | — | Normalize the vector. |
Transform | — | Transform the vector. |
Angle | float | Compute the angle between current and another vector. |
Invert | — | Invert the vector. |
Query Methods
GetXYZ
def GetXYZ() -> tupleGet the coordinates as tuple.
Returns: tuple — List with X, Y and Z coordinates in meters.
GetX
def GetX() -> floatGet the X value.
Returns: float — X coordinate in meters.
GetY
def GetY() -> floatGet the Y value.
Returns: float — Y coordinate in meters.
GetZ
def GetZ() -> floatGet the Z value.
Returns: float — Z coordinate in meters.
Mutation Methods
SetXYZ
def SetXYZ(x: float, y: float, z: float)Set new coordinates.
Parameters:
| Name | Type | Description |
|---|---|---|
x | float | X coordinate in meters. |
y | float | Y coordinate in meters. |
z | float | Z coordinate in meters. |
SetX
def SetX(val: float)Set the X value.
Parameters:
| Name | Type | Description |
|---|---|---|
val | float | X coordinate in meters. |
SetY
def SetY(val: float)Set the Y value.
Parameters:
| Name | Type | Description |
|---|---|---|
val | float | Y coordinate in meters. |
SetZ
def SetZ(val: float)Set the Z value.
Parameters:
| Name | Type | Description |
|---|---|---|
val | float | Z coordinate in meters. |
Execution & Actions
Transform
def Transform(pyTransformationMatrix: CENPyOlpMatrix)Transform the vector.
Parameters:
| Name | Type | Description |
|---|---|---|
pyTransformationMatrix | CENPyOlpMatrix | Transformation matrix. |
Utilities
Normalize
def Normalize()Normalize the vector.
Angle
def Angle(pySecondVec: CENPyOlpVector) -> floatCompute the angle between current and another vector.
Parameters:
| Name | Type | Description |
|---|---|---|
pySecondVec | CENPyOlpVector | Another vector. |
Returns: float — Angle.
Invert
def Invert()Invert the vector.
Related Types
Version Notes
This class is documented as of release R2025.2.4.
Was this page helpful?