|
Name
|
Description
|
|
ClosestPoint(Point2d)
|
Computes a new point which resides on this line as a segment, which is as close as possible to a given point.
|
|
ClosestPointInfinite(Point2d)
|
Computes a new point which resides on this line as if it was infinite, which is as close as possible to a given point.
|
|
CreateFromArc(Arc2d)
|
Creates a new line that has start and end points that equals a given arc.
|
|
Direction()
|
The line direction as a Vector2d.
|
|
Distance(Point2d)
|
Computes the distance from a point to this line as a segment.
|
|
DistanceInfinite(Point2d)
|
Computes the distance from a point to the line in a way assuming the line is infinite.
|
|
Eval(double)
|
Computes a new point which is on this infinite line given a parameter in range 0-1. Smaller parameters
than 0.0 or larger parameters than 1.0 works as well, and returns points out of the line segment.
|
|
Eval(double, out double)
|
Computes a new point which is on this infinite line given a parameter in range 0-1. Smaller parameters
than 0.0 or larger parameters than 1.0 works as well, and returns points out of the line segment.
A tangent angle at the parameter is computed as well (which in this case is same as lines angle)
|
|
FindLinearLeastSquaresFit(List<Point2d>, double, double)
|
Computes a least squares fit line of a list of points, starting at x0 and ending at x1.
The error minimized is the y-diff to line only (not real distance to line).
|
|
FindLinearLeastSquaresFitOrigo(List<Point2d>, double, double)
|
Computes a least squares fit line, starting at x0 and ending at x1, and passing throught 0,0.
The error minimized is the y-diff to line only (not real distance to line).
|
|
GetX(double)
|
Calculates the X value given Y. The line is considered infinite.
|
|
GetY(double)
|
Calculates the Y value given X. The line is considered infinite.
|
|
IsHorizontal()
|
Checks if the line is horizontal with epsilon tolerance.
|
|
IsHorizontal(double)
|
Checks if the line is horizontal with a given tolerance.
|
|
IsVertical()
|
Checks if the line is vertical with epsilon tolerance.
|
|
IsVertical(double)
|
Checks if the line is vertical with a given tolerance.
|
|
Mirror(Point2d, Point2d)
|
Mirrors the line in-place over a reflection line.
|
|
Offset(double)
|
Returns a new offsetted line. Positive offset offsetts to the right of the segment,
and negative to the left.
|
|
Offset(double, double)
|
Same as offset but you can set start offset and end offset individually
|
|
Param(Point2d)
|
Computes the parameter in the range 0-1 where the projection of a given point resides on the line segment.
If the parameter is less than 0 or larger than 1 the point lies 'before' or 'after' the line.
|
|
Param(Point2d, out double)
|
Computes the parameter in the range 0-1 where the projection of a given point resides on the line segment.
If the parameter is less than 0 or larger than 1 the point lies 'before' or 'after' the line.
A tangent angle at the point is computed as well (which in this case is same as lines angle)
|
|
ProjectHorizontal(double, out double)
|
Computes the x position on a line for a given y. If the line is horizontal, x parameter is not changed,
and the function returns false.
|
|
ProjectVertical(double, ref double)
|
Computes the y position on a line for a given x. If the line is vertical, y parameter is not changed,
and the function returns false.
|
|
Reverse()
|
Reverses the line in-place.
|
|
Rotate(double)
|
Rotates the line in-place around world origo with a given angle in radians.
|
|
Rotate(double, Point2d)
|
Rotates the line in-place around a given origo and a given angle in radians.
|
|
Scale(double)
|
Scales this line in-place with a given factor. Factors larger then 1 gives a longer line and smaller than 1 gives a shorter.
|
|
Scale(double, Point2d)
|
Scales this line in-place with a given factor and a specified origo. Factors larger then 1 gives a longer line and smaller than 1 gives a shorter.
|
|
Side(Point2d, double)
|
Checks the relative side of a point to this line. A tolerance decides how close the
point can be to the line to be considered to be 'on' the line.
|
|
Split(IEnumerable<Double>)
|
Splits this line segment to multiple line segemnt using a list of parameters in the range 0-1.
The list of parameters does _not_ need to be sorted. Multiple parameters that are the same
will output zero length line segments.
|
|
Split(params double[])
|
Splits this line segment to multiple line segemnt using a list of parameters in the range 0-1.
The list of parameters does _not_ need to be sorted. Multiple parameters that are the same
will output zero length line segments.
|
|
Split(double, out Line2d, out Line2d)
|
Splits the line segment at a given parameter in the range 0-1. If the parameter is less than zero or larger than 1,
one of the lines will have zero length.
|
|
ToRegion(double)
|
Creates a new region that has the same geometry as this line. A tolerance can be given but is not used in this case.
|
|
ToString()
|
Returns a new string containig debug purpose info.
|
|
Transform(Matrix2d)
|
Transforms this line in-place with a matrix.
|
|
Translate(double, double)
|
Translates the line in place.
|
|
WriteAutoCADScript(StreamWriter, int)
|
Writes the object as an AutoCAD loadable script to a stream using
a specified color
|