Vector3d ======== .. py:module:: rhino3dm .. py:class:: Vector3d .. py:method:: Vector3d(x, y, z) Initializes a new instance of a vector, using its three components. :param float x: The X (first) component. :param float y: The Y (second) component. :param float z: The Z (third) component. .. py:attribute:: X float: Gets or sets the X (first) component of the vector. .. py:attribute:: Y float: Gets or sets the Y (second) component of the vector. .. py:attribute:: Z float: Gets or sets the Z (third) component of the vector. .. py:method:: Encode() [todo] add documentation .. py:method:: __repr__() [todo] add documentation .. py:method:: IsParallelTo(other) Determines whether this vector is parallel to another vector, within one degree (within Pi / 180). :param rhino3dm.Vector3d other: Vector to use for comparison. :return: 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. :rtype: int .. py:method:: IsParallelTo(other, angleTolerance) Determines whether this vector is parallel to another vector, within one degree (within Pi / 180). :return: 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. :rtype: int .. py:method:: Unitize() Unitizes the vector in place. A unit vector has length 1 unit. An invalid or zero length vector cannot be unitized. :return: True on success or False on failure. :rtype: bool .. py:method:: Length() [todo] add documentation .. py:staticmethod:: CrossProduct(a, b) Computes the cross product (or vector product, or exterior product) of two vectors. This operation is not commutative. :param rhino3dm.Vector3d a: First vector. :param rhino3dm.Vector3d b: Second vector. :return: A new vector that is perpendicular to both a and b, \ has Length == a.Length * b.Length * sin(theta) where theta is the angle between a and b.The resulting vector is oriented according to the right hand rule. :rtype: rhino3dm.Vector3d .. py:staticmethod:: DotProduct(a, b) [todo] add documentation .. py:staticmethod:: VectorAngle(a, b) Compute the angle between two vectors. This operation is commutative. :param rhino3dm.Vector3d a: First vector for angle. :param rhino3dm.Vector3d b: Second vector for angle. :return: If the input is valid, the angle (in radians) between a and b; RhinoMath.UnsetValue otherwise. :rtype: float .. py:staticmethod:: VectorAngle(a, b, plane) Compute the angle between two vectors. This operation is commutative. :return: If the input is valid, the angle (in radians) between a and b; RhinoMath.UnsetValue otherwise. :rtype: float .. py:staticmethod:: VectorAngle(v1, v2, vNormal) Compute the angle between two vectors. This operation is commutative. :return: If the input is valid, the angle (in radians) between a and b; RhinoMath.UnsetValue otherwise. :rtype: float