AutoOpenVector3d Module
When Rhino.Scripting.FSharp is opened this module will be auto-opened. It only contains extension members for type Vector3d.
Type extensions
Type extension |
Description
|
|
Returns positive angle for rotating Counter-Clockwise from this Vector3d to Vector3d 'b' . In Diamond Angle. Using only proportion of X to Y components. Range of 0.0 to 4.0 (for 360 Degrees) It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions. For World X-Y plane. Considers only the X and Y components of the Vector3d.
Extended Type:
|
Full Usage:
this.AsString
Parameters:
unit
Returns: string
|
|
Full Usage:
this.Direction180InXY
Parameters:
unit
Returns: float
Modifiers: inline |
Returns the angle in Degrees from X-axis, Ignores orientation. Range 0.0 to 180. For World X-Y plane. Considers only the X and Y components of the Vector3d.
Extended Type:
|
Full Usage:
this.Direction2PiInXY
Parameters:
unit
Returns: float
Modifiers: inline |
Returns the angle in Radians from X-axis, Going Counter-Clockwise till two Pi. For World X-Y plane. Considers only the X and Y components of the Vector3d.
Extended Type:
|
Full Usage:
this.Direction360InXY
Parameters:
unit
Returns: float
Modifiers: inline |
Returns the angle in Degrees from X-axis. Going Counter-Clockwise till 360. For World X-Y plane. Considers only the X and Y components of the Vector3d.
Extended Type:
|
Full Usage:
this.DirectionDiamondInXY
Parameters:
unit
Returns: float
Modifiers: inline |
The diamond angle. Calculates the proportion of X to Y component. It is always positive and in the range of 0.0 to 4.0 (for 360 Degrees) 0.0 = Xaxis, going Counter-Clockwise. It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions. For World X-Y plane. Considers only the X and Y components of the Vector3d.
Extended Type:
|
Full Usage:
this.DirectionPiInXY
Parameters:
unit
Returns: float
Modifiers: inline |
Returns the angle in Radians from X-axis, Ignores orientation. Range 0.0 to Pi. For World X-Y plane. Considers only the X and Y components of the Vector3d.
Extended Type:
|
Full Usage:
this.IsHorizontal
Parameters:
unit
Returns: bool
Modifiers: inline |
Checks if 3D Vector3d is horizontal (Z component is almost zero). The absolute deviation tolerance along Z axis is 1e-9. Fails on Vector3d shorter than 1e-6.
Extended Type:
|
Full Usage:
this.IsNotZero
Parameters:
unit
Returns: bool
Modifiers: inline |
Returns a boolean indicating if any of X, Y and Z is not exactly 0.0.
Extended Type:
|
|
Checks if the angle between the two 3D Vector3d is more than 180 degrees. Calculates the dot product of two 3D Vector3d. Then checks if it is smaller than minus 1e-12. Fails if any of the two Vector3d is shorter than zeroLengthTolerance (1e-12).
Extended Type:
|
Full Usage:
this.IsParallelAndOrientedTo
Parameters:
Vector3d
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if two 3D Vector3d are parallel. Takes the line orientation into account too. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minium cosine value. See Rhino.Scripting.FSharp.Cosine module. Fails on Vector3d shorter than zeroLengthTolerance (1e-12).
Extended Type:
|
Full Usage:
this.IsParallelTo
Parameters:
Vector3d
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if two 3D Vector3d are parallel. Ignores the line orientation. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minium cosine value. See Rhino.Scripting.FSharp.Cosine module. Fails on Vector3d shorter than zeroLengthTolerance (1e-12).
Extended Type:
|
Full Usage:
this.IsPerpendicularTo
Parameters:
Vector3d
maxCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool
Modifiers: inline |
Checks if two 3D Vector3d are perpendicular to each other. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional minium cosine value. The default cosine is 0.0043633 ( = 89.75 deg) See Rhino.Scripting.FSharp.Cosine module. Fails on Vector3d shorter than zeroLengthTolerance (1e-12).
Extended Type:
|
Full Usage:
this.IsTiny
Parameters:
float
Returns: bool
Modifiers: inline |
Check if the 3D Vector3d is shorter than the tolerance. Also checks if any component is a NaN.
Extended Type:
|
Full Usage:
this.IsTinySq
Parameters:
float
Returns: bool
Modifiers: inline |
Check if the 3D Vector3d square length is shorter than the squared tolerance. Also checks if any component is a NaN.
Extended Type:
|
Full Usage:
this.IsUnit
Parameters:
unit
Returns: bool
Modifiers: inline |
Test if the 3D Vector3d is a unit-Vector3d. Test if the Vector3d square length is within 6 float steps of 1.0 So between 0.99999964 and 1.000000715.
Extended Type:
|
Full Usage:
this.IsVertical
Parameters:
unit
Returns: bool
Modifiers: inline |
Checks if 3D Vector3d is parallel to the world Z axis. Ignoring orientation. The absolute deviation tolerance along X and Y axis is 1e-9. Fails on Vector3d shorter than 1e-6. Same as v.IsZAligned
Extended Type:
|
Full Usage:
this.IsXAligned
Parameters:
unit
Returns: bool
Modifiers: inline |
Checks if 3D Vector3d is parallel to the world X axis. Ignoring orientation. The absolute deviation tolerance along Y and Z axis is 1e-9. Fails on Vector3d shorter than 1e-6.
Extended Type:
|
Full Usage:
this.IsYAligned
Parameters:
unit
Returns: bool
Modifiers: inline |
Checks if 3D Vector3d is parallel to the world Y axis. Ignoring orientation. The absolute deviation tolerance along X and Z axis is 1e-9. Fails on Vector3d shorter than 1e-6.
Extended Type:
|
Full Usage:
this.IsZAligned
Parameters:
unit
Returns: bool
Modifiers: inline |
Checks if 3D Vector3d is parallel to the world Z axis. Ignoring orientation. The absolute deviation tolerance along X and Y axis is 1e-9. Fails on Vector3d shorter than 1e-6. Same as v.IsVertical
Extended Type:
|
Full Usage:
this.IsZero
Parameters:
unit
Returns: bool
Modifiers: inline |
Returns a boolean indicating whether X, Y and Z are all exactly 0.0.
Extended Type:
|
Full Usage:
this.LengthInXY
Parameters:
unit
Returns: float
Modifiers: inline |
Returns the length of the 3D Vector3d projected into World X-Y plane.
Extended Type:
|
Full Usage:
this.LengthSq
Parameters:
unit
Returns: float
Modifiers: inline |
Returns the squared length of the 3D vector. The square length is faster to calculate and often good enough for use cases such as sorting vectors by length.
Extended Type:
|
Full Usage:
this.LengthSqInXY
Parameters:
unit
Returns: float
Modifiers: inline |
Returns the squared length of the 3D Vector3d projected into World X-Y plane. The square length is faster to calculate and often good enough for use cases such as sorting Vector3d by length.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns positive angle for rotating Counter-Clockwise from Vector3d 'a' to Vector3d 'b' . In Diamond Angle. Using only proportion of X to Y components. Range of 0.0 to 4.0 (for 360 Degrees) It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions. For World X-Y plane. Considers only the X and Y components of the Vector3d.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
Vector3d.create (x, y, z)
Parameters:
float
y : float
z : float
Returns: Vector3d
Modifiers: inline |
|
Full Usage:
Vector3d.createFromMembersXYZ pt
Parameters:
^T
Returns: Vector3d
Modifiers: inline Type parameters: ^T, ^a, ^b, ^c |
|
Full Usage:
Vector3f.createFromMembersXYZ pt
Parameters:
^T
Returns: Vector3f
Modifiers: inline Type parameters: ^T, ^a, ^b, ^c |
|
Full Usage:
Vector3d.createFromMembersxyz pt
Parameters:
^T
Returns: Vector3d
Modifiers: inline Type parameters: ^T, ^a, ^b, ^c |
|
Full Usage:
Vector3f.createFromMembersxyz pt
Parameters:
^T
Returns: Vector3f
Modifiers: inline Type parameters: ^T, ^a, ^b, ^c |
|
|
|
|
Returns three Vector3d's Determinant. This is also the signed volume of the Parallelepiped defined by these three Vector3d. Also called scalar triple product, mixed product, Box product, or in German: Spatprodukt. It is defined as the dot product of one of the Vector3d with the cross product of the other two.
Extended Type:
|
|
|
|
|
|
|
|
|
Full Usage:
Vector3d.directionDiamondInXY v
Parameters:
Vector3d
Returns: float
Modifiers: inline |
The diamond angle. Returns positive angle of 3D Vector3d in World X-Y plane. Calculates the proportion of X to Y component. It is always positive and in the range of 0.0 to 4.0 (for 360 Degrees) 0.0 = Xaxis, going Counter-Clockwise. It is the fastest angle calculation since it does not involve Cosine or ArcTangent functions. For World X-Y plane. Considers only the X and Y components of the Vector3d.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
Vector3d.intersection (ptA, ptB, vA, vB, tooShortTolerance, relAngleDiscriminant)
Parameters:
Point3d
-
The start point of the first line.
ptB : Point3d
-
The start point of the second line.
vA : Vector3d
-
The Vector3d of the first line.
vB : Vector3d
-
The Vector3d of the second line.
tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both Vector3d are shorter than this ValueNone is returned.
relAngleDiscriminant : float<MeasureProduct<relAngDiscr, MeasureOne>>
-
This is an optional tolerance for the internally calculated relative Angle Discriminant.
The default value corresponds to approx 0.25 degree. Below this angle Vector3d are considered parallel.
Use the module Rhino.Scripting.FSharp.RelAngleDiscriminant to set another tolerance here.
Returns: ValueOption<float * float>
For (almost) zero length or (almost) parallel Vector3d: ValueNone
Else ValueSome with a tuple of the parameters at which the two infinite 2D lines intersect to each other.
The tuple's order corresponds to the input order.
|
Intersects two infinite 3D lines. The lines are defined by a start point and a Vector3d. 'ValueNone' is returned, if the angle between the Vector3d is less than 0.25 degrees or any of them is shorter than 1e-6. These tolerances can be adjusted with optional parameters.
Extended Type:
|
Full Usage:
Vector3d.isAngle180Above cosineValue a b
Parameters:
float<MeasureProduct<cosine, MeasureOne>>
a : Vector3d
b : Vector3d
Returns: bool
Modifiers: inline |
Checks if Angle between two Vector3d is more than given Cosine. Does not ignore Vector3d orientation. The angle between two Vector3d can be 0 to 180 degrees. Use the Rhino.Scripting.FSharp.Cosine module to get some precomputed cosine values. Fails on zero length Vector3d, tolerance 1e-12.
Extended Type:
|
Full Usage:
Vector3d.isAngle180Below cosineValue a b
Parameters:
float<MeasureProduct<cosine, MeasureOne>>
a : Vector3d
b : Vector3d
Returns: bool
Modifiers: inline |
Checks if Angle between two Vector3d is less than given Cosine. Does not ignore Vector3d orientation. The angle between two Vector3d can be 0 to 180 degrees. Use the Rhino.Scripting.FSharp.Cosine module to get some precomputed cosine values Fails on zero length Vector3d, tolerance 1e-12.
Extended Type:
|
Full Usage:
Vector3d.isAngle90Above cosineValue a b
Parameters:
float<MeasureProduct<cosine, MeasureOne>>
a : Vector3d
b : Vector3d
Returns: bool
Modifiers: inline |
Checks if Angle between two Vector3d is more than given Cosine. Ignores Vector3d orientation. The angle between two Vector3d can be 0 to 90 degrees ignoring their direction. Use the Rhino.Scripting.FSharp.Cosine module to get some precomputed cosine values. Fails on zero length Vector3d, tolerance 1e-12.
Extended Type:
|
Full Usage:
Vector3d.isAngle90Below cosineValue a b
Parameters:
float<MeasureProduct<cosine, MeasureOne>>
a : Vector3d
b : Vector3d
Returns: bool
Modifiers: inline |
Checks if Angle between two Vector3d is less than given Cosine. Ignores Vector3d orientation. The angle between two Vector3d can be 0 to 90 degrees ignoring their direction. Use the Rhino.Scripting.FSharp.Cosine module to get some precomputed cosine values Fails on zero length Vector3d, tolerance 1e-12.
Extended Type:
|
|
|
|
|
Full Usage:
Vector3d.isTiny tol v
Parameters:
float
v : Vector3d
Returns: bool
Modifiers: inline |
|
Full Usage:
Vector3d.isTinySq tol v
Parameters:
float
v : Vector3d
Returns: bool
Modifiers: inline |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns a Vector3d that is perpendicular to the given Vector3d and in the same vertical Plane. Projected into the X-Y plane input and output Vector3d are parallel and of same orientation. Not of same length, not unitized. On vertical input Vector3d resulting Vector3d if of zero length.
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Spherically interpolates between start and end by amount rel (0.0 to 1.0). The difference between this and linear interpolation (aka, "lerp") is that the Vector3d are treated as directions rather than points in space. The direction of the returned Vector3d is interpolated by the angle and its magnitude is interpolated between the magnitudes of start and end. Interpolation continues before and after the range of 0.0 and 0.1
Extended Type:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|