math.dist.triangle.segment

Syntax

f := math.dist.triangle.segment(v1,v2,v3,v4,v5)

Get the shortest distance between a triangle and a line segment.

The first three arguments define the triangle last two arguments define the line segment. This can be defined in either 2D or 3D.

Returns:

f - distance

Arguments:

v1 - first vertex of the triangle

v2 - second vertex of the triangle

v3 - third vertex of the triangle

v4 - first point of the line segment

v5 - second point of the line segment