Vector
A Cartesian vector (direction). This object lives in the Lua session only. Vectors are defined by numbers and cannot be defined with expressions. Mathematical operations can be done on vectors.
Example
-- Create a default 'Vector' at (0,0,0) v1 = pf.Vector.New() -- Assign values to each component of the vector v1.x = 1 v1.y = 1 v1.z = 1 -- Create a 'Vector' with number values v2 = pf.Vector(2,2,2) -- Some of the valid operators for 'Vector' v3 = 2 * v1 v4 = v2 * 2 v5 = v2 / 2 v6 = -v2 v7 = v1 + v2 v8 = v1 - v2 if (v1 ~= v2) then print(v1.." is not equal to "..v2) end
Usage locations
The Vector object can be accessed from the following locations:
- Properties
- Workplane object has property UVector.
- Workplane object has property VVector.
- WaveguideMeshPort object has property ReferenceVector.
- WaveguidePort object has property ReferenceVector.
- Static functions