LinearSegment

References
public struct LinearSegment
Represents a line by origin and span vector.

Constructors

LinearSegment

#
Create a 2d spatial line from start and end coordinates.
public LinearSegment(
x0,
X of start.
y0,
Y of start.
x1,
X of end.
y1
Y of end.
)

LinearSegment

#
Create a spatial line from start and end coordinates.
public LinearSegment(
x0,
X of start.
y0,
Y of start.
z0,
Z of start.
x1,
X of end.
y1,
Y of end.
z1
Z of end.
)

LinearSegment

#
Create a new spatial line from a RhinoCommon line.
public LinearSegment(
line
Line.
)

LinearSegment

#
Create a new spatial line from an Eto line.
public LinearSegment(
line
)

LinearSegment

#
Create a new line.
public LinearSegment(
point0,
point1
)

Properties

Point

#
Gets the line start point.
public Locus Point { get; }

Span

#
Gets the line span vector.
public Locus Span { get; }

Tangent

#
Gets the line unit tangent vector.
public Locus Tangent { get; }

Methods

ClosestParameter

#
Get the parameter on the line closest to a point.
public double ClosestParameter(
point
Point to approach.
)
Parameter on line.

ClosestPoint

#
Project a point onto the line.
public Locus ClosestPoint(
point
Point.
)
Point on plane.

CrossingPoint

#
Find the parameter on the line at which it intersects a given slice.
public bool CrossingPoint(
slice,
Slice to intersect.
out double
t
Parameter on line.
)
True if line and slice intersect.

CrossingPoint

#
Find the crossing points for two lines. The crossing point is where they approach each other the closest.
public bool CrossingPoint(
line,
Line to cross.
out double
t0,
Parameter of crossing on this line.
out double
t1
Parameter of crossing on other line.
)
True if lines cross, false if not.

DistanceTo

#
Gets the distance to a line.
public double DistanceTo(
line
Line.
)
Distance to line.

DistanceTo

#
Gets the distance to a point.
public double DistanceTo(
point
Point.
)
Distance to point.

Evaluate

#
Evaluate this line a given parameter.
public Locus Evaluate(
t
Parameter to evaluate.
)
Point on line at parameter.

QuadranceTo

#
Gets the quadrance to a line.
public double QuadranceTo(
line
Line.
)
Quadrance to line.

QuadranceTo

#
Gets the quadrance to a point.
public double QuadranceTo(
point
Point.
)
Quadrance to point.

To2D

#
Flatten this line by removing all z data.
public LinearSegment To2D()