`class LineSegment3D: AbstractCurve3D`

Line segment in 3D defined by a start and end vector.

Fields

Name Description
`val domain: Range<Double>`

definable domain

`val direction: /** direction of the line segment as normalized vector */`

direction of the line segment as normalized vector

`val vertices: /** start and end vertices of the line segment as list */`

start and end vertices of the line segment as list

`val start: Vector3D`

start of the line segment

`val end: Vector3D`

end of the line segment

`val tolerance: Double`

allowed tolerance

## Constructors

### <init>

`constructor(start: Vector3D, end: Vector3D, tolerance: Double, endBoundType: BoundType)`

Line segment in 3D defined by a start and end vector.

Parameters

Name Description
`start: Vector3D`

start of the line segment

`end: Vector3D`

end of the line segment

`tolerance: Double`

allowed tolerance

`endBoundType: BoundType`

## Methods

### distance

`fun distance(point: Vector3D): Double`

Returns the distance between this line segment and a given point. For more, see StackOverflow

Parameters

Name Description
`point: Vector3D`

point for which the distance shall be calculated

ReturnValue

Name Description
`Double`

distance between this and the point

### calculatePointLocalCSUnbounded

`protected fun calculatePointLocalCSUnbounded(curveRelativePoint: CurveRelativeVector1D): Result<Vector3D, IllegalArgumentException>`

Returns the point in the cartesian coordinate system that is located on this curve and given by a point in the curve relative coordinate system.

Parameters

Name Description
`curveRelativePoint: CurveRelativeVector1D`

point in curve relative coordinates

ReturnValue

Name Description
`Result<Vector3D, IllegalArgumentException>`

point in cartesian coordinates

### equals

`fun equals(other: Any?): Boolean`

Parameters

Name Description
`other: Any?`

ReturnValue

Name Description
`Boolean`

### hashCode

`fun hashCode(): Int`

ReturnValue

Name Description
`Int`

## CompanionObject

### LineSegment3D

`class LineSegment3D: AbstractCurve3D`

Line segment in 3D defined by a start and end vector.

### Methods

#### of

`fun of(start: Vector3D, end: Vector3D, tolerance: Double, endBoundType: BoundType): Result<LineSegment3D, IllegalArgumentException>`

Creates a LineSegment3D, if start and end are not fuzzily equal according to the tolerance.

Parameters

Name Description
`start: Vector3D`
`end: Vector3D`
`tolerance: Double`
`endBoundType: BoundType`

ReturnValue

Name Description
`Result<LineSegment3D, IllegalArgumentException>`