XLine3D Type
A type containing only static member functions for computing 3D line intersections and closest approaches. Some functions return Discriminated Unions from the XLine3D module.
Static members
| Static member |
Description
|
Full Usage:
XLine3D.doOverlap (lineA, lineB, ?tolerance)
Parameters:
Line3D
-
The first line.
lineB : Line3D
-
The second line.
?tolerance : float
-
Is an optional squared distance tolerance. 1e-6 by default.
Used for checking if the distance between parallel lines is less than this value.
Returns: bool
TRUE if the lines are coincident and overlap or touch.
FALSE if the lines are not coincident or do not overlap nor touch.
Modifiers: inline |
Checks if 3D lines are not only parallel and coincident but are also overlapping or at least touching at their ends.
|
Full Usage:
XLine3D.doOverlap (pA, pB, vA, vB, ?tolerance)
Parameters:
Pnt
-
The start point on the first line.
pB : Pnt
-
The start point on the second line.
vA : Vec
-
The direction vector of the first line.
vB : Vec
-
The direction vector of the second line.
?tolerance : float
-
Is an optional distance tolerance. 1e-6 by default.
Used for checking if the distance between parallel lines is less than this value.
Returns: bool
TRUE if the lines are coincident and overlap or touch.
FALSE if the lines are not coincident or do not overlap nor touch.
Modifiers: inline |
Checks if 3D lines are not only parallel and coincident but are also overlapping or at least touching at their ends.
|
Full Usage:
XLine3D.doOverlap (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz, ?tolerance)
Parameters:
float
-
The X coordinate of the start point on the first line.
pAy : float
-
The Y coordinate of the start point on the first line.
pAz : float
-
The Z coordinate of the start point on the first line.
pBx : float
-
The X coordinate of the start point on the second line.
pBy : float
-
The Y coordinate of the start point on the second line.
pBz : float
-
The Z coordinate of the start point on the second line.
vAx : float
-
The X component of the vector of the first line.
vAy : float
-
The Y component of the vector of the first line.
vAz : float
-
The Z component of the vector of the first line.
vBx : float
-
The X component of the vector of the second line.
vBy : float
-
The Y component of the vector of the second line.
vBz : float
-
The Z component of the vector of the second line.
?tolerance : float
-
Is an optional distance tolerance. 1e-6 by default.
Used for checking if the distance between parallel lines is less than this value.
Returns: bool
TRUE if the lines are coincident and overlap or touch.
FALSE if the lines are not coincident or do not overlap nor touch.
|
Checks if 3D lines are not only parallel and coincident but are also overlapping or at least touching at their ends.
|
Full Usage:
XLine3D.doRaysIntersect (lineA, lineB, ?maxSkewDistance)
Parameters:
Line3D
-
The first ray.
lineB : Line3D
-
The second ray.
?maxSkewDistance : float
-
Is an optional maximum distance tolerance. 1e-6 by default.
Used for checking if the distance between the two lines at their closest approach is less than this value.
Returns: bool
TRUE if both rays intersect within the given maximum skew distance.
FALSE if the rays are parallel, coincident or the closest approach distance is larger than the given tolerance.
Modifiers: inline |
Checks if two 3D-rays actually intersect within a given maximum skew distance. Returns FALSE if rays are parallel or even identical, or if input lines are of zero length. Use XLine3D.getRayIntersection to check for those cases too.
|
Full Usage:
XLine3D.doRaysIntersect (pA, pB, vA, vB, ?maxSkewDistance)
Parameters:
Pnt
-
The start point on the first ray.
pB : Pnt
-
The start point on the second ray.
vA : Vec
-
The direction vector of the first ray.
vB : Vec
-
The direction vector of the second ray.
?maxSkewDistance : float
-
Is an optional maximum distance tolerance. 1e-6 by default.
Used for checking if the distance between the two lines at their closest approach is less than this value.
Returns: bool
TRUE if both rays intersect within the given maximum skew distance.
FALSE if the rays are parallel, coincident or the closest approach distance is larger than the given tolerance.
Modifiers: inline |
Checks if two 3D-rays actually intersect within a given maximum skew distance. Returns FALSE if rays are parallel or even identical, or if input lines are of zero length. Use XLine3D.getRayIntersection to check for those cases too.
|
Full Usage:
XLine3D.doRaysIntersect (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz, ?maxSkewDistance)
Parameters:
float
-
The X coordinate of the start point on the first ray.
pAy : float
-
The Y coordinate of the start point on the first ray.
pAz : float
-
The Z coordinate of the start point on the first ray.
pBx : float
-
The X coordinate of the start point on the second ray.
pBy : float
-
The Y coordinate of the start point on the second ray.
pBz : float
-
The Z coordinate of the start point on the second ray.
vAx : float
-
The X component of the vector of the first ray.
vAy : float
-
The Y component of the vector of the first ray.
vAz : float
-
The Z component of the vector of the first ray.
vBx : float
-
The X component of the vector of the second ray.
vBy : float
-
The Y component of the vector of the second ray.
vBz : float
-
The Z component of the vector of the second ray.
?maxSkewDistance : float
-
Is an optional maximum distance tolerance. 1e-6 by default.
Used for checking if the distance between the two lines at their closest approach is less than this value.
Returns: bool
TRUE if both rays intersect within the given maximum skew distance.
FALSE if the rays are parallel, coincident or the closest approach distance is larger than the given tolerance.
Modifiers: inline |
Checks if two 3D-rays actually intersect within a given maximum skew distance. Returns FALSE if rays are parallel or even identical, or if input lines are of zero length. Use XLine3D.getRayIntersection to check for those cases too.
|
Full Usage:
XLine3D.getClosestParameters (lineA, lineB, ?tangent, ?tooShortTolerance)
Parameters:
Line3D
-
The first finite line segment.
lineB : Line3D
-
The second finite line segment.
?tangent : MeasureProduct<tangent, MeasureOne>
-
This is an optional tolerance for considering lines parallel.
This is a precomputed tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this the middle point of any overlapping segment is returned.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: ClParams
An ClParams Discriminated Union with the following cases:
| Intersect of float*float
| Skew of float*float*float
| Parallel of float*float
| Apart of float*float*float
| TooShortBoth
| TooShortA
| TooShortB
Modifiers: inline |
Gets the parameters on the finite lines where the lines are closest to each other. For parallel lines, this will return the parameter at the middle point of any overlapping segment. For skew lines, this returns the closest approach parameters.
|
Full Usage:
XLine3D.getClosestParameters (pA, pB, vA, vB, ?tangent, ?tooShortTolerance)
Parameters:
Pnt
-
The start point on the first line.
pB : Pnt
-
The start point on the second line.
vA : Vec
-
The direction vector of the first line.
vB : Vec
-
The direction vector of the second line.
?tangent : MeasureProduct<tangent, MeasureOne>
-
This is an optional tolerance for considering lines parallel.
This is a precomputed tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this the middle point of any overlapping segment is returned.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: ClParams
An ClParams Discriminated Union with the following cases:
| Intersect of float*float
| Skew of float*float*float
| Parallel of float*float
| Apart of float*float*float
| TooShortBoth
| TooShortA
| TooShortB
Modifiers: inline |
Gets the parameters on the finite lines where the lines are closest to each other. For parallel lines, this will return the parameter at the middle point of any overlapping segment. For skew lines, this returns the closest approach parameters.
|
Full Usage:
XLine3D.getClosestParameters (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz, ?tangent, ?tooShortTolerance)
Parameters:
float
-
The X coordinate of the start point on the first line.
pAy : float
-
The Y coordinate of the start point on the first line.
pAz : float
-
The Z coordinate of the start point on the first line.
pBx : float
-
The X coordinate of the start point on the second line.
pBy : float
-
The Y coordinate of the start point on the second line.
pBz : float
-
The Z coordinate of the start point on the second line.
vAx : float
-
The X component of the vector of the first line.
vAy : float
-
The Y component of the vector of the first line.
vAz : float
-
The Z component of the vector of the first line.
vBx : float
-
The X component of the vector of the second line.
vBy : float
-
The Y component of the vector of the second line.
vBz : float
-
The Z component of the vector of the second line.
?tangent : MeasureProduct<tangent, MeasureOne>
-
This is an optional tolerance for considering lines parallel.
This is a precomputed tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this the middle point of any overlapping segment is returned.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: ClParams
An ClParams Discriminated Union with the following cases:
| Intersect of float*float
| Skew of float*float*float
| Parallel of float*float
| Apart of float*float*float
| TooShortBoth
| TooShortA
| TooShortB
|
Gets the parameters on the finite lines where the lines are closest to each other. For parallel lines, this will return the parameter at the middle point of any overlapping segment. For skew lines, this returns the closest approach parameters.
|
Full Usage:
XLine3D.getClosestPoints (lineA, lineB, ?tangent, ?tooShortTolerance)
Parameters:
Line3D
-
The first line.
lineB : Line3D
-
The second line.
?tangent : MeasureProduct<tangent, MeasureOne>
-
This is an optional tolerance for considering lines parallel.
This is a precomputed tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this the middle point of any overlapping segment is returned.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: ClPts
An ClPts Discriminated Union with the following cases:
| Intersect of Pnt
| Skew of Pnt * Pnt * float
| Parallel of Pnt * Pnt
| Apart of Pnt * Pnt * float
| TooShortBoth
| TooShortA
| TooShortB
Modifiers: inline |
Gets the point or points on the finite lines where the lines are closest to each other. For parallel lines, this will return the middle point of any overlapping segment. For skew lines, this returns the two closest approach points.
|
Full Usage:
XLine3D.getClosestPoints (pA, pB, vA, vB, ?tangent, ?tooShortTolerance)
Parameters:
Pnt
-
The start point on the first line.
pB : Pnt
-
The start point on the second line.
vA : Vec
-
The direction vector of the first line.
vB : Vec
-
The direction vector of the second line.
?tangent : MeasureProduct<tangent, MeasureOne>
-
This is an optional tolerance for considering lines parallel.
This is a precomputed tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this the middle point of any overlapping segment is returned.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: ClPts
An ClPts Discriminated Union with the following cases:
| Intersect of Pnt
| Skew of Pnt * Pnt * float
| Parallel of Pnt * Pnt
| Apart of Pnt * Pnt * float
| TooShortBoth
| TooShortA
| TooShortB
Modifiers: inline |
Gets the point or points on the finite lines where the lines are closest to each other. For parallel lines, this will return the middle point of any overlapping segment. For skew lines, this returns the two closest approach points.
|
Full Usage:
XLine3D.getClosestPoints (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz, ?tangent, ?tooShortTolerance)
Parameters:
float
-
The X coordinate of the start point on the first line.
pAy : float
-
The Y coordinate of the start point on the first line.
pAz : float
-
The Z coordinate of the start point on the first line.
pBx : float
-
The X coordinate of the start point on the second line.
pBy : float
-
The Y coordinate of the start point on the second line.
pBz : float
-
The Z coordinate of the start point on the second line.
vAx : float
-
The X component of the vector of the first line.
vAy : float
-
The Y component of the vector of the first line.
vAz : float
-
The Z component of the vector of the first line.
vBx : float
-
The X component of the vector of the second line.
vBy : float
-
The Y component of the vector of the second line.
vBz : float
-
The Z component of the vector of the second line.
?tangent : MeasureProduct<tangent, MeasureOne>
-
This is an optional tolerance for considering lines parallel.
This is a precomputed tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this the middle point of any overlapping segment is returned.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: ClPts
An ClPts Discriminated Union with the following cases:
| Intersect of Pnt
| Skew of Pnt * Pnt * float
| Parallel of Pnt * Pnt
| Apart of Pnt * Pnt * float
| TooShortBoth
| TooShortA
| TooShortB
|
Gets the point or points on the finite lines where the lines are closest to each other. For parallel lines, this will return the middle point of any overlapping segment. For skew lines, this returns the two closest approach points.
|
Full Usage:
XLine3D.getEndsTouching (a, b, ?tolerance)
Parameters:
Line3D
-
The first line.
b : Line3D
-
The second line.
?tolerance : float
-
Is an optional distance tolerance. 1e-6 by default.
Returns: XEnds
A Discriminated Union XLine3D.XEnds that describes the possible cases of two finite 3D lines touching at their ends:
| NotTouching
| StartA_StartB
| EndA_EndB
| EndA_StartB
| StartA_EndB
| Identical
| IdenticalFlipped
|
Checks if the two finite 3D lines are touching each other at exactly one of their end points within the given tolerance. This will return a separate case (5 or 6) if the lines are touching on both points.
|
Full Usage:
XLine3D.getIntersection (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
Line3D
-
First finite line segment.
lineB : Line3D
-
Second finite line segment.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting. Default is 1e-6.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: XPnt
An XPt Discriminated Union with the following cases:
| Intersect of Pnt
| Skew of Pnt * Pnt * float
| Apart
| Parallel
| TooShortBoth
| TooShortA
| TooShortB
Modifiers: inline |
Tries to get intersection or closest approach point of two finite 3D lines.
|
Full Usage:
XLine3D.getIntersection (pA, pB, vA, vB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
Pnt
-
The start point of the first line.
pB : Pnt
-
The start point of the second line.
vA : Vec
-
The direction vector of the first line.
vB : Vec
-
The direction vector of the second line.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting. Default is 1e-6.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: XPnt
An XPt Discriminated Union with the following cases:
| Intersect of Pnt
| Skew of Pnt * Pnt * float
| Apart
| Parallel
| TooShortBoth
| TooShortA
| TooShortB
Modifiers: inline |
Tries to get intersection or closest approach point of two finite 3D lines.
|
Full Usage:
XLine3D.getIntersection (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
float
-
The X coordinate of the start point on the first line.
pAy : float
-
The Y coordinate of the start point on the first line.
pAz : float
-
The Z coordinate of the start point on the first line.
pBx : float
-
The X coordinate of the start point on the second line.
pBy : float
-
The Y coordinate of the start point on the second line.
pBz : float
-
The Z coordinate of the start point on the second line.
vAx : float
-
The X component of the vector of the first line.
vAy : float
-
The Y component of the vector of the first line.
vAz : float
-
The Z component of the vector of the first line.
vBx : float
-
The X component of the vector of the second line.
vBy : float
-
The Y component of the vector of the second line.
vBz : float
-
The Z component of the vector of the second line.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting. Default is 1e-6.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: XPnt
An XPt Discriminated Union with the following cases:
| Intersect of Pnt
| Skew of Pnt * Pnt * float
| Apart
| Parallel
| TooShortBoth
| TooShortA
| TooShortB
|
Tries to get intersection or closest approach point of two finite 3D lines.
|
Full Usage:
XLine3D.getIntersectionParam (lnA, lnB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
Line3D
-
First line.
lnB : Line3D
-
Second line.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting. Default is 1e-6.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: XParam
An XParam Discriminated Union with the following cases:
| Intersect of float*float
| Skew of float*float*float
| Apart
| Parallel
| TooShortBoth
| TooShortA
| TooShortB
Modifiers: inline |
Tries to get intersection or closest approach parameters of two finite 3D-lines.
|
Full Usage:
XLine3D.getIntersectionParam (pA, pB, vA, vB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
Pnt
-
The start point of the first line.
pB : Pnt
-
The start point of the second line.
vA : Vec
-
The direction vector of the first line.
vB : Vec
-
The direction vector of the second line.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting. Default is 1e-6.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: XParam
An XParam Discriminated Union with the following cases:
| Intersect of float*float
| Skew of float*float*float
| Apart
| Parallel
| TooShortBoth
| TooShortA
| TooShortB
Modifiers: inline |
Tries to get intersection or closest approach parameters of two finite 3D-lines.
|
Full Usage:
XLine3D.getIntersectionParam (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
float
-
The X coordinate of the start point on the first line.
pAy : float
-
The Y coordinate of the start point on the first line.
pAz : float
-
The Z coordinate of the start point on the first line.
pBx : float
-
The X coordinate of the start point on the second line.
pBy : float
-
The Y coordinate of the start point on the second line.
pBz : float
-
The Z coordinate of the start point on the second line.
vAx : float
-
The X component of the vector of the first line.
vAy : float
-
The Y component of the vector of the first line.
vAz : float
-
The Z component of the vector of the first line.
vBx : float
-
The X component of the vector of the second line.
vBy : float
-
The Y component of the vector of the second line.
vBz : float
-
The Z component of the vector of the second line.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting. Default is 1e-6.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: XParam
An XParam Discriminated Union with the following cases:
| Intersect of float*float
| Skew of float*float*float
| Apart
| Parallel
| TooShortBoth
| TooShortA
| TooShortB
|
Tries to get intersection or closest approach parameters of two finite 3D-lines.
|
Full Usage:
XLine3D.getRayClosestParam (lineA, lineB, ?tangent, ?tooShortTolerance)
Parameters:
Line3D
-
First ray.
lineB : Line3D
-
Second ray.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: XRayParam
An XRayParam Discriminated Union with the following cases:
| SkewOrX of float*float
| Parallel
| TooShortBoth
| TooShortA
| TooShortB
Modifiers: inline |
Tries to get closest approach parameters of two rays (rays are 3D lines extended infinitely).
|
Full Usage:
XLine3D.getRayClosestParam (pA, pB, vA, vB, ?tangent, ?tooShortTolerance)
Parameters:
Pnt
-
The start point of the first ray.
pB : Pnt
-
The start point of the second ray.
vA : Vec
-
The direction vector of the first ray.
vB : Vec
-
The direction vector of the second ray.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: XRayParam
An XRayParam Discriminated Union with the following cases:
| SkewOrX of float*float
| Parallel
| TooShortBoth
| TooShortA
| TooShortB
Modifiers: inline |
Tries to get closest approach parameters of two rays (rays are 3D lines extended infinitely).
|
Full Usage:
XLine3D.getRayClosestParam (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz, ?tangent, ?tooShortTolerance)
Parameters:
float
-
The X coordinate of the start point on the first ray.
pAy : float
-
The Y coordinate of the start point on the first ray.
pAz : float
-
The Z coordinate of the start point on the first ray.
pBx : float
-
The X coordinate of the start point on the second ray.
pBy : float
-
The Y coordinate of the start point on the second ray.
pBz : float
-
The Z coordinate of the start point on the second ray.
vAx : float
-
The X component of the vector of the first ray.
vAy : float
-
The Y component of the vector of the first ray.
vAz : float
-
The Z component of the vector of the first ray.
vBx : float
-
The X component of the vector of the second ray.
vBy : float
-
The Y component of the vector of the second ray.
vBz : float
-
The Z component of the vector of the second ray.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: XRayParam
An XRayParam Discriminated Union with the following cases:
| SkewOrX of float*float (parameters on both lines at closest approach)
| Parallel
| TooShortBoth
| TooShortA
| TooShortB
|
Tries to get closest approach parameters of two rays (rays are 3D lines extended infinitely).
|
Full Usage:
XLine3D.getRayIntersection (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
Line3D
-
First ray.
lineB : Line3D
-
Second ray.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: XRay
An XRay Discriminated Union with the following cases:
| Intersect of Pnt
| Skew of Pnt * Pnt * float
| Parallel
| TooShortBoth
| TooShortA
| TooShortB
Modifiers: inline |
Classifies the relationship between two rays (treated as infinite lines) and returns their intersection or closest approach.
|
Full Usage:
XLine3D.getRayIntersection (pA, pB, vA, vB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
Pnt
-
The start point of the first ray.
pB : Pnt
-
The start point of the second ray.
vA : Vec
-
The direction vector of the first ray.
vB : Vec
-
The direction vector of the second ray.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: XRay
An XRay Discriminated Union with the following cases:
| Intersect of Pnt
| Skew of Pnt * Pnt * float
| Parallel
| TooShortBoth
| TooShortA
| TooShortB
Modifiers: inline |
Classifies the relationship between two rays (treated as infinite lines) and returns their intersection or closest approach.
|
Full Usage:
XLine3D.getRayIntersection (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
float
-
The X coordinate of the start point on the first ray.
pAy : float
-
The Y coordinate of the start point on the first ray.
pAz : float
-
The Z coordinate of the start point on the first ray.
pBx : float
-
The X coordinate of the start point on the second ray.
pBy : float
-
The Y coordinate of the start point on the second ray.
pBz : float
-
The Z coordinate of the start point on the second ray.
vAx : float
-
The X component of the vector of the first ray.
vAy : float
-
The Y component of the vector of the first ray.
vAz : float
-
The Z component of the vector of the first ray.
vBx : float
-
The X component of the vector of the second ray.
vBy : float
-
The Y component of the vector of the second ray.
vBz : float
-
The Z component of the vector of the second ray.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, then the 'TooShort' union case is returned.
Returns: XRay
An XRay Discriminated Union with the following cases:
| Intersect of Pnt
| Skew of Pnt * Pnt * float
| Parallel
| TooShortBoth
| TooShortA
| TooShortB
|
Tries to get closest approach point of two rays (rays are 3D lines extended infinitely).
|
|
|
Full Usage:
XLine3D.getSqDistance (pA, pB, vA, vB)
Parameters:
Pnt
-
The start point of the first line.
pB : Pnt
-
The start point of the second line.
vA : Vec
-
The direction vector of the first line.
vB : Vec
-
The direction vector of the second line.
Returns: float
the squared distance between the two lines
Modifiers: inline |
Gets the squared distance between two finite lines. Works on parallel and skew lines too.
|
Full Usage:
XLine3D.getSqDistance (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz)
Parameters:
float
-
The X coordinate of the start point on the first line.
pAy : float
-
The Y coordinate of the start point on the first line.
pAz : float
-
The Z coordinate of the start point on the first line.
pBx : float
-
The X coordinate of the start point on the second line.
pBy : float
-
The Y coordinate of the start point on the second line.
pBz : float
-
The Z coordinate of the start point on the second line.
vAx : float
-
The X component of the vector of the first line.
vAy : float
-
The Y component of the vector of the first line.
vAz : float
-
The Z component of the vector of the first line.
vBx : float
-
The X component of the vector of the second line.
vBy : float
-
The Y component of the vector of the second line.
vBz : float
-
The Z component of the vector of the second line.
Returns: float
the squared distance between the two lines
|
Gets the squared distance between two finite lines. Works on parallel and skew lines too.
|
Full Usage:
XLine3D.intersectCone (ray, coneRadius, coneBaseZ, coneTipZ)
Parameters:
Line3D
-
The Line3D to intersect. It is considered as infinite ray.
coneRadius : float
-
The radius of the cone at the base. Parallel to the XY plane.
coneBaseZ : float
-
The Z coordinate of the cone base.
coneTipZ : float
-
The Z coordinate of the cone tip.
Returns: XCone
An XLine3D.XCone discriminated union representing the intersection result with parameter(s) on the line:
| NoIntersection: The line does not intersect the cone.
| Tangential: The line is tangent to the cone surface.
| Touching of float: The line touches the cone at one point with a tolerance of 1e-6, contains the parameter on the line.
| Intersecting of float*float: The line intersects the cone at two points, contains both parameters on the line.
|
Intersects a ray with an infinite double cone that has its axis on the Z-axis.
|
Full Usage:
XLine3D.parameterA (lineA, lineB)
Parameters: Returns: float
The parameter on lineA at the closest approach with lineB.
NaN if both start points coincide and vectors are exactly parallel (0.0/0.0).
Positive/Negative Infinity for almost parallel lines.
Modifiers: inline |
Returns the closest approach parameter on the first ray (A) where ray A and ray B come closest. Returns NaN or Infinity for zero length or parallel lines.
|
Full Usage:
XLine3D.parameterA (pA, pB, vA, vB)
Parameters:
Pnt
-
The start point of the first ray.
pB : Pnt
-
The start point of the second ray.
vA : Vec
-
The direction vector of the first ray.
vB : Vec
-
The direction vector of the second ray.
Returns: float
The parameter on line A at the closest approach with line B.
NaN if both points coincide and vectors are exactly parallel (0.0/0.0).
Positive/Negative Infinity for almost parallel lines.
Modifiers: inline |
Returns the closest approach parameter on the first ray (A) where ray A and ray B come closest. Returns NaN or Infinity for zero length or parallel lines.
|
Full Usage:
XLine3D.parameterA (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz)
Parameters:
float
-
The X coordinate of the start point on the first ray.
pAy : float
-
The Y coordinate of the start point on the first ray.
pAz : float
-
The Z coordinate of the start point on the first ray.
pBx : float
-
The X coordinate of the start point on the second ray.
pBy : float
-
The Y coordinate of the start point on the second ray.
pBz : float
-
The Z coordinate of the start point on the second ray.
vAx : float
-
The X component of the vector of the first ray.
vAy : float
-
The Y component of the vector of the first ray.
vAz : float
-
The Z component of the vector of the first ray.
vBx : float
-
The X component of the vector of the second ray.
vBy : float
-
The Y component of the vector of the second ray.
vBz : float
-
The Z component of the vector of the second ray.
Returns: float
The parameter at which the two rays intersect (or come closest) on line A.
This is NaN if A and B points are identical and the vectors are exactly parallel (zero divided by zero).
This is positive or negative Infinity for almost parallel lines.
Modifiers: inline |
Returns the closest approach parameter on the first ray (A) where ray A and ray B come closest. Returns NaN or Infinity for zero length or parallel lines.
|
Full Usage:
XLine3D.parameters (lineA, lineB)
Parameters: Returns: float * float
A (t,u) tuple where t is the parameter on line A and u on line B at their closest approach.
These are NaN if A and B points are identical and the vectors are exactly parallel (zero divided by zero).
These are positive or negative Infinity for almost parallel lines.
Modifiers: inline |
Returns the closest approach parameters on both rays. Returns NaN or Infinity for zero length or parallel lines.
|
Full Usage:
XLine3D.parameters (pA, pB, vA, vB)
Parameters:
Pnt
-
The start point of the first ray.
pB : Pnt
-
The start point of the second ray.
vA : Vec
-
The direction vector of the first ray.
vB : Vec
-
The direction vector of the second ray.
Returns: float * float
A (t,u) tuple where t is the parameter on line A and u on line B at their closest approach.
These are NaN if A and B points are identical and the vectors are exactly parallel (zero divided by zero).
These are positive or negative Infinity for almost parallel lines.
Modifiers: inline |
Returns the closest approach parameters on both rays A and B. Returns NaN or Infinity for zero length or parallel lines.
|
Full Usage:
XLine3D.parameters (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz)
Parameters:
float
-
The X coordinate of the start point on the first ray.
pAy : float
-
The Y coordinate of the start point on the first ray.
pAz : float
-
The Z coordinate of the start point on the first ray.
pBx : float
-
The X coordinate of the start point on the second ray.
pBy : float
-
The Y coordinate of the start point on the second ray.
pBz : float
-
The Z coordinate of the start point on the second ray.
vAx : float
-
The X component of the vector of the first ray.
vAy : float
-
The Y component of the vector of the first ray.
vAz : float
-
The Z component of the vector of the first ray.
vBx : float
-
The X component of the vector of the second ray.
vBy : float
-
The Y component of the vector of the second ray.
vBz : float
-
The Z component of the vector of the second ray.
Returns: float * float
A (t,u) tuple where t is the parameter on line A and u on line B at their closest approach.
These are NaN if A and B points are identical and the vectors are exactly parallel (zero divided by zero).
These are positive or negative Infinity for almost parallel lines.
Modifiers: inline |
Returns the closest approach parameters on both rays A and B. Returns NaN or Infinity for zero length or parallel lines.
|
Full Usage:
XLine3D.tryClosestParameterRayA (lineA, lineB)
Parameters: Returns: float option
The parameter on lineA at the closest approach with lineB if it is smaller than 1e12 in absolute value,
or None if the parameter is bigger than 1e12 or if they are parallel or coincident.
Modifiers: inline |
Returns the closest approach parameter on the first ray (A) where ray A and ray B come closest.
|
Full Usage:
XLine3D.tryClosestParameterRayA (pA, pB, vA, vB)
Parameters:
Pnt
-
The start point of the first ray.
pB : Pnt
-
The start point of the second ray.
vA : Vec
-
The direction vector of the first ray.
vB : Vec
-
The direction vector of the second ray.
Returns: float option
The parameter on line A at the closest approach with line B if it is smaller than 1e12 in absolute value,
or None if the parameter is bigger than 1e12 or if they are parallel or coincident.
Modifiers: inline |
Returns the closest approach parameter on the first ray (A) where ray A and ray B come closest.
|
Full Usage:
XLine3D.tryClosestParameterRayA (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz)
Parameters:
float
-
The X coordinate of the start point on the first ray.
pAy : float
-
The Y coordinate of the start point on the first ray.
pAz : float
-
The Z coordinate of the start point on the first ray.
pBx : float
-
The X coordinate of the start point on the second ray.
pBy : float
-
The Y coordinate of the start point on the second ray.
pBz : float
-
The Z coordinate of the start point on the second ray.
vAx : float
-
The X component of the vector of the first ray.
vAy : float
-
The Y component of the vector of the first ray.
vAz : float
-
The Z component of the vector of the first ray.
vBx : float
-
The X component of the vector of the second ray.
vBy : float
-
The Y component of the vector of the second ray.
vBz : float
-
The Z component of the vector of the second ray.
Returns: float option
The parameter at which the two rays come closest on line A if it is smaller than 1e12 in absolute value,
or None if the parameter is bigger than 1e12 or if they are parallel or coincident.
Modifiers: inline |
Returns the closest approach parameter on the first ray (A) where ray A and ray B come closest.
|
Full Usage:
XLine3D.tryClosestPntRayA (lineA, lineB)
Parameters: Returns: Pnt option
The point at which the two rays come closest (on Line A, first Line) if the parameter on Line A is smaller than 1e12 in absolute value,
or None if the parameter is bigger than 1e12 ( = the lines are far away or parallel) or if they are exactly parallel or coincident.
Modifiers: inline |
Tries to get closest approach point of two rays (rays are 3D lines extended infinitely).
|
Full Usage:
XLine3D.tryClosestPntRayA (pA, pB, vA, vB)
Parameters:
Pnt
-
The start point of the first ray.
pB : Pnt
-
The start point of the second ray.
vA : Vec
-
The direction vector of the first ray.
vB : Vec
-
The direction vector of the second ray.
Returns: Pnt option
The point at which the two rays come closest (on Line A) if the parameter on Line A is smaller than 1e12 in absolute value,
or None if the parameter is bigger than 1e12 ( = the lines are far away or parallel) or if they are exactly parallel or coincident.
Modifiers: inline |
Tries to get closest approach point of two rays (rays are 3D lines extended infinitely).
|
Full Usage:
XLine3D.tryClosestPntRayA (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz)
Parameters:
float
-
The X coordinate of the start point on the first ray.
pAy : float
-
The Y coordinate of the start point on the first ray.
pAz : float
-
The Z coordinate of the start point on the first ray.
pBx : float
-
The X coordinate of the start point on the second ray.
pBy : float
-
The Y coordinate of the start point on the second ray.
pBz : float
-
The Z coordinate of the start point on the second ray.
vAx : float
-
The X component of the vector of the first ray.
vAy : float
-
The Y component of the vector of the first ray.
vAz : float
-
The Z component of the vector of the first ray.
vBx : float
-
The X component of the vector of the second ray.
vBy : float
-
The Y component of the vector of the second ray.
vBz : float
-
The Z component of the vector of the second ray.
Returns: Pnt option
The point at which the two rays come closest (on Line A) if the parameter on Line A is smaller than 1e12 in absolute value,
or None if the parameter is bigger than 1e12 ( = the lines are far away or parallel) or if they are exactly parallel or coincident.
Modifiers: inline |
Tries to get closest approach point of two rays (rays are 3D lines extended infinitely).
|
Full Usage:
XLine3D.tryIntersect (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
Line3D
-
First line.
lineB : Line3D
-
Second line.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, None is returned.
Returns: Pnt option
An intersection point on line A, or None if the segments are skew, parallel, or too short.
Modifiers: inline |
Tries to get an actual intersection point of two finite 3D lines.
|
Full Usage:
XLine3D.tryIntersect (pA, pB, vA, vB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
Pnt
-
The start point of the first line.
pB : Pnt
-
The start point of the second line.
vA : Vec
-
The direction vector of the first line.
vB : Vec
-
The direction vector of the second line.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, None is returned.
Returns: Pnt option
An intersection point on line A, or None if the segments are skew, parallel, or too short.
Modifiers: inline |
Tries to get an actual intersection point of two finite 3D lines.
|
Full Usage:
XLine3D.tryIntersect (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
float
-
The X coordinate of the start point on the first line.
pAy : float
-
The Y coordinate of the start point on the first line.
pAz : float
-
The Z coordinate of the start point on the first line.
pBx : float
-
The X coordinate of the start point on the second line.
pBy : float
-
The Y coordinate of the start point on the second line.
pBz : float
-
The Z coordinate of the start point on the second line.
vAx : float
-
The X component of the vector of the first line.
vAy : float
-
The Y component of the vector of the first line.
vAz : float
-
The Z component of the vector of the first line.
vBx : float
-
The X component of the vector of the second line.
vBy : float
-
The Y component of the vector of the second line.
vBz : float
-
The Z component of the vector of the second line.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, None is returned.
Returns: Pnt option
An intersection point on line A, or None if the segments are skew, parallel, or too short.
|
Tries to get an actual intersection point of two finite 3D lines.
|
Full Usage:
XLine3D.tryIntersectRay (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
Line3D
-
First ray.
lineB : Line3D
-
Second ray.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, None is returned.
Returns: Pnt option
An intersection point on ray A, or None if the rays are skew, parallel, or too short.
Modifiers: inline |
Tries to get an actual intersection point of two rays (3D lines treated as infinite).
|
Full Usage:
XLine3D.tryIntersectRay (pA, pB, vA, vB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
Pnt
-
The start point of the first ray.
pB : Pnt
-
The start point of the second ray.
vA : Vec
-
The direction vector of the first ray.
vB : Vec
-
The direction vector of the second ray.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, None is returned.
Returns: Pnt option
An intersection point on ray A, or None if the rays are skew, parallel, or too short.
Modifiers: inline |
Tries to get an actual intersection point of two rays (3D lines treated as infinite).
|
Full Usage:
XLine3D.tryIntersectRay (pAx, pAy, pAz, pBx, pBy, pBz, vAx, vAy, vAz, vBx, vBy, vBz, ?maxSkewDistance, ?tangent, ?tooShortTolerance)
Parameters:
float
-
The X coordinate of the start point on the first ray.
pAy : float
-
The Y coordinate of the start point on the first ray.
pAz : float
-
The Z coordinate of the start point on the first ray.
pBx : float
-
The X coordinate of the start point on the second ray.
pBy : float
-
The Y coordinate of the start point on the second ray.
pBz : float
-
The Z coordinate of the start point on the second ray.
vAx : float
-
The X component of the vector of the first ray.
vAy : float
-
The Y component of the vector of the first ray.
vAz : float
-
The Z component of the vector of the first ray.
vBx : float
-
The X component of the vector of the second ray.
vBy : float
-
The Y component of the vector of the second ray.
vBz : float
-
The Z component of the vector of the second ray.
?maxSkewDistance : float
-
The maximum allowed distance at closest approach to still consider the lines intersecting.
?tangent : MeasureProduct<tangent, MeasureOne>
-
Is an optional tangent of the maximum allowed angle between the two line vectors.
The default value is '0.00436' this corresponds to approx 0.25 degree. Below this angle the lines are considered parallel.
Use the module Euclid.UtilEuclid.Tangent to set another tolerance here.
?tooShortTolerance : float
-
Is an optional length tolerance. 1e-6 by default.
If one or both lines are shorter than this, None is returned.
Returns: Pnt option
An intersection point on ray A, or None if the rays are skew, parallel, or too short.
|
Tries to get an actual intersection point of two rays (3D lines treated as infinite).
|
Euclid