Header menu logo Rhino.Scripting.Fsharp

AutoOpenLine Module

When Rhino.Scripting.FSharp is opened this module will be auto-opened. It only contains extension members for type Line.

Type extensions

Type extension Description

this.AsString

Full Usage: this.AsString

Parameters:
    () : unit

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()

Extended Type: Line

() : unit
Returns: string

this.ClosestParameter

Full Usage: this.ClosestParameter

Parameters:
Returns: float
Modifiers: inline

Returns the parameter at which a point is closest to the (finite) line. The result is between 0.0 and 1.0. Does not fails on very short curves.

Extended Type: Line

p : Point3d
Returns: float

this.ClosestParameterInfinite

Full Usage: this.ClosestParameterInfinite

Parameters:
Returns: float
Modifiers: inline

Assumes Line to be infinite. Returns the parameter at which a point is closest to the infinite line. If it is smaller than 0.0 or bigger than 1.0 it is outside of the finite line. Fails on curves shorter than 1e-9 units. (ln.ClosestParameter does not)

Extended Type: Line

p : Point3d
Returns: float

this.ClosestPoint

Full Usage: this.ClosestPoint

Parameters:
Returns: Point3d
Modifiers: inline

Returns closest point on (finite) line. Does not fails on very short curves.

Extended Type: Line

p : Point3d
Returns: Point3d

this.ClosestPointInfinite

Full Usage: this.ClosestPointInfinite

Parameters:
Returns: Point3d
Modifiers: inline

Assumes Line to be infinite. Returns closest point on infinite line. Fails on curves shorter than 1e-9 units. (ln.ClosestPoint does not.)

Extended Type: Line

p : Point3d
Returns: Point3d

this.Direction

Full Usage: this.Direction

Parameters:
    () : unit

Returns: Vector3d
Modifiers: inline

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

Extended Type: Line

() : unit
Returns: Vector3d

this.DistanceSqToPnt

Full Usage: this.DistanceSqToPnt

Parameters:
Returns: float
Modifiers: inline

Returns square distance from point to finite line.

Extended Type: Line

p : Point3d
Returns: float

this.DistanceSqToPntInfinite

Full Usage: this.DistanceSqToPntInfinite

Parameters:
Returns: float

Assumes Line to be infinite. Returns square distance from point to infinite line. Fails on curves shorter than 1e-6 units. (ln.DistanceSqToPnt does not.)

Extended Type: Line

p : Point3d
Returns: float

this.DistanceToPnt

Full Usage: this.DistanceToPnt

Parameters:
Returns: float
Modifiers: inline

Returns distance from point to (finite) line.

Extended Type: Line

p : Point3d
Returns: float

this.DistanceToPntInfinite

Full Usage: this.DistanceToPntInfinite

Parameters:
Returns: float
Modifiers: inline

Assumes Line to be infinite. Returns distance from point to infinite line. Fails on curves shorter than 1e-9 units. (ln.DistanceToPnt does not.)

Extended Type: Line

p : Point3d
Returns: float

this.EvaluateAt

Full Usage: this.EvaluateAt

Parameters:
    p : float

Returns: Point3d
Modifiers: inline

Evaluate 3D line at a given parameter. Parameters 0.0 to 1.0 are on the line.

Extended Type: Line

p : float
Returns: Point3d

this.Extend

Full Usage: this.Extend

Parameters:
    distAtStart : float
    distAtEnd : float

Returns: Line
Modifiers: inline

Extend 3D line by absolute amount at start and end. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

distAtStart : float
distAtEnd : float
Returns: Line

this.ExtendEnd

Full Usage: this.ExtendEnd

Parameters:
    distAtEnd : float

Returns: Line
Modifiers: inline

Extend 3D line by absolute amount at end. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

distAtEnd : float
Returns: Line

this.ExtendEndRel

Full Usage: this.ExtendEndRel

Parameters:
    relAtEnd : float

Returns: Line
Modifiers: inline

Extend 3D line by relative amount at end. A relative amount of 0.5 extends the line by half its length. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

relAtEnd : float
Returns: Line

this.ExtendRel

Full Usage: this.ExtendRel

Parameters:
    relAtStart : float
    relAtEnd : float

Returns: Line
Modifiers: inline

Extend 3D line by relative amount at start and end. A relative amount of 0.5 extends the line by half its length on each side. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

relAtStart : float
relAtEnd : float
Returns: Line

this.ExtendStart

Full Usage: this.ExtendStart

Parameters:
    distAtStart : float

Returns: Line
Modifiers: inline

Extend 3D line by absolute amount at start. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

distAtStart : float
Returns: Line

this.ExtendStartRel

Full Usage: this.ExtendStartRel

Parameters:
    relAtStart : float

Returns: Line
Modifiers: inline

Extend 3D line by relative amount at start. A relative amount of 0.5 extends the line by half its length. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

relAtStart : float
Returns: Line

this.IsCoincidentTo

Full Usage: this.IsCoincidentTo

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D lines are coincident within the distance tolerance. 1e-6 by default. This means that lines are parallel within the angle tolerance. and the distance of second start to the first line is less than the distance tolerance. Also returns false on lines shorter than zeroLengthTolerance (1e-12). The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minium cosine value. See Rhino.Scripting.FSharp.Cosine module.

Extended Type: Line

other : Line
distanceTolerance : float
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool

this.IsHorizontal

Full Usage: this.IsHorizontal

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if 3D line is horizontal. The absolute deviation tolerance along Z axis is 1e-9. Fails on lines shorter than 1e-6.

Extended Type: Line

() : unit
Returns: bool

this.IsParallelAndOrientedTo

Full Usage: this.IsParallelAndOrientedTo

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D lines are parallel. Takes the line orientation into account too. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minium cosine value. See Rhino.Scripting.FSharp.Cosine module. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

other : Line
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool

this.IsParallelAndOrientedTo

Full Usage: this.IsParallelAndOrientedTo

Parameters:
Returns: bool
Modifiers: inline

Checks if a 3D lines is parallel to a 3D vector. Takes the line orientation into account too. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minium cosine value. See Rhino.Scripting.FSharp.Cosine module. Fails on lines or vectors shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

other : Vector3d
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool

this.IsParallelTo

Full Usage: this.IsParallelTo

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D lines are parallel. Ignores the line orientation. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minium cosine value. See Rhino.Scripting.FSharp.Cosine module. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

other : Line
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool

this.IsParallelTo

Full Usage: this.IsParallelTo

Parameters:
Returns: bool
Modifiers: inline

Checks if a 3D lines is parallel to a 3D vector. Ignores the line orientation. The default angle tolerance is 0.25 degrees. This tolerance can be customized by an optional minium cosine value. See Rhino.Scripting.FSharp.Cosine module. Fails on lines or vectors shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

other : Vector3d
minCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool

this.IsPerpendicularTo

Full Usage: this.IsPerpendicularTo

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D lines are perpendicular to each other. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional minium cosine value. The default cosine is 0.0043633 ( = 89.75 deg) See Rhino.Scripting.FSharp.Cosine module. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

other : Line
maxCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool

this.IsPerpendicularTo

Full Usage: this.IsPerpendicularTo

Parameters:
Returns: bool
Modifiers: inline

Checks if a 3D lines is perpendicular to a 3D vector. The default angle tolerance is 89.75 to 90.25 degrees. This tolerance can be customized by an optional minium cosine value. The default cosine is 0.0043633 ( = 89.75 deg) See Rhino.Scripting.FSharp.Cosine module. Fails on lines or vectors shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

other : Vector3d
maxCosine : float<MeasureProduct<cosine, MeasureOne>>
Returns: bool

this.IsTiny

Full Usage: this.IsTiny

Parameters:
    tol : float

Returns: bool
Modifiers: inline
 Check if 3D line is shorter than tolerance.
  Or contains a NaN value

Extended Type: Line

tol : float
Returns: bool

this.IsTinySq

Full Usage: this.IsTinySq

Parameters:
    tol : float

Returns: bool
Modifiers: inline
 Check if 3D line is shorter than the squared tolerance.
  Or contains a NaN value

Extended Type: Line

tol : float
Returns: bool

this.IsVertical

Full Usage: this.IsVertical

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if 3D line is parallel to the world Z axis. Ignoring orientation. The absolute deviation tolerance along X and Y axis is 1e-9. Fails on lines shorter than 1e-6. Same as ln.IsZAligned

Extended Type: Line

() : unit
Returns: bool

this.IsXAligned

Full Usage: this.IsXAligned

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if line is parallel to the world X axis. Ignoring orientation. The absolute deviation tolerance along Y and Z axis is 1e-9. Fails on lines shorter than 1e-6.

Extended Type: Line

() : unit
Returns: bool

this.IsYAligned

Full Usage: this.IsYAligned

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if 3D line is parallel to the world Y axis. Ignoring orientation. The absolute deviation tolerance along X and Z axis is 1e-9. Fails on lines shorter than 1e-6.

Extended Type: Line

() : unit
Returns: bool

this.IsZAligned

Full Usage: this.IsZAligned

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Checks if 3D line is parallel to the world Z axis. Ignoring orientation. The absolute deviation tolerance along X and Y axis is 1e-9. Fails on lines shorter than 1e-6. Same as ln.IsVertical

Extended Type: Line

() : unit
Returns: bool

this.IsZeroLength

Full Usage: this.IsZeroLength

Parameters:
    () : unit

Returns: bool
Modifiers: inline

Check if the 3D line has exactly the same starting and ending point.

Extended Type: Line

() : unit
Returns: bool

this.Length

Full Usage: this.Length

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the length of the line.

Extended Type: Line

() : unit
Returns: float

this.LengthFromParam

Full Usage: this.LengthFromParam

Parameters:
    t : float

Returns: float
Modifiers: inline

Returns the length of the line segment from the given parameter till the line End. This length is negative if the parameter is bigger than 1.0.

Extended Type: Line

t : float
Returns: float

this.LengthSq

Full Usage: this.LengthSq

Parameters:
    () : unit

Returns: float
Modifiers: inline

Returns the square length of the line.

Extended Type: Line

() : unit
Returns: float

this.LengthTillParam

Full Usage: this.LengthTillParam

Parameters:
    p : float

Returns: float
Modifiers: inline

Returns the length of the line segment from the start point to the given parameter. This length is negative if the parameter is negative.

Extended Type: Line

p : float
Returns: float

this.MatchesOrientation180

Full Usage: this.MatchesOrientation180

Parameters:
Returns: bool
Modifiers: inline

Checks if the angle between the two 3D lines is less than 180 degrees. Calculates the dot product of two 3D lines. Then checks if it is bigger than 1e-12.

Extended Type: Line

otherLn : Line
Returns: bool

this.MatchesOrientation180

Full Usage: this.MatchesOrientation180

Parameters:
Returns: bool
Modifiers: inline

Checks if the angle between the a 3D line and a 3D vector is less than 180 degrees. Calculates the dot product of both. Then checks if it is bigger than 1e-12.

Extended Type: Line

v : Vector3d
Returns: bool

this.MatchesOrientation90

Full Usage: this.MatchesOrientation90

Parameters:
Returns: bool
Modifiers: inline

Checks if the angle between the two 3D lines is less than 90 degrees. Calculates the dot product of the unit-vectors of the two 3D lines. Then checks if it is bigger than 0.707107 (cosine of 90 degrees).

Extended Type: Line

otherLn : Line
Returns: bool

this.Mid

Full Usage: this.Mid

Parameters:
    () : unit

Returns: Point3d
Modifiers: inline

Returns the midpoint of the 3D line,

Extended Type: Line

() : unit
Returns: Point3d

this.Move

Full Usage: this.Move

Parameters:
Returns: Line
Modifiers: inline

Returns a Line moved by a vector.

Extended Type: Line

v : Vector3d
Returns: Line

this.MoveX

Full Usage: this.MoveX

Parameters:
    distance : float

Returns: Line
Modifiers: inline

Returns a Line moved by a given distance in X direction.

Extended Type: Line

distance : float
Returns: Line

this.MoveY

Full Usage: this.MoveY

Parameters:
    distance : float

Returns: Line
Modifiers: inline

Returns a Line moved by a given distance in Y direction.

Extended Type: Line

distance : float
Returns: Line

this.MoveZ

Full Usage: this.MoveZ

Parameters:
    distance : float

Returns: Line
Modifiers: inline

Returns a Line moved by a given distance in Z direction.

Extended Type: Line

distance : float
Returns: Line

this.Reversed

Full Usage: this.Reversed

Parameters:
    () : unit

Returns: Line
Modifiers: inline

Returns the 3D line reversed.

Extended Type: Line

() : unit
Returns: Line

this.Segment

Full Usage: this.Segment

Parameters:
    a : float
    b : float

Returns: Line
Modifiers: inline

Returns a Line from point at Parameter a to point at Parameter b.

Extended Type: Line

a : float
b : float
Returns: Line

this.Shrink

Full Usage: this.Shrink

Parameters:
    distAtStart : float
    distAtEnd : float

Returns: Line
Modifiers: inline

Shrink 3D line by absolute amount at start and end. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

distAtStart : float
distAtEnd : float
Returns: Line

this.ShrinkEnd

Full Usage: this.ShrinkEnd

Parameters:
    distAtEnd : float

Returns: Line
Modifiers: inline

Shrink 3D line by absolute amount at end. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

distAtEnd : float
Returns: Line

this.ShrinkStart

Full Usage: this.ShrinkStart

Parameters:
    distAtStart : float

Returns: Line
Modifiers: inline

Shrink 3D line by absolute amount at start. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

distAtStart : float
Returns: Line

this.SubLine

Full Usage: this.SubLine

Parameters:
    start : float
    ende : float

Returns: Line
Modifiers: inline

Evaluate line at a given parameters (parameters 0.0 to 1.0 are on the line), Return a new line from evaluated points.

Extended Type: Line

start : float
ende : float
Returns: Line

this.Tangent

Full Usage: this.Tangent

Parameters:
    () : unit

Returns: Vector3d
Modifiers: inline

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

Extended Type: Line

() : unit
Returns: Vector3d

this.UnitTangent

Full Usage: this.UnitTangent

Parameters:
    () : unit

Returns: Vector3d
Modifiers: inline

Returns a unit-vector of the line Direction.

Extended Type: Line

() : unit
Returns: Vector3d

this.Vector

Full Usage: this.Vector

Parameters:
    () : unit

Returns: Vector3d
Modifiers: inline

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

Extended Type: Line

() : unit
Returns: Vector3d

Line.areCoincident a b

Full Usage: Line.areCoincident a b

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D lines are coincident within tolerance. This means that lines are parallel within 0.25 degrees. and the distance of second start point to the first line is less than 1e-6.

Extended Type: Line

a : Line
b : Line
Returns: bool

Line.areParallel l ln

Full Usage: Line.areParallel l ln

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D lines are parallel. Ignoring orientation. Calculates the cross product of the two line vectors. (= the area of the parallelogram) And checks if it is smaller than 1e-9 (NOTE: for very long lines a higher tolerance might be needed)

Extended Type: Line

l : Line
ln : Line
Returns: bool

Line.areParallelAndMatchOrientation l ln

Full Usage: Line.areParallelAndMatchOrientation l ln

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D lines are parallel and orientated the same way. Calculates the cross product of the two line vectors. (= the area of the parallelogram) And checks if it is smaller than 1e-9 Then calculates the dot product and checks if it is positive. (NOTE: for very long lines a higher tolerance might be needed)

Extended Type: Line

l : Line
ln : Line
Returns: bool

Line.arePerpendicular l ln

Full Usage: Line.arePerpendicular l ln

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D lines are perpendicular. Calculates the dot product and checks if it is smaller than 1e-9. (NOTE: for very long lines a higher tolerance might be needed)

Extended Type: Line

l : Line
ln : Line
Returns: bool

Line.closestParameter p ln

Full Usage: Line.closestParameter p ln

Parameters:
Returns: float
Modifiers: inline

Returns the parameter at which a point is closest to the (finite) line. The result is between 0.0 and 1.0.

Extended Type: Line

p : Point3d
ln : Line
Returns: float

Line.closestParameterInfinite p ln

Full Usage: Line.closestParameterInfinite p ln

Parameters:
Returns: float
Modifiers: inline

Assumes Line to be infinite. Returns the parameter at which a point is closest to the infinite line. If it is smaller than 0.0 or bigger than 1.0 it is outside of the finite line.

Extended Type: Line

p : Point3d
ln : Line
Returns: float

Line.closestPoint p ln

Full Usage: Line.closestPoint p ln

Parameters:
Returns: Point3d
Modifiers: inline

Returns closest point on (finite) line.

Extended Type: Line

p : Point3d
ln : Line
Returns: Point3d

Line.closestPointInfinite p ln

Full Usage: Line.closestPointInfinite p ln

Parameters:
Returns: Point3d
Modifiers: inline

Assumes Line to be infinite. Returns closest point on infinite line.

Extended Type: Line

p : Point3d
ln : Line
Returns: Point3d

Line.createFromPntAndVec (p, v)

Full Usage: Line.createFromPntAndVec (p, v)

Parameters:
Returns: Line
Modifiers: inline

Creates a line starting at given point and going to along the given vector.

Extended Type: Line

p : Point3d
v : Vector3d
Returns: Line

Line.createFromVec v

Full Usage: Line.createFromVec v

Parameters:
Returns: Line
Modifiers: inline

Creates a line starting at World Origin and going to along the given vector.

Extended Type: Line

v : Vector3d
Returns: Line

Line.direction ln

Full Usage: Line.direction ln

Parameters:
Returns: Vector3d
Modifiers: inline

Same as Line.vector or Line.tangent. The returned vector has the same length as the Line.

Extended Type: Line

ln : Line
Returns: Vector3d

Line.distanceSqToPnt p ln

Full Usage: Line.distanceSqToPnt p ln

Parameters:
Returns: float
Modifiers: inline

Returns the square distance from point to (finite) line.

Extended Type: Line

p : Point3d
ln : Line
Returns: float

Line.distanceSqToPntInfinite p ln

Full Usage: Line.distanceSqToPntInfinite p ln

Parameters:
Returns: float
Modifiers: inline

Assumes Line to be infinite. Returns the square distance from point to infinite line.

Extended Type: Line

p : Point3d
ln : Line
Returns: float

Line.distanceToLine lnA lnB

Full Usage: Line.distanceToLine lnA lnB

Parameters:
Returns: float

Returns the distance between two Infinite Lines. At the point where they are closest to each other. works even if lines are parallel.

Extended Type: Line

lnA : Line
lnB : Line
Returns: float

Line.distanceToPnt p ln

Full Usage: Line.distanceToPnt p ln

Parameters:
Returns: float
Modifiers: inline

Returns distance from point to (finite) line.

Extended Type: Line

p : Point3d
ln : Line
Returns: float

Line.distanceToPntInfinite p ln

Full Usage: Line.distanceToPntInfinite p ln

Parameters:
Returns: float
Modifiers: inline

Assumes Line to be infinite. Returns distance from point to infinite line.

Extended Type: Line

p : Point3d
ln : Line
Returns: float

Line.divide segments ln

Full Usage: Line.divide segments ln

Parameters:
    segments : int
    ln : Line

Returns: Point3d[]

Divides a 3D line into given amount of segments. Returns an array of 3D points of length: segment count + 1. Includes start and endpoint of line.

Extended Type: Line

segments : int
ln : Line
Returns: Point3d[]

Line.divideEvery dist l

Full Usage: Line.divideEvery dist l

Parameters:
    dist : float
    l : Line

Returns: ResizeArray<Point3d>

Divides a 2D line into segments of given length. Includes start and end point Adds end point only if there is a remainder bigger than 1% of the segment length.

Extended Type: Line

dist : float
l : Line
Returns: ResizeArray<Point3d>

Line.divideInsideEvery dist l

Full Usage: Line.divideInsideEvery dist l

Parameters:
    dist : float
    l : Line

Returns: ResizeArray<Point3d>

Divides a 2D line into segments of given length. Excludes start and end point Adds last div point before end only if there is a remainder bigger than 1% of the segment length.

Extended Type: Line

dist : float
l : Line
Returns: ResizeArray<Point3d>

Line.divideMaxLength maxSegmentLength ln

Full Usage: Line.divideMaxLength maxSegmentLength ln

Parameters:
    maxSegmentLength : float
    ln : Line

Returns: Point3d[]

Divides a 3D line into as few as segments as possible respecting the maximum segment length. Returned Array includes start and endpoint of line. The input maxSegmentLength is multiplied by factor 0.999999 of to avoid numerical errors. That means in an edge case there are fewer segments returned, not more.

Extended Type: Line

maxSegmentLength : float
ln : Line
Returns: Point3d[]

Line.divideMinLength minSegmentLength ln

Full Usage: Line.divideMinLength minSegmentLength ln

Parameters:
    minSegmentLength : float
    ln : Line

Returns: Point3d[]

Divides a 3D line into as many as segments as possible respecting the minimum segment length. Returned Array includes start and endpoint of line. The input minSegmentLength is multiplied by factor 1.000001 of to avoid numerical errors. That means in an edge case there are more segments returned, not fewer.

Extended Type: Line

minSegmentLength : float
ln : Line
Returns: Point3d[]

Line.doIntersectFinite lnA lnB

Full Usage: Line.doIntersectFinite lnA lnB

Parameters:
Returns: bool

Checks if two Finite lines intersect. Also returns true for skew lines if the virtual Intersection Point's Domain is between 0.0 and 1.0 for both Lines

Extended Type: Line

lnA : Line
lnB : Line
Returns: bool

Line.ende l

Full Usage: Line.ende l

Parameters:
Returns: Point3d
Modifiers: inline

Returns the End point of the line. Same as Line.to'

Extended Type: Line

l : Line
Returns: Point3d

Line.equals tol a b

Full Usage: Line.equals tol a b

Parameters:
Returns: bool
Modifiers: inline

Checks if two 3D Lines are equal within tolerance. Identical Lines in opposite directions are not considered equal. Use a tolerance of 0.0 to check for an exact match.

Extended Type: Line

tol : float
a : Line
b : Line
Returns: bool

Line.evaluateAt t ln

Full Usage: Line.evaluateAt t ln

Parameters:
    t : float
    ln : Line

Returns: Point3d
Modifiers: inline

Evaluate line at a given parameter (parameters 0.0 to 1.0 are on the line)

Extended Type: Line

t : float
ln : Line
Returns: Point3d

Line.extend distAtStart distAtEnd ln

Full Usage: Line.extend distAtStart distAtEnd ln

Parameters:
    distAtStart : float
    distAtEnd : float
    ln : Line

Returns: bool
Modifiers: inline

Extend 3D line by absolute amount at start and end. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

distAtStart : float
distAtEnd : float
ln : Line
Returns: bool

Line.extendEnd distAtEnd ln

Full Usage: Line.extendEnd distAtEnd ln

Parameters:
    distAtEnd : float
    ln : Line

Returns: Line
Modifiers: inline

Extend 3D line by absolute amount at end. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

distAtEnd : float
ln : Line
Returns: Line

Line.extendEndRel relAtEnd ln

Full Usage: Line.extendEndRel relAtEnd ln

Parameters:
    relAtEnd : float
    ln : Line

Returns: Line
Modifiers: inline

Extend 3D line by relative amount at end. A relative amount of 0.5 extends the line by half its length. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

relAtEnd : float
ln : Line
Returns: Line

Line.extendRel relAtStart relAtEnd ln

Full Usage: Line.extendRel relAtStart relAtEnd ln

Parameters:
    relAtStart : float
    relAtEnd : float
    ln : Line

Returns: Line
Modifiers: inline

Extend 3D line by relative amount at start and end. A relative amount of 0.5 extends the line by half its length on each side. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

relAtStart : float
relAtEnd : float
ln : Line
Returns: Line

Line.extendStart distAtStart ln

Full Usage: Line.extendStart distAtStart ln

Parameters:
    distAtStart : float
    ln : Line

Returns: Line
Modifiers: inline

Extend 3D line by absolute amount at start. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

distAtStart : float
ln : Line
Returns: Line

Line.extendStartRel relAtStart ln

Full Usage: Line.extendStartRel relAtStart ln

Parameters:
    relAtStart : float
    ln : Line

Returns: Line
Modifiers: inline

Extend 3D line by relative amount at start. A relative amount of 0.5 extends the line by half its length. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

relAtStart : float
ln : Line
Returns: Line

Line.flip ln

Full Usage: Line.flip ln

Parameters:
Returns: Line
Modifiers: inline

Reverse or flip the 3D line (same as Line.reverse)

Extended Type: Line

ln : Line
Returns: Line

Line.from l

Full Usage: Line.from l

Parameters:
Returns: Point3d
Modifiers: inline

Returns the Start point of the line. Same as Line.start.

Extended Type: Line

l : Line
Returns: Point3d

Line.fromX l

Full Usage: Line.fromX l

Parameters:
Returns: float
Modifiers: inline

Returns the Start point's X coordinate of the line.

Extended Type: Line

l : Line
Returns: float

Line.fromY l

Full Usage: Line.fromY l

Parameters:
Returns: float
Modifiers: inline

Returns the Start point's Y coordinate of the line.

Extended Type: Line

l : Line
Returns: float

Line.fromZ l

Full Usage: Line.fromZ l

Parameters:
Returns: float
Modifiers: inline

Returns the Start point's Z coordinate of the line.

Extended Type: Line

l : Line
Returns: float

Line.intersectFinite lnA lnB

Full Usage: Line.intersectFinite lnA lnB

Parameters:
Returns: Point3d[]
 Finds intersection of two Finite Lines.
 Returns:
    an empty array if they are parallel,
    an array with one point if they intersect by RhinoScriptSyntax.Doc.ModelAbsoluteTolerance (Point will be the average of the two points within the tolerance)
    an array with two points where they are the closest to each other. In same order as input. They might be skew or they might intersect only when infinite.
 Fails if lines are parallel.
 Considers Lines finite

Extended Type: Line

lnA : Line
lnB : Line
Returns: Point3d[]

Line.intersectInOnePoint lnA lnB

Full Usage: Line.intersectInOnePoint lnA lnB

Parameters:
Returns: Point3d

Finds intersection of two Infinite Lines. Fails if lines are parallel or skew by more than 1e-6 units Considers Lines Infinite Returns point on lnB (the last parameter)

Extended Type: Line

lnA : Line
lnB : Line
Returns: Point3d

Line.intersectSkew lnA lnB

Full Usage: Line.intersectSkew lnA lnB

Parameters:
Returns: Point3d * Point3d

Finds intersection of two Infinite Lines. Returns a point for each line where they are the closest to each other. (in same order as input) Fails if lines are parallel. Considers Lines infinite

Extended Type: Line

lnA : Line
lnB : Line
Returns: Point3d * Point3d

Line.isHorizontal l

Full Usage: Line.isHorizontal l

Parameters:
Returns: bool
Modifiers: inline

Checks if 3D line is horizontal (Z component is almost zero). Tolerance is 1e-6. Fails on lines shorter than 1e-6.

Extended Type: Line

l : Line
Returns: bool

Line.isTiny tol l

Full Usage: Line.isTiny tol l

Parameters:
    tol : float
    l : Line

Returns: bool
Modifiers: inline

Check if line is shorter than tolerance. Also checks if any component is a NaN.

Extended Type: Line

tol : float
l : Line
Returns: bool

Line.isTinySq tol l

Full Usage: Line.isTinySq tol l

Parameters:
    tol : float
    l : Line

Returns: bool
Modifiers: inline

Check if the lines square length is shorter than squared tolerance. Also checks if any component is a NaN.

Extended Type: Line

tol : float
l : Line
Returns: bool

Line.isVertical l

Full Usage: Line.isVertical l

Parameters:
Returns: bool
Modifiers: inline

Checks if 3D line is parallel to the world Z axis. Ignoring orientation. Tolerance is 1e-6. Fails on lines shorter than 1e-6. Same as ln.IsZAligned

Extended Type: Line

l : Line
Returns: bool

Line.isXAligned l

Full Usage: Line.isXAligned l

Parameters:
Returns: bool
Modifiers: inline

Checks if 3D line is parallel to the world X axis. Ignoring orientation. Tolerance is 1e-6. Fails on lines shorter than 1e-6.

Extended Type: Line

l : Line
Returns: bool

Line.isYAligned l

Full Usage: Line.isYAligned l

Parameters:
Returns: bool
Modifiers: inline

Checks if 3D line is parallel to the world Y axis. Ignoring orientation. Tolerance is 1e-6. Fails on lines shorter than 1e-6.

Extended Type: Line

l : Line
Returns: bool

Line.isZAligned l

Full Usage: Line.isZAligned l

Parameters:
Returns: bool
Modifiers: inline

Checks if 3D line is parallel to the world Z axis. Ignoring orientation. Tolerance is 1e-6. Fails on lines shorter than 1e-6. Same as ln.IsVertical

Extended Type: Line

l : Line
Returns: bool

Line.isZeroLength l

Full Usage: Line.isZeroLength l

Parameters:
Returns: bool
Modifiers: inline

Check if the line has same starting and ending point.

Extended Type: Line

l : Line
Returns: bool

Line.length l

Full Usage: Line.length l

Parameters:
Returns: float
Modifiers: inline

Returns the length of the line.

Extended Type: Line

l : Line
Returns: float

Line.lengthSq l

Full Usage: Line.lengthSq l

Parameters:
Returns: float
Modifiers: inline

Returns the square length of the line.

Extended Type: Line

l : Line
Returns: float

Line.lengthToPtOnLine ln pt

Full Usage: Line.lengthToPtOnLine ln pt

Parameters:
Returns: float
Modifiers: inline

Get distance from start of line to point projected onto line, may be negative. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

ln : Line
pt : Point3d
Returns: float

Line.matchOrientation orientationToMatch lineToFlip

Full Usage: Line.matchOrientation orientationToMatch lineToFlip

Parameters:
    orientationToMatch : Line
    lineToFlip : Line

Returns: Line
Modifiers: inline

Ensure 3D line has a positive dot product with given orientation line.

Extended Type: Line

orientationToMatch : Line
lineToFlip : Line
Returns: Line

Line.matchVecOrientation orientationToMatch lineToFlip

Full Usage: Line.matchVecOrientation orientationToMatch lineToFlip

Parameters:
Returns: Line
Modifiers: inline

Ensure 3D line has a positive dot product with given 3D vector.

Extended Type: Line

orientationToMatch : Vector3d
lineToFlip : Line
Returns: Line

Line.matchesOrientation180 l ln

Full Usage: Line.matchesOrientation180 l ln

Parameters:
Returns: bool
Modifiers: inline

Checks if the angle between the two 3D lines is less than 180 degrees. Calculates the dot product of two 3D lines. Then checks if it is positive.

Extended Type: Line

l : Line
ln : Line
Returns: bool

Line.matchesOrientation90 l ln

Full Usage: Line.matchesOrientation90 l ln

Parameters:
Returns: bool
Modifiers: inline

Checks if the angle between the two 3D lines is less than 90 degrees. Calculates the dot product of the unit-vectors of the two 3D lines. Then checks if it is bigger than 0.707107 (cosine of 90 degrees).

Extended Type: Line

l : Line
ln : Line
Returns: bool

Line.mid ln

Full Usage: Line.mid ln

Parameters:
Returns: Point3d
Modifiers: inline

Get point at center of line.

Extended Type: Line

ln : Line
Returns: Point3d

Line.move v ln

Full Usage: Line.move v ln

Parameters:
Returns: Line
Modifiers: inline

Move a 3D line by a vector. (same as Line.translate)

Extended Type: Line

v : Vector3d
ln : Line
Returns: Line

Line.moveX distance ln

Full Usage: Line.moveX distance ln

Parameters:
    distance : float
    ln : Line

Returns: Line
Modifiers: inline

Returns a 3D line moved by a given distance in X direction.

Extended Type: Line

distance : float
ln : Line
Returns: Line

Line.moveY distance ln

Full Usage: Line.moveY distance ln

Parameters:
    distance : double
    ln : Line

Returns: Line
Modifiers: inline

Returns a 3D line moved by a given distance in Y direction.

Extended Type: Line

distance : double
ln : Line
Returns: Line

Line.moveZ distance ln

Full Usage: Line.moveZ distance ln

Parameters:
    distance : double
    ln : Line

Returns: Line
Modifiers: inline

Returns a 3D line moved by a given distance in Z direction.

Extended Type: Line

distance : double
ln : Line
Returns: Line

Line.offsetXY amount ln

Full Usage: Line.offsetXY amount ln

Parameters:
    amount : float
    ln : Line

Returns: Line

Offset line parallel to XY-Plane to left side in line direction. Z values are not changed. Fails on vertical lines or lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

amount : float
ln : Line
Returns: Line

Line.pointAtDistance dist ln

Full Usage: Line.pointAtDistance dist ln

Parameters:
    dist : float
    ln : Line

Returns: Point3d
Modifiers: inline

Finds point at given distance from line start. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

dist : float
ln : Line
Returns: Point3d

Line.reverse ln

Full Usage: Line.reverse ln

Parameters:
Returns: Line
Modifiers: inline

Reverse or flip the 3D line (same as Line.flip)

Extended Type: Line

ln : Line
Returns: Line

Line.segment a b ln

Full Usage: Line.segment a b ln

Parameters:
    a : float
    b : float
    ln : Line

Returns: Line
Modifiers: inline

Returns new 3D line from point at Parameter a to point at Parameter b.

Extended Type: Line

a : float
b : float
ln : Line
Returns: Line

Line.setEnd pt ln

Full Usage: Line.setEnd pt ln

Parameters:
Returns: Line
Modifiers: inline

Set Line end point, returns a new line.

Extended Type: Line

pt : Point3d
ln : Line
Returns: Line

Line.setStart pt ln

Full Usage: Line.setStart pt ln

Parameters:
Returns: Line
Modifiers: inline

Set Line start point, returns a new line.

Extended Type: Line

pt : Point3d
ln : Line
Returns: Line

Line.shrink distAtStart distAtEnd ln

Full Usage: Line.shrink distAtStart distAtEnd ln

Parameters:
    distAtStart : float
    distAtEnd : float
    ln : Line

Returns: Line
Modifiers: inline

Shrink 3D line by absolute amount at start and end. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

distAtStart : float
distAtEnd : float
ln : Line
Returns: Line

Line.shrinkEnd distAtEnd ln

Full Usage: Line.shrinkEnd distAtEnd ln

Parameters:
    distAtEnd : float
    ln : Line

Returns: Line
Modifiers: inline

Shrink 3D line by absolute amount at end. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

distAtEnd : float
ln : Line
Returns: Line

Line.shrinkStart distAtStart ln

Full Usage: Line.shrinkStart distAtStart ln

Parameters:
    distAtStart : float
    ln : Line

Returns: Line
Modifiers: inline

Shrink 3D line by absolute amount at start. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

distAtStart : float
ln : Line
Returns: Line

Line.split gap segments ln

Full Usage: Line.split gap segments ln

Parameters:
    gap : float
    segments : int
    ln : Line

Returns: Line[]

Divides a 3D line into given amount of segments. Includes a gap between the segments. But not at the start or end. Returns an array of 3D Lines. Returns an empty array if the length of the line is less than gap-size x segment-count-minus-1.

Extended Type: Line

gap : float
segments : int
ln : Line
Returns: Line[]

Line.splitMaxLength gap maxSegmentLength ln

Full Usage: Line.splitMaxLength gap maxSegmentLength ln

Parameters:
    gap : float
    maxSegmentLength : float
    ln : Line

Returns: Line[]

Divides a 3D line into as few as segments as possible respecting the maximum segment length and the gap. Includes a gap between the segments. But not at the start or end. Returns an array ofe3D Lines The input maxSegmentLength is multiplied by factor 0.999999 of to avoid numerical errors. That means in an edge case there are fewer segments returned, not more.

Extended Type: Line

gap : float
maxSegmentLength : float
ln : Line
Returns: Line[]

Line.splitMinLength gap minSegmentLength ln

Full Usage: Line.splitMinLength gap minSegmentLength ln

Parameters:
    gap : float
    minSegmentLength : float
    ln : Line

Returns: Line[]

Divides a 3D line into as many as segments as possible respecting the minimum segment length and the gap. Includes a gap between the segments. But not at the start or end. Returns an array ofe3D Lines The input minSegmentLength is multiplied by factor 1.000001 of to avoid numerical errors. That means in an edge case there are more segments returned, not fewer.

Extended Type: Line

gap : float
minSegmentLength : float
ln : Line
Returns: Line[]

Line.start l

Full Usage: Line.start l

Parameters:
Returns: Point3d
Modifiers: inline

Returns the Start point of the line. Same as Line.from.

Extended Type: Line

l : Line
Returns: Point3d

Line.tangent ln

Full Usage: Line.tangent ln

Parameters:
Returns: Vector3d
Modifiers: inline

Same as Line.vector or Line.direction. The returned vector has the same length as the Line.

Extended Type: Line

ln : Line
Returns: Vector3d

Line.to' l

Full Usage: Line.to' l

Parameters:
Returns: Point3d
Modifiers: inline

Returns the End point of the line. Same as Line.ende.

Extended Type: Line

l : Line
Returns: Point3d

Line.toX l

Full Usage: Line.toX l

Parameters:
Returns: float
Modifiers: inline

Returns the End point's X coordinate of the line.

Extended Type: Line

l : Line
Returns: float

Line.toY l

Full Usage: Line.toY l

Parameters:
Returns: float
Modifiers: inline

Returns the End point's Y coordinate of the line.

Extended Type: Line

l : Line
Returns: float

Line.toZ l

Full Usage: Line.toZ l

Parameters:
Returns: float
Modifiers: inline

Returns the End point's Z coordinate of the line.

Extended Type: Line

l : Line
Returns: float

Line.transform xForm line

Full Usage: Line.transform xForm line

Parameters:
Returns: Line

Returns a new transformed Line

Extended Type: Line

xForm : Transform
line : Line
Returns: Line

Line.translate v ln

Full Usage: Line.translate v ln

Parameters:
Returns: Line
Modifiers: inline

Move a 3D line by a vector. (same as Line.move)

Extended Type: Line

v : Vector3d
ln : Line
Returns: Line

Line.unitTangent ln

Full Usage: Line.unitTangent ln

Parameters:
Returns: Vector3d
Modifiers: inline

Returns a unit-vector of the line Direction.

Extended Type: Line

ln : Line
Returns: Vector3d

Line.vector ln

Full Usage: Line.vector ln

Parameters:
Returns: Vector3d
Modifiers: inline

Same as Line.tangent or Line.direction. The returned vector has the same length as the Line.

Extended Type: Line

ln : Line
Returns: Vector3d

Line.withLengthFromMid len ln

Full Usage: Line.withLengthFromMid len ln

Parameters:
    len : float
    ln : Line

Returns: Line
Modifiers: inline

Returns new Line with given length. Missing length is added to or subtracted from both the end and start of the line. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

len : float
ln : Line
Returns: Line

Line.withLengthFromStart len ln

Full Usage: Line.withLengthFromStart len ln

Parameters:
    len : float
    ln : Line

Returns: Line
Modifiers: inline

Returns new Line with given length, going out from start in direction of end. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

len : float
ln : Line
Returns: Line

Line.withLengthToEnd len ln

Full Usage: Line.withLengthToEnd len ln

Parameters:
    len : float
    ln : Line

Returns: Line
Modifiers: inline

Returns new Line ending at current LineEnd with given length coming from direction of start. Fails on lines shorter than zeroLengthTolerance (1e-12).

Extended Type: Line

len : float
ln : Line
Returns: Line

Type something to start searching.