Solids Builder - Vectors
Vectors are auxiliary geometries for drawing more complex geometries.
There are the following activities that create vectors:
- Vector (XYZ) - creates a vector by its X, Y, Z properties
- Tangent - calculates the tangent vector to a curve at a point (first derivative)
- Vector Point to Point - creates a vector between two known points
- Perpendicular - calculates the normal vector to another vector
- Cross Product - calculates the cross product of two vectors (ZAxis = XAxis * YAxis)
Properties (to use in VB expressions):
- X - vector X component
- Y - Y component of the vector
- Z - vector Z component
- Length - length of the vector
Methods (to use in VB expressions):
- New - creates a new instance of an array
pt =New GeometryVector(x, y, z)
Where x, y, z are real numbers
- * (multiply) - multiplies a vector by a Scale (real number)
vet = vector * value
Where:
vet and vector are vectors
value is a real number
- / (divide) - divides a vector by a Scale (real number)
vet = vector / value
Where:
vet and vector are vectors
value is a real number
- AngleOnPlane - calculates the vector angle projected onto the plane
angle = vector.AngleOnPlane(plane)
Where:
angle will be a real number that represents the angle in radians
plan is a plan
vector is a vector
- GetPerpendicularVector - calculates the perpendicular vector
per = vector.GetPerpendicularVector()
Where:
vector and per are vectors
- GetNormal - calculates the normal vector (same direction, with length equal to 1)
norm = vector.GetNormal()
Where:
vector and norm are vectors
- GetAngleTo - calculates the angle between two vectors, in the plane that contain them
angle = vectorA.GetAngleTo(vectorB)
Where:
angle will be a real number that represents the angle in radians
vectorA and vectorB are vectors