Header menu logo Euclid

Line3D Type

An immutable finite line in 3D. Represented by a 3D start and 3D end point.

Record fields

Record Field Description

FromX

Full Usage: FromX

Field type: float

Returns the X coordinate of the start point of the line.

Field type: float

FromY

Full Usage: FromY

Field type: float

Returns the Y coordinate of the start point of the line.

Field type: float

FromZ

Full Usage: FromZ

Field type: float

Returns the Z coordinate of the start point of the line.

Field type: float

ToX

Full Usage: ToX

Field type: float

Returns the X coordinate of the end point of the line.

Field type: float

ToY

Full Usage: ToY

Field type: float

Returns the Y coordinate of the end point of the line.

Field type: float

ToZ

Full Usage: ToZ

Field type: float

Returns the Z coordinate of the end point of the line.

Field type: float

Constructors

Constructor Description

Line3D(fromX, fromY, fromZ, toX, toY, toZ)

Full Usage: Line3D(fromX, fromY, fromZ, toX, toY, toZ)

Parameters:
    fromX : float
    fromY : float
    fromZ : float
    toX : float
    toY : float
    toZ : float

Returns: Line3D

Create Line3D from 3D start point's x, y and z and 3D end point's x, y and z.

fromX : float
fromY : float
fromZ : float
toX : float
toY : float
toZ : float
Returns: Line3D

Line3D(fromPt, toPt)

Full Usage: Line3D(fromPt, toPt)

Parameters:
Returns: Line3D

Create Line3D from 3D start point and 3D end point.

fromPt : Pnt
toPt : Pnt
Returns: Line3D

Instance members

Instance member Description

this.AsString

Full Usage: this.AsString

Returns: string

Format 3D line into string from X, Y and Z for start and end points. Using nice floating point number formatting . But without full type name as in v.ToString()

Returns: string

this.Direction

Full Usage: this.Direction

Returns: Vec
Modifiers: inline

Same as ln.Vector or ln.Tangent. The returned vector has the same length as the Line3D.

Returns: Vec

this.From

Full Usage: this.From

Returns: Pnt
Modifiers: inline

The Start point of the 3D Line3D,

Returns: Pnt

this.Length

Full Usage: this.Length

Returns: float
Modifiers: inline

Returns the length of the line.

Returns: float

this.LengthSq

Full Usage: this.LengthSq

Returns: float
Modifiers: inline

Returns the square length of the line.

Returns: float

this.Rotate

Full Usage: this.Rotate

Parameters:
Returns: Line3D
Modifiers: inline

Multiplies (or applies) a Quaternion to a 3D line . The resulting line has the same length as the input.

q : Quaternion
Returns: Line3D

this.RotateWithCenter

Full Usage: this.RotateWithCenter

Parameters:
Returns: Line3D
Modifiers: inline

Multiplies (or applies) a Quaternion to a 3D line around a given center point. The resulting line has the same length as the input.

cen : Pnt
q : Quaternion
Returns: Line3D

this.Tangent

Full Usage: this.Tangent

Returns: Vec
Modifiers: inline

Same as ln.Vector or ln.Direction. The returned vector has the same length as the Line3D.

Returns: Vec

this.To

Full Usage: this.To

Returns: Pnt
Modifiers: inline

The End point of the 3D Line3D,

Returns: Pnt

this.UnitTangent

Full Usage: this.UnitTangent

Returns: UnitVec
Modifiers: inline

Returns a unit-vector of the line Direction.

Returns: UnitVec

this.Vector

Full Usage: this.Vector

Returns: Vec
Modifiers: inline

Same as ln.Tangent or ln.Direction. The returned vector has the same length as the Line3D.

Returns: Vec

Static members

Static member Description

ln *** q

Full Usage: ln *** q

Parameters:
Returns: Line3D
Modifiers: inline

Rotate by Quaternion around Origin. Multiplies (or applies) a Quaternion to a 3D line.

ln : Line3D
q : Quaternion
Returns: Line3D

Type something to start searching.