Logo Euclid

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

XLine3D.classifyClosestParameters lineA lineB

Full Usage: XLine3D.classifyClosestParameters lineA lineB

Parameters:
    lineA : Line3D - The first finite line segment.
    lineB : Line3D - The second finite line segment.

Returns: ClParams A 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. Uses the default tangent and tooShortTolerance. Use XLine3D.classifyClosestParametersCustom to set them.

lineA : Line3D

The first finite line segment.

lineB : Line3D

The second finite line segment.

Returns: ClParams

A 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

XLine3D.classifyClosestParametersCustom (lineA, lineB, ?tangent, ?tooShortTolerance)

Full Usage: XLine3D.classifyClosestParametersCustom (lineA, lineB, ?tangent, ?tooShortTolerance)

Parameters:
    lineA : 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 A 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. The optional parameters can be given by name. Use XLine3D.classifyClosestParameters for the defaults.

lineA : 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

A 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

XLine3D.classifyClosestPoints lineA lineB

Full Usage: XLine3D.classifyClosestPoints lineA lineB

Parameters:
    lineA : Line3D - The first line.
    lineB : Line3D - The second line.

Returns: ClPnts A ClPnts 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. Uses the default tangent and tooShortTolerance. Use XLine3D.classifyClosestPointsCustom to set them.

lineA : Line3D

The first line.

lineB : Line3D

The second line.

Returns: ClPnts

A ClPnts 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

XLine3D.classifyClosestPointsCustom (lineA, lineB, ?tangent, ?tooShortTolerance)

Full Usage: XLine3D.classifyClosestPointsCustom (lineA, lineB, ?tangent, ?tooShortTolerance)

Parameters:
    lineA : 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: ClPnts A ClPnts 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. The optional parameters can be given by name. Use XLine3D.classifyClosestPoints for the defaults.

lineA : 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: ClPnts

A ClPnts 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

XLine3D.classifyConeIntersection coneRadius coneBaseZ coneTipZ ray

Full Usage: XLine3D.classifyConeIntersection coneRadius coneBaseZ coneTipZ ray

Parameters:
    coneRadius : float - The radius of the cone at the base. Parallel to the XY plane. Must be positive.
    coneBaseZ : float - The Z coordinate of the cone base.
    coneTipZ : float - The Z coordinate of the cone tip. Must differ from coneBaseZ. Only the nappe on the base side of the tip is considered part of the cone.
    ray : Line3D - The Line3D to intersect. It is considered infinite in both directions.

Returns: XCone An XCone discriminated union, see its documentation for all cases.

Intersects an infinite ray / line with the base-side nappe of a cone whose axis is the Z-axis.

coneRadius : float

The radius of the cone at the base. Parallel to the XY plane. Must be positive.

coneBaseZ : float

The Z coordinate of the cone base.

coneTipZ : float

The Z coordinate of the cone tip. Must differ from coneBaseZ. Only the nappe on the base side of the tip is considered part of the cone.

ray : Line3D

The Line3D to intersect. It is considered infinite in both directions.

Returns: XCone

An XCone discriminated union, see its documentation for all cases.

XLine3D.classifyEndsTouching a b

Full Usage: XLine3D.classifyEndsTouching a b

Parameters:
    a : Line3D - The first line.
    b : Line3D - The second line.

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. Uses the default tolerance of 1e-6. Use XLine3D.classifyEndsTouchingWithin to set it.

a : Line3D

The first line.

b : Line3D

The second line.

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

XLine3D.classifyEndsTouchingWithin tolerance a b

Full Usage: XLine3D.classifyEndsTouchingWithin tolerance a b

Parameters:
    tolerance : float - The distance tolerance.
    a : Line3D - The first line.
    b : Line3D - The second line.

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. Use XLine3D.classifyEndsTouching for the default tolerance of 1e-6.

tolerance : float

The distance tolerance.

a : Line3D

The first line.

b : Line3D

The second line.

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

XLine3D.classifyIntersection lineA lineB

Full Usage: XLine3D.classifyIntersection lineA lineB

Parameters:
    lineA : Line3D - First finite line segment.
    lineB : Line3D - Second finite line segment.

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. Uses the default maxSkewDistance, tangent and tooShortTolerance. Use XLine3D.classifyIntersectionCustom to set them.

lineA : Line3D

First finite line segment.

lineB : Line3D

Second finite line segment.

Returns: XPnt

An XPt Discriminated Union with the following cases: | Intersect of Pnt | Skew of Pnt * Pnt * float | Apart | Parallel | TooShortBoth | TooShortA | TooShortB

XLine3D.classifyIntersectionCustom (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)

Full Usage: XLine3D.classifyIntersectionCustom (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)

Parameters:
    lineA : 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. The optional parameters can be given by name. Use XLine3D.classifyIntersection for the defaults.

lineA : 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

XLine3D.classifyIntersectionParameters lnA lnB

Full Usage: XLine3D.classifyIntersectionParameters lnA lnB

Parameters:
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. Uses the default maxSkewDistance, tangent and tooShortTolerance. Use XLine3D.classifyIntersectionParametersCustom to set them.

lnA : Line3D

First line.

lnB : Line3D

Second line.

Returns: XParam

An XParam Discriminated Union with the following cases: | Intersect of float*float | Skew of float*float*float | Apart | Parallel | TooShortBoth | TooShortA | TooShortB

XLine3D.classifyIntersectionParametersCustom (lnA, lnB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)

Full Usage: XLine3D.classifyIntersectionParametersCustom (lnA, lnB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)

Parameters:
    lnA : 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. The optional parameters can be given by name. Use XLine3D.classifyIntersectionParameters for the defaults.

lnA : 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

XLine3D.classifyRayClosestParameters lineA lineB

Full Usage: XLine3D.classifyRayClosestParameters lineA lineB

Parameters:
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). Uses the default tangent and tooShortTolerance. Use XLine3D.classifyRayClosestParametersCustom to set them.

lineA : Line3D

First ray.

lineB : Line3D

Second ray.

Returns: XRayParam

An XRayParam Discriminated Union with the following cases: | SkewOrX of float*float | Parallel | TooShortBoth | TooShortA | TooShortB

XLine3D.classifyRayClosestParametersCustom (lineA, lineB, ?tangent, ?tooShortTolerance)

Full Usage: XLine3D.classifyRayClosestParametersCustom (lineA, lineB, ?tangent, ?tooShortTolerance)

Parameters:
    lineA : 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). The optional parameters can be given by name. Use XLine3D.classifyRayClosestParameters for the defaults.

lineA : 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

XLine3D.classifyRayIntersection lineA lineB

Full Usage: XLine3D.classifyRayIntersection lineA lineB

Parameters:
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. Uses the default maxSkewDistance, tangent and tooShortTolerance. Use XLine3D.classifyRayIntersectionCustom to set them.

lineA : Line3D

First ray.

lineB : Line3D

Second ray.

Returns: XRay

An XRay Discriminated Union with the following cases: | Intersect of Pnt | Skew of Pnt * Pnt * float | Parallel | TooShortBoth | TooShortA | TooShortB

XLine3D.classifyRayIntersectionCustom (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)

Full Usage: XLine3D.classifyRayIntersectionCustom (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)

Parameters:
    lineA : 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. The optional parameters can be given by name. Use XLine3D.classifyRayIntersection for the defaults.

lineA : 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

XLine3D.closestParameters lineA lineB

Full Usage: XLine3D.closestParameters lineA lineB

Parameters:
    lineA : Line3D - The first segment.
    lineB : Line3D - The second segment.

Returns: float * float A tuple of closest parameters, treating squared lengths at most 1e-12 as points.

Returns the closest parameters on finite segments, clamped to [0,1]. Handles points and parallel segments; overlapping parallels prefer parameter zero on A.

lineA : Line3D

The first segment.

lineB : Line3D

The second segment.

Returns: float * float

A tuple of closest parameters, treating squared lengths at most 1e-12 as points.

XLine3D.distanceSq lineA lineB

Full Usage: XLine3D.distanceSq lineA lineB

Parameters:
    lineA : Line3D - The first line.
    lineB : Line3D - 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.

lineA : Line3D

The first line.

lineB : Line3D

The second line.

Returns: float

the squared distance between the two lines

XLine3D.doIntersect lineA lineB

Full Usage: XLine3D.doIntersect lineA lineB

Parameters:
    lineA : Line3D - First line.
    lineB : Line3D - Second line.

Returns: bool TRUE if both finite lines intersect within the given maximum skew distance. FALSE if the lines are parallel, coincident, too short, skew beyond the given tolerance, or at least one intersection parameter is outside of the range.
Modifiers: inline

Checks if two 3D-lines intersect within the parameter range 0.0 to 1.0 (with 1e-6 tolerance) on both lines. Uses the default maxSkewDistance, tangent and tooShortTolerance. Use XLine3D.doIntersectCustom to set them.

lineA : Line3D

First line.

lineB : Line3D

Second line.

Returns: bool

TRUE if both finite lines intersect within the given maximum skew distance. FALSE if the lines are parallel, coincident, too short, skew beyond the given tolerance, or at least one intersection parameter is outside of the range.

XLine3D.doIntersectCustom (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)

Full Usage: XLine3D.doIntersectCustom (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)

Parameters:
    lineA : Line3D - First line.
    lineB : Line3D - Second line.
    ?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.
    ?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.
    ?tooShortTolerance : float - Is an optional length tolerance. 1e-6 by default. If one or both lines are shorter than this, FALSE is returned.

Returns: bool TRUE if both finite lines intersect within the given maximum skew distance. FALSE if the lines are parallel, coincident, too short, skew beyond the given tolerance, or at least one intersection parameter is outside of the range.
Modifiers: inline

Checks if two 3D-lines intersect within the parameter range 0.0 to 1.0 (with 1e-6 tolerance) on both lines. The optional parameters can be given by name. Use XLine3D.doIntersect for the defaults.

lineA : Line3D

First line.

lineB : Line3D

Second line.

?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.

?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.

?tooShortTolerance : float

Is an optional length tolerance. 1e-6 by default. If one or both lines are shorter than this, FALSE is returned.

Returns: bool

TRUE if both finite lines intersect within the given maximum skew distance. FALSE if the lines are parallel, coincident, too short, skew beyond the given tolerance, or at least one intersection parameter is outside of the range.

XLine3D.doOverlap lineA lineB

Full Usage: XLine3D.doOverlap lineA lineB

Parameters:
    lineA : Line3D - The first line.
    lineB : Line3D - The second line.

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. Uses the default tolerance of 1e-6. Use XLine3D.doOverlapWithin to set it.

lineA : Line3D

The first line.

lineB : Line3D

The second line.

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.

XLine3D.doOverlapWithin tolerance lineA lineB

Full Usage: XLine3D.doOverlapWithin tolerance lineA lineB

Parameters:
    tolerance : float - A distance tolerance (compared against the squared distance internally). Used for checking if the distance between parallel lines is less than this value.
    lineA : Line3D - The first line.
    lineB : Line3D - The second line.

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. Use XLine3D.doOverlap for the default tolerance of 1e-6.

tolerance : float

A distance tolerance (compared against the squared distance internally). Used for checking if the distance between parallel lines is less than this value.

lineA : Line3D

The first line.

lineB : Line3D

The second line.

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.

XLine3D.doRaysIntersect lineA lineB

Full Usage: XLine3D.doRaysIntersect lineA lineB

Parameters:
    lineA : Line3D - The first ray.
    lineB : Line3D - The second ray.

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.classifyRayIntersection to check for those cases too. Uses the default maxSkewDistance of 1e-6. Use XLine3D.doRaysIntersectWithin to set it.

lineA : Line3D

The first ray.

lineB : Line3D

The second ray.

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.

XLine3D.doRaysIntersectWithin maxSkewDistance lineA lineB

Full Usage: XLine3D.doRaysIntersectWithin maxSkewDistance lineA lineB

Parameters:
    maxSkewDistance : float - The maximum distance tolerance. Used for checking if the distance between the two lines at their closest approach is less than this value.
    lineA : Line3D - The first ray.
    lineB : Line3D - The second ray.

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.classifyRayIntersection to check for those cases too. Use XLine3D.doRaysIntersect for the default maxSkewDistance of 1e-6.

maxSkewDistance : float

The maximum distance tolerance. Used for checking if the distance between the two lines at their closest approach is less than this value.

lineA : Line3D

The first ray.

lineB : Line3D

The second ray.

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.

XLine3D.intersectRays lineA lineB

Full Usage: XLine3D.intersectRays lineA lineB

Parameters:
Returns: Pnt The intersection point on ray A.

Intersects two rays (3D lines treated as infinite). Uses the default maxSkewDistance of 1e-6, the default tangent of 0.25 degrees and the default tooShortTolerance of 1e-6. Fails if the rays are skew, parallel or too short. Use XLine3D.tryIntersectRays to get ValueNone instead.

lineA : Line3D

First ray.

lineB : Line3D

Second ray.

Returns: Pnt

The intersection point on ray A.

XLine3D.isWithinRanges (maxSkewDistance, minParameterA, maxParameterA, minParameterB, maxParameterB, lineA, lineB)

Full Usage: XLine3D.isWithinRanges (maxSkewDistance, minParameterA, maxParameterA, minParameterB, maxParameterB, lineA, lineB)

Parameters:
    maxSkewDistance : float - Finite, nonnegative maximum separation, inclusive.
    minParameterA : float - Inclusive lower parameter on A.
    maxParameterA : float - Inclusive upper parameter on A.
    minParameterB : float - Inclusive lower parameter on B.
    maxParameterB : float - Inclusive upper parameter on B.
    lineA : Line3D - The first line, extended infinitely in both directions.
    lineB : Line3D - The second line, extended infinitely in both directions.

Returns: bool TRUE when the unique closest pair satisfies both ranges and the distance tolerance.
Modifiers: inline

Tests inclusive closest-approach parameter ranges and skew distance on infinite lines. Returns FALSE for parallel or zero-length lines.

maxSkewDistance : float

Finite, nonnegative maximum separation, inclusive.

minParameterA : float

Inclusive lower parameter on A.

maxParameterA : float

Inclusive upper parameter on A.

minParameterB : float

Inclusive lower parameter on B.

maxParameterB : float

Inclusive upper parameter on B.

lineA : Line3D

The first line, extended infinitely in both directions.

lineB : Line3D

The second line, extended infinitely in both directions.

Returns: bool

TRUE when the unique closest pair satisfies both ranges and the distance tolerance.

XLine3D.parameterA lineA lineB

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.

lineA : Line3D

First ray.

lineB : Line3D

Second ray.

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.

XLine3D.parameters lineA lineB

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.

lineA : Line3D

First ray.

lineB : Line3D

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.

XLine3D.tryClosestParameterRayA lineA lineB

Full Usage: XLine3D.tryClosestParameterRayA lineA lineB

Parameters:
Returns: float voption The parameter on lineA at the closest approach with lineB if it is smaller than 1e12 in absolute value, or ValueNone 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.

lineA : Line3D

First ray.

lineB : Line3D

Second ray.

Returns: float voption

The parameter on lineA at the closest approach with lineB if it is smaller than 1e12 in absolute value, or ValueNone if the parameter is bigger than 1e12 or if they are parallel or coincident.

XLine3D.tryClosestPntRayA lineA lineB

Full Usage: XLine3D.tryClosestPntRayA lineA lineB

Parameters:
    lineA : Line3D - First line.
    lineB : Line3D - Second line.

Returns: Pnt voption 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 ValueNone 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).

lineA : Line3D

First line.

lineB : Line3D

Second line.

Returns: Pnt voption

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 ValueNone if the parameter is bigger than 1e12 ( = the lines are far away or parallel) or if they are exactly parallel or coincident.

XLine3D.tryIntersect lineA lineB

Full Usage: XLine3D.tryIntersect lineA lineB

Parameters:
    lineA : Line3D - First line.
    lineB : Line3D - Second line.

Returns: Pnt voption An intersection point on line A, or ValueNone if the segments are skew, parallel, or too short.
Modifiers: inline

Tries to get an actual intersection point of two finite 3D lines. Uses the default maxSkewDistance, tangent and tooShortTolerance. Use XLine3D.tryIntersectCustom to set them.

lineA : Line3D

First line.

lineB : Line3D

Second line.

Returns: Pnt voption

An intersection point on line A, or ValueNone if the segments are skew, parallel, or too short.

XLine3D.tryIntersectCustom (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)

Full Usage: XLine3D.tryIntersectCustom (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)

Parameters:
    lineA : 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, ValueNone is returned.

Returns: Pnt voption An intersection point on line A, or ValueNone if the segments are skew, parallel, or too short.
Modifiers: inline

Tries to get an actual intersection point of two finite 3D lines. The optional parameters can be given by name. Use XLine3D.tryIntersect for the defaults.

lineA : 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, ValueNone is returned.

Returns: Pnt voption

An intersection point on line A, or ValueNone if the segments are skew, parallel, or too short.

XLine3D.tryIntersectRays lineA lineB

Full Usage: XLine3D.tryIntersectRays lineA lineB

Parameters:
Returns: Pnt voption An intersection point on ray A, or ValueNone 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). Uses the default maxSkewDistance, tangent and tooShortTolerance. Use XLine3D.tryIntersectRaysCustom to set them.

lineA : Line3D

First ray.

lineB : Line3D

Second ray.

Returns: Pnt voption

An intersection point on ray A, or ValueNone if the rays are skew, parallel, or too short.

XLine3D.tryIntersectRaysCustom (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)

Full Usage: XLine3D.tryIntersectRaysCustom (lineA, lineB, ?maxSkewDistance, ?tangent, ?tooShortTolerance)

Parameters:
    lineA : 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, ValueNone is returned.

Returns: Pnt voption An intersection point on ray A, or ValueNone 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). The optional parameters can be given by name. Use XLine3D.tryIntersectRays for the defaults.

lineA : 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, ValueNone is returned.

Returns: Pnt voption

An intersection point on ray A, or ValueNone if the rays are skew, parallel, or too short.

Type something to start searching.