Skip to Content

Vector

Quick Facts

PropertyValue
ClassCENPyOlpVector
Modulecenpylib.CENPyOlpVector
Packagecenpylib
ReleaseR2025.2.4
Methods12

Quick Start

# Boilerplate Example vector = ... # obtained from the runtime context result = vector.GetXYZ()

Method Index

MethodReturnsSummary
SetXYZSet new coordinates.
GetXYZtupleGet the coordinates as tuple.
GetXfloatGet the X value.
GetYfloatGet the Y value.
GetZfloatGet the Z value.
SetXSet the X value.
SetYSet the Y value.
SetZSet the Z value.
NormalizeNormalize the vector.
TransformTransform the vector.
AnglefloatCompute the angle between current and another vector.
InvertInvert the vector.

Query Methods

GetXYZ

def GetXYZ() -> tuple

Get the coordinates as tuple.

Returns: tuple — List with X, Y and Z coordinates in meters.

GetX

def GetX() -> float

Get the X value.

Returns: float — X coordinate in meters.

GetY

def GetY() -> float

Get the Y value.

Returns: float — Y coordinate in meters.

GetZ

def GetZ() -> float

Get the Z value.

Returns: float — Z coordinate in meters.

Mutation Methods

SetXYZ

def SetXYZ(x: float, y: float, z: float)

Set new coordinates.

Parameters:

NameTypeDescription
xfloatX coordinate in meters.
yfloatY coordinate in meters.
zfloatZ coordinate in meters.

SetX

def SetX(val: float)

Set the X value.

Parameters:

NameTypeDescription
valfloatX coordinate in meters.

SetY

def SetY(val: float)

Set the Y value.

Parameters:

NameTypeDescription
valfloatY coordinate in meters.

SetZ

def SetZ(val: float)

Set the Z value.

Parameters:

NameTypeDescription
valfloatZ coordinate in meters.

Execution & Actions

Transform

def Transform(pyTransformationMatrix: CENPyOlpMatrix)

Transform the vector.

Parameters:

NameTypeDescription
pyTransformationMatrixCENPyOlpMatrixTransformation matrix.

Utilities

Normalize

def Normalize()

Normalize the vector.

Angle

def Angle(pySecondVec: CENPyOlpVector) -> float

Compute the angle between current and another vector.

Parameters:

NameTypeDescription
pySecondVecCENPyOlpVectorAnother vector.

Returns: float — Angle.

Invert

def Invert()

Invert the vector.

Version Notes

This class is documented as of release R2025.2.4.

Was this page helpful?