Vector3d

class rhino3dm.Vector3d
Vector3d(x, y, z)

Initializes a new instance of a vector, using its three components.

Parameters:
  • x (float) – The X (first) component.

  • y (float) – The Y (second) component.

  • z (float) – The Z (third) component.

X

float: Gets or sets the X (first) component of the vector.

Y

float: Gets or sets the Y (second) component of the vector.

Z

float: Gets or sets the Z (third) component of the vector.

Encode()

[todo] add documentation

__repr__()

[todo] add documentation

IsParallelTo(other)

Determines whether this vector is parallel to another vector, within one degree (within Pi / 180).

Parameters:

other (rhino3dm.Vector3d) – Vector to use for comparison.

Returns:

Parallel indicator: +1 = both vectors are parallel 0 = vectors are not parallel, or at least one of the vectors is zero-1 = vectors are anti-parallel.

Return type:

int

IsParallelTo(other, angleTolerance)

Determines whether this vector is parallel to another vector, within one degree (within Pi / 180).

Returns:

Parallel indicator: +1 = both vectors are parallel 0 = vectors are not parallel, or at least one of the vectors is zero-1 = vectors are anti-parallel.

Return type:

int

static VectorAngle(a, b)

Compute the angle between two vectors. This operation is commutative.

Parameters:
Returns:

If the input is valid, the angle (in radians) between a and b; RhinoMath.UnsetValue otherwise.

Return type:

float

static VectorAngle(a, b, plane)

Compute the angle between two vectors. This operation is commutative.

Returns:

If the input is valid, the angle (in radians) between a and b; RhinoMath.UnsetValue otherwise.

Return type:

float

static VectorAngle(v1, v2, vNormal)

Compute the angle between two vectors. This operation is commutative.

Returns:

If the input is valid, the angle (in radians) between a and b; RhinoMath.UnsetValue otherwise.

Return type:

float