Header menu logo Euclid

Intersect Module

Types

Type Description

LineLineRelation

A Discriminated Union with the result cases from the first step of a 2D line-line intersection test.

Functions and values

Function or value Description

lineCone (ln, coneRadius, coneBaseZ, coneTipZ)

Full Usage: lineCone (ln, coneRadius, coneBaseZ, coneTipZ)

Parameters:
    ln : Line3D
    coneRadius : float
    coneBaseZ : float
    coneTipZ : float

Returns: XLineCone

Intersects an infinite line with an infinite double cone that has it's Axis on Z-Axis. coneRadius -> coneBaseZ -> coneTipZ -> (ln:Line3D) -> XConeLine Returns the parameter(s) on the line.

ln : Line3D
coneRadius : float
coneBaseZ : float
coneTipZ : float
Returns: XLineCone

lineTriangle (line, p1, p2, p3)

Full Usage: lineTriangle (line, p1, p2, p3)

Parameters:
Returns: Pnt option

Calculates the intersection of a finite line with a triangle. Returns Some(Pnt) or None if no intersection was found, or if the input line has near zero length, or or if input triangle has near zero area. This algorithm still returns an intersection even if line and triangle are almost parallel. Since it is using the triple product it is be hard to find an appropriate tolerance for considering lines and triangles parallel based on the volume of the Tetrahedron between them.

line : Line3D
p1 : Pnt
p2 : Pnt
p3 : Pnt
Returns: Pnt option

Type something to start searching.