Header menu logo Euclid

Polyline3D Type

A class holding a list of 3D points representing a mutable 3D Polyline. If the last point is the same as the first point, the Polyline3D is closed. The Default constructor uses the provided ResizeArray of points directly, so changes to the list will be reflected in the Polyline3D.

Constructors

Constructor Description

Polyline3D(capacity)

Full Usage: Polyline3D(capacity)

Parameters:
    capacity : int

Returns: Polyline3D

Create a new empty Polyline3D with predefined capacity for the internal list of points.

capacity : int
Returns: Polyline3D

Polyline3D()

Full Usage: Polyline3D()

Returns: Polyline3D

Create a new empty Polyline3D

Returns: Polyline3D

Polyline3D(points)

Full Usage: Polyline3D(points)

Parameters:
    points : ResizeArray<Pnt>

Returns: Polyline3D
points : ResizeArray<Pnt>
Returns: Polyline3D

Instance members

Instance member Description

this.AsFSharpCode

Full Usage: this.AsFSharpCode

Returns: string

Format this 3D polyline into an F# code string that can be used to recreate the point.

Returns: string

this.AsString

Full Usage: this.AsString

Returns: string

Format Polyline3D into string including its length.

Returns: string

this.AverageNormal

Full Usage: this.AverageNormal

Returns: Vec

Returns the average normal vector of the Polyline3D. It is calculated by summing up the cross products of all segments around the center point. Does not check for bad input, may be zero length if points are colinear.

Returns: Vec

this.BoundingBox

Full Usage: this.BoundingBox

Returns: BBox

Gets the a bounding box of the Polyline3D

Returns: BBox

this.Center

Full Usage: this.Center

Returns: Pnt

Returns the average center of all points of the Polyline3D.

Returns: Pnt

this.Clone

Full Usage: this.Clone

Returns: Polyline3D

Creates a copy of the Polyline3D. Same as polyline.Duplicate()

Returns: Polyline3D

this.CloseInPlace

Full Usage: this.CloseInPlace

Parameters:
    toleranceForAddingPoint : float

Close the Polyline3D if it is not already closed. If the ends are closer than the tolerance. The last point is set to equal the first point. Else the start point is added to the end of the Polyline3D.

toleranceForAddingPoint : float

this.ClosestParameter

Full Usage: this.ClosestParameter

Parameters:
Returns: float

Returns the parameter on the Polyline3D that is the closest point to the given point. The integer part of the parameter is the index of the segment that the point is on. The fractional part of the parameter is the parameter form 0.0 to 1.0 on the segment. The domain Polyline3D starts at 0.0 and ends at points.Count - 1.0 .

p : Pnt
Returns: float

this.ClosestPoint

Full Usage: this.ClosestPoint

Parameters:
Returns: Pnt

Returns the point on the Polyline3D that is the closest point to the given point.

p : Pnt
Returns: Pnt

this.ClosestVertex

Full Usage: this.ClosestVertex

Parameters:
Returns: int

Returns the index into the Polylines point list of the vertex that is closest to the given point.

p : Pnt
Returns: int

this.DistanceTo

Full Usage: this.DistanceTo

Parameters:
Returns: float

Returns the distance of the test point to the closest point on the Polyline3D.

p : Pnt
Returns: float

this.Duplicate

Full Usage: this.Duplicate

Returns: Polyline3D

Creates a copy of the Polyline3D Same as polyline.Clone()

Returns: Polyline3D

this.End

Full Usage: this.End

Gets or sets last or end point of the Polyline3D This is the point at index Points.Count - 1. Same as Polyline3D.LastPoint

this.EvaluateAt

Full Usage: this.EvaluateAt

Parameters:
    t : float

Returns: Pnt

Returns the point at a given parameter on the Polyline3D. The integer part of the parameter is the index of the segment that the point is on. The fractional part of the parameter is the parameter form 0.0 to 1.0 on the segment. The domain Polyline3D starts at 0.0 and ends at points.Count - 1.0 . If the parameter is within 1e-6 of an integer value, the integer value is used as parameter.

t : float
Returns: Pnt

this.FirstPoint

Full Usage: this.FirstPoint

Gets or sets the first point of the Polyline3D. This is the point at index 0. Same as Polyline3D.Start

this.FirstSegment

Full Usage: this.FirstSegment

Returns: Line3D

Gets the first segment of the Polyline3D.

Returns: Line3D

this.GetSegment

Full Usage: this.GetSegment

Parameters:
    i : int

Returns: Line3D

Gets the segment at index i of the Polyline3D.

i : int
Returns: Line3D

this.IsAlmostClosed

Full Usage: this.IsAlmostClosed

Parameters:
    tolerance : float

Returns: bool

Tests if Polyline3D is closed within given tolerance. Returns False if the Polyline3D has less than 3 points.

tolerance : float
Returns: bool

this.IsClockwiseIn2D

Full Usage: this.IsClockwiseIn2D

Returns: bool

Test if Polyline3D is Clockwise when projected in 2D. Z values are ignored. The Polyline3D does not need to be actually closed. The signed area of the Polyline3D is calculated. If it is positive the Polyline3D is CCW.

Returns: bool

this.IsClosed

Full Usage: this.IsClosed

Returns: bool

Tests if Polyline3D start and end points are exactly the same. Returns False if the Polyline3D has less than 3 points.

Returns: bool

this.IsCounterClockwiseIn2D

Full Usage: this.IsCounterClockwiseIn2D

Returns: bool

Test if Polyline3D is CounterClockwise when projected in 2D. Z values are ignored. The Polyline3D does not need to be actually closed. The signed area of the Polyline3D is calculated. If it is positive the Polyline3D is CCW.

Returns: bool

this.LastPoint

Full Usage: this.LastPoint

Gets or sets the last point of the Polyline3D. This is the point at index Points.Count - 1. Same as Polyline3D.End

this.LastPointIndex

Full Usage: this.LastPointIndex

Returns: int

Gets the index of the last point in the Polyline3D. points.Count - 1

Returns: int

this.LastSegment

Full Usage: this.LastSegment

Returns: Line3D

Gets the last segment of the Polyline3D.

Returns: Line3D

this.LastSegmentIndex

Full Usage: this.LastSegmentIndex

Returns: int

Gets the index of the last segment in the Polyline3D. This is poly.Points.Count - 2

Returns: int

this.Length

Full Usage: this.Length

Returns: float

Gets the length of the Polyline3D Returns 0.0 if there are less than 2 points.

Returns: float

this.Move

Full Usage: this.Move

Parameters:
Returns: Polyline3D

Returns a Polyline3D moved by a vector.

v : Vec
Returns: Polyline3D

this.MoveX

Full Usage: this.MoveX

Parameters:
    distance : float

Returns: Polyline3D

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

distance : float
Returns: Polyline3D

this.MoveY

Full Usage: this.MoveY

Parameters:
    distance : float

Returns: Polyline3D

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

distance : float
Returns: Polyline3D

this.MoveZ

Full Usage: this.MoveZ

Parameters:
    distance : float

Returns: Polyline3D

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

distance : float
Returns: Polyline3D

this.PointCount

Full Usage: this.PointCount

Returns: int

Gets the count of points in the Polyline3D

Returns: int

this.Points

Full Usage: this.Points

Returns: ResizeArray<Pnt>

Gets the internal list of all Points of the Polyline3D. This is not a copy, so changes to the list will be reflected in the Polyline3D.

Returns: ResizeArray<Pnt>

this.Reverse

Full Usage: this.Reverse

Returns: Polyline3D

Returns new Polyline3D in reversed Order.

Returns: Polyline3D

this.ReverseInPlace

Full Usage: this.ReverseInPlace

Reverse order of the Polyline3D in place.

this.Rotate

Full Usage: this.Rotate

Parameters:
Returns: Polyline3D

Multiplies (or applies) a Quaternion to the Polyline3D. The polyline is rotated around the World Origin.

q : Quaternion
Returns: Polyline3D

this.RotateWithCenter

Full Usage: this.RotateWithCenter

Parameters:
Returns: Polyline3D

Multiplies (or applies) a Quaternion to the Polyline3D around a given center point.

cen : Pnt
q : Quaternion
Returns: Polyline3D

this.Scale

Full Usage: this.Scale

Parameters:
    factor : float

Returns: Polyline3D

Scales the 3D polyline by a given factor. Scale center is World Origin 0,0,0

factor : float
Returns: Polyline3D

this.ScaleOn

Full Usage: this.ScaleOn

Parameters:
    cen : Pnt
    factor : float

Returns: Polyline3D

Scales the 3D polyline by a given factor on a given center point

cen : Pnt
factor : float
Returns: Polyline3D

this.SecondLastPoint

Full Usage: this.SecondLastPoint

Gets or sets the second last point of the Polyline3D.

this.SecondPoint

Full Usage: this.SecondPoint

Gets or sets the second point of the Polyline3D. This is the point at index 1.

this.SegmentCount

Full Usage: this.SegmentCount

Returns: int

Gets the count of segments in the Polyline3D This is poly.Points.Count - 1

Returns: int

this.SegmentVectors

Full Usage: this.SegmentVectors

Returns: ResizeArray<Vec>

Returns the line vectors of all segments of the Polyline3D as a list of Vec.

Returns: ResizeArray<Vec>

this.Segments

Full Usage: this.Segments

Returns: ResizeArray<Line3D>

Returns all segments of the Polyline3D as a list of Line3D.

Returns: ResizeArray<Line3D>

this.SetVertex

Full Usage: this.SetVertex

Parameters:
    idx : int
    pt : Pnt

Sets the vertex at given index to the given point. On a closed Polyline3D, setting the first or last point will set both to the same point.

idx : int
pt : Pnt

this.SignedAreaIn2D

Full Usage: this.SignedAreaIn2D

Returns: float

Calculates the signed area of the Polyline3D when projected in 2D. Z values are ignored. The Polyline3D does not need to be actually closed. The signed area of the Polyline3D is calculated. If it is positive the Polyline3D is CCW.

Returns: float

this.Start

Full Usage: this.Start

Gets or sets first point of the Polyline3D This is the point at index 0. Same as Polyline3D.FirstPoint

this.Transform

Full Usage: this.Transform

Parameters:
Returns: Polyline3D

Applies or multiplies a 4x4 transformation matrix to the Polyline3D.

m : Matrix
Returns: Polyline3D

this.TransformRigid

Full Usage: this.TransformRigid

Parameters:
Returns: Polyline3D

Multiplies (or applies) a RigidMatrix to the Polyline3D.

m : RigidMatrix
Returns: Polyline3D

Static members

Static member Description

Polyline3D.close pl

Full Usage: Polyline3D.close pl

Parameters:
Returns: Polyline3D

Returns a new closed Polyline3D. If the first and last point are within 1e-6 of each other, the last point is set equal to the first point. Otherwise one point is added.

pl : Polyline3D
Returns: Polyline3D

Polyline3D.closeInPlace pl

Full Usage: Polyline3D.closeInPlace pl

Parameters:

Closes the Polyline3D in place by adding a point. If the first and last point are within 1e-6 of each other, the last point is set equal to the first point instead.

pl : Polyline3D

Polyline3D.closestParameter pl pt

Full Usage: Polyline3D.closestParameter pl pt

Parameters:
Returns: float
Modifiers: inline

Returns the parameter on the Polyline3D that is the closest point to the given point. The integer part of the parameter is the index of the segment that the point is on. The fractional part of the parameter is the parameter form 0.0 to 1.0 on the segment. The domain Polyline3D starts at 0.0 and ends at point count.

pl : Polyline3D
pt : Pnt
Returns: float

Polyline3D.closestPoint pl pt

Full Usage: Polyline3D.closestPoint pl pt

Parameters:
Returns: Pnt
Modifiers: inline

Returns the point on the Polyline3D that is the closest point to the given point.

pl : Polyline3D
pt : Pnt
Returns: Pnt

Polyline3D.closestVertex pl pt

Full Usage: Polyline3D.closestVertex pl pt

Parameters:
Returns: int
Modifiers: inline

Returns the index into the Polyline3D's point list of the vertex that is closest to the given point.

pl : Polyline3D
pt : Pnt
Returns: int

Polyline3D.create points

Full Usage: Polyline3D.create points

Parameters:
    points : Pnt seq

Returns: Polyline3D

Create a new Polyline3D by copying over all points.

points : Pnt seq
Returns: Polyline3D

Polyline3D.createDirectlyUnsafe points

Full Usage: Polyline3D.createDirectlyUnsafe points

Parameters:
    points : ResizeArray<Pnt>

Returns: Polyline3D

Create a new Polyline3D by using the provided ResizeArray directly. All later changes to the ResizeArray will be reflected in the Polyline3D.

points : ResizeArray<Pnt>
Returns: Polyline3D

Polyline3D.createEmpty capacity

Full Usage: Polyline3D.createEmpty capacity

Parameters:
    capacity : int

Returns: Polyline3D

Create a new empty Polyline3D without any points. But predefined capacity.

capacity : int
Returns: Polyline3D

Polyline3D.distanceTo pl pt

Full Usage: Polyline3D.distanceTo pl pt

Parameters:
Returns: float
Modifiers: inline

Returns the distance of the test point to the closest point on the Polyline3D.

pl : Polyline3D
pt : Pnt
Returns: float

Polyline3D.ende pl

Full Usage: Polyline3D.ende pl

Parameters:
Returns: Pnt

Gets last or end point of the Polyline3D

pl : Polyline3D
Returns: Pnt

Polyline3D.equals tol a b

Full Usage: Polyline3D.equals tol a b

Parameters:
Returns: bool

Tests if two Polyline3D have the same number of points and points are equal within a given tolerance.

tol : float
a : Polyline3D
b : Polyline3D
Returns: bool

Polyline3D.evaluateAt t pl

Full Usage: Polyline3D.evaluateAt t pl

Parameters:
Returns: Pnt

Returns the point at a given parameter on the Polyline3D. The integer part of the parameter is the index of the segment that the point is on. The fractional part of the parameter is the parameter form 0.0 to 1.0 on the segment. The domain Polyline3D starts at 0.0 and ends at point count.

t : float
pl : Polyline3D
Returns: Pnt

Polyline3D.length p

Full Usage: Polyline3D.length p

Parameters:
Returns: float
Modifiers: inline

Gets the length of the Polyline3D. The sum of the lengths of all segments.

p : Polyline3D
Returns: float

Polyline3D.map mapping pl

Full Usage: Polyline3D.map mapping pl

Parameters:
Returns: Polyline3D

Apply a mapping function to each point in the 3D Polyline. Returns new Polyline3D.

mapping : Pnt -> Pnt
pl : Polyline3D
Returns: Polyline3D

Polyline3D.move v pl

Full Usage: Polyline3D.move v pl

Parameters:
Returns: Polyline3D

Move a Polyline3D by a vector. (same as Polyline3D.translate)

v : Vec
pl : Polyline3D
Returns: Polyline3D

Polyline3D.moveX distance pl

Full Usage: Polyline3D.moveX distance pl

Parameters:
Returns: Polyline3D

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

distance : float
pl : Polyline3D
Returns: Polyline3D

Polyline3D.moveY distance pl

Full Usage: Polyline3D.moveY distance pl

Parameters:
Returns: Polyline3D

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

distance : float
pl : Polyline3D
Returns: Polyline3D

Polyline3D.moveZ distance pl

Full Usage: Polyline3D.moveZ distance pl

Parameters:
Returns: Polyline3D

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

distance : float
pl : Polyline3D
Returns: Polyline3D

Polyline3D.offset (polyLine, inPlaneOffsetDistance, perpendicularOffsetDistance, ?loop)

Full Usage: Polyline3D.offset (polyLine, inPlaneOffsetDistance, perpendicularOffsetDistance, ?loop)

Parameters:
    polyLine : Polyline3D - A 3D Polyline, open or closed.
    inPlaneOffsetDistance : float - The offset distance in the local plane defined by two segments. A positive distance offsets to the inside of the polyline. A negative distance offsets to the outside. No matter how the polyline is oriented.
    perpendicularOffsetDistance : float - The offset distance perpendicular to the local plane. A positive distance offsets in the direction of the computed normal. For a counterclockwise polyline in xy-plane this is Upwards. A negative distance offsets in the opposite direction.
    ?loop : bool - Optional, defaults to false. Set to true to treat an open polyline as a closed loop, even if first and last points are not at the same location. When loop=true on an open polyline, both distance lists must contain the same number of items as the polyline has points.

Returns: Polyline3D A new 3D polyline.

Offsets a Polyline in 3D space by finding the local plane in each corner. Auto-detects if given points are from a closed Polyline (first point = last point) and loops them. The reference normal is computed from the average normal of the polyline. This function raises an Exception on duplicate points, 180 degree U-turns, or colinear points.

polyLine : Polyline3D

A 3D Polyline, open or closed.

inPlaneOffsetDistance : float

The offset distance in the local plane defined by two segments. A positive distance offsets to the inside of the polyline. A negative distance offsets to the outside. No matter how the polyline is oriented.

perpendicularOffsetDistance : float

The offset distance perpendicular to the local plane. A positive distance offsets in the direction of the computed normal. For a counterclockwise polyline in xy-plane this is Upwards. A negative distance offsets in the opposite direction.

?loop : bool

Optional, defaults to false. Set to true to treat an open polyline as a closed loop, even if first and last points are not at the same location. When loop=true on an open polyline, both distance lists must contain the same number of items as the polyline has points.

Returns: Polyline3D

A new 3D polyline.

Polyline3D.offsetVar (polyLine, inPlaneOffsetDistance, perpendicularOffsetDistances, ?loop, ?varDistParallelBehaviour, ?considerColinearBelow, ?failAtUTurnAbove)

Full Usage: Polyline3D.offsetVar (polyLine, inPlaneOffsetDistance, perpendicularOffsetDistances, ?loop, ?varDistParallelBehaviour, ?considerColinearBelow, ?failAtUTurnAbove)

Parameters:
    polyLine : Polyline3D - A 3D Polyline, open or closed.
    inPlaneOffsetDistance : ResizeArray<float> - The offset distances in the local plane defined by two segments. One distance per segment. A positive distance offsets to the inside of the polyline. A negative distance offsets to the outside. No matter how the polyline is oriented.
    perpendicularOffsetDistances : ResizeArray<float> - The offset distances perpendicular to the local plane. One distance per segment. A positive distance offsets in the direction of the computed normal. For a counterclockwise polyline in xy-plane this is Upwards. A negative distance offsets in the opposite direction.
    ?loop : bool - Optional, defaults to false. Set to true to treat an open polyline as a closed loop, even if first and last points are not at the same location.
    ?varDistParallelBehaviour : VarDistParallel - Optional, defaults to Fail. The behavior to use when colinear segments with different offset distances are found.
    ?considerColinearBelow : MeasureProduct<cosine, MeasureOne> - Optional, defaults to 2.5 degrees in cosine measure. The cosine of the angle below which segments are considered colinear.
    ?failAtUTurnAbove : MeasureProduct<cosine, MeasureOne> - Optional, defaults to 175 degrees in cosine measure. The cosine of the angle above which a U-turn is considered to fail.

Returns: Polyline3D A new 3D polyline.

Offsets a Polyline in 3D space by finding the local plane in each corner. Auto-detects if given points are from a closed Polyline (first point = last point) and loops them. The reference normal is computed from the average normal of the polyline. This function raises an Exception on duplicate points, 180 degree U-turns, or colinear points.

polyLine : Polyline3D

A 3D Polyline, open or closed.

inPlaneOffsetDistance : ResizeArray<float>

The offset distances in the local plane defined by two segments. One distance per segment. A positive distance offsets to the inside of the polyline. A negative distance offsets to the outside. No matter how the polyline is oriented.

perpendicularOffsetDistances : ResizeArray<float>

The offset distances perpendicular to the local plane. One distance per segment. A positive distance offsets in the direction of the computed normal. For a counterclockwise polyline in xy-plane this is Upwards. A negative distance offsets in the opposite direction.

?loop : bool

Optional, defaults to false. Set to true to treat an open polyline as a closed loop, even if first and last points are not at the same location.

?varDistParallelBehaviour : VarDistParallel

Optional, defaults to Fail. The behavior to use when colinear segments with different offset distances are found.

?considerColinearBelow : MeasureProduct<cosine, MeasureOne>

Optional, defaults to 2.5 degrees in cosine measure. The cosine of the angle below which segments are considered colinear.

?failAtUTurnAbove : MeasureProduct<cosine, MeasureOne>

Optional, defaults to 175 degrees in cosine measure. The cosine of the angle above which a U-turn is considered to fail.

Returns: Polyline3D

A new 3D polyline.

Polyline3D.offsetVarWithRef (polyLine, inPlaneOffsetDistance, perpendicularOffsetDistances, refNormal, ?loop, ?varDistParallelBehaviour, ?considerColinearBelow, ?failAtUTurnAbove)

Full Usage: Polyline3D.offsetVarWithRef (polyLine, inPlaneOffsetDistance, perpendicularOffsetDistances, refNormal, ?loop, ?varDistParallelBehaviour, ?considerColinearBelow, ?failAtUTurnAbove)

Parameters:
    polyLine : Polyline3D - A 3D Polyline, open or closed.
    inPlaneOffsetDistance : IList<float> - The offset distances in the local plane defined by two segments. One distance per segment. A positive distance offsets to the inside of the polyline (for counterclockwise polylines when refNormal points up). A negative distance offsets to the outside.
    perpendicularOffsetDistances : IList<float> - The offset distances perpendicular to the local plane. One distance per segment. A positive distance offsets in the same orientation of refNormal. A negative distance offsets in the opposite direction.
    refNormal : UnitVec - A unit vector defining an approximate normal direction for orienting the perpendicular offset and determining inside/outside.
    ?loop : bool - Optional, defaults to false. Set to true to treat an open polyline as a closed loop, even if first and last points are not at the same location.
    ?varDistParallelBehaviour : VarDistParallel - Optional, defaults to Fail. The behavior to use when colinear segments with different offset distances are found.
    ?considerColinearBelow : MeasureProduct<cosine, MeasureOne> - Optional, defaults to 2.5 degrees in cosine measure. The cosine of the angle below which segments are considered colinear.
    ?failAtUTurnAbove : MeasureProduct<cosine, MeasureOne> - Optional, defaults to 175 degrees in cosine measure. The cosine of the angle above which a U-turn is considered to fail.

Returns: Polyline3D A new 3D polyline.

Offsets a Polyline in 3D space by finding the local plane in each corner. Takes a reference normal for orienting the perpendicular offset and determining inside/outside. Auto-detects if given points are from a closed Polyline (first point = last point) and loops them. This function raises an Exception on duplicate points and 180 degree U-turns.

polyLine : Polyline3D

A 3D Polyline, open or closed.

inPlaneOffsetDistance : IList<float>

The offset distances in the local plane defined by two segments. One distance per segment. A positive distance offsets to the inside of the polyline (for counterclockwise polylines when refNormal points up). A negative distance offsets to the outside.

perpendicularOffsetDistances : IList<float>

The offset distances perpendicular to the local plane. One distance per segment. A positive distance offsets in the same orientation of refNormal. A negative distance offsets in the opposite direction.

refNormal : UnitVec

A unit vector defining an approximate normal direction for orienting the perpendicular offset and determining inside/outside.

?loop : bool

Optional, defaults to false. Set to true to treat an open polyline as a closed loop, even if first and last points are not at the same location.

?varDistParallelBehaviour : VarDistParallel

Optional, defaults to Fail. The behavior to use when colinear segments with different offset distances are found.

?considerColinearBelow : MeasureProduct<cosine, MeasureOne>

Optional, defaults to 2.5 degrees in cosine measure. The cosine of the angle below which segments are considered colinear.

?failAtUTurnAbove : MeasureProduct<cosine, MeasureOne>

Optional, defaults to 175 degrees in cosine measure. The cosine of the angle above which a U-turn is considered to fail.

Returns: Polyline3D

A new 3D polyline.

Polyline3D.offsetWithRef (polyLine, inPlaneOffsetDistance, perpendicularOffsetDistance, refNormal, ?loop)

Full Usage: Polyline3D.offsetWithRef (polyLine, inPlaneOffsetDistance, perpendicularOffsetDistance, refNormal, ?loop)

Parameters:
    polyLine : Polyline3D - A 3D Polyline, open or closed.
    inPlaneOffsetDistance : float - The offset distance in the local plane defined by two segments. A positive distance offsets to the inside of the polyline (for counterclockwise polylines when refNormal points up). A negative distance offsets to the outside.
    perpendicularOffsetDistance : float - The offset distance perpendicular to the local plane. A positive distance offsets in the same orientation of refNormal. A negative distance offsets in the opposite direction.
    refNormal : UnitVec - A unit vector defining an approximate normal direction for orienting the perpendicular offset and determining inside/outside.
    ?loop : bool - Optional, defaults to false. Set to true to treat an open polyline as a closed loop, even if first and last points are not at the same location. When loop=true on an open polyline, both distance lists must contain the same number of items as the polyline has points.

Returns: Polyline3D A new 3D polyline.

Offsets a Polyline in 3D space by finding the local plane in each corner. Takes a reference normal for orienting the perpendicular offset and determining inside/outside. Auto-detects if given points are from a closed Polyline (first point = last point) and loops them. This function raises an Exception on duplicate points and 180 degree U-turns.

polyLine : Polyline3D

A 3D Polyline, open or closed.

inPlaneOffsetDistance : float

The offset distance in the local plane defined by two segments. A positive distance offsets to the inside of the polyline (for counterclockwise polylines when refNormal points up). A negative distance offsets to the outside.

perpendicularOffsetDistance : float

The offset distance perpendicular to the local plane. A positive distance offsets in the same orientation of refNormal. A negative distance offsets in the opposite direction.

refNormal : UnitVec

A unit vector defining an approximate normal direction for orienting the perpendicular offset and determining inside/outside.

?loop : bool

Optional, defaults to false. Set to true to treat an open polyline as a closed loop, even if first and last points are not at the same location. When loop=true on an open polyline, both distance lists must contain the same number of items as the polyline has points.

Returns: Polyline3D

A new 3D polyline.

Polyline3D.pointCount p

Full Usage: Polyline3D.pointCount p

Parameters:
Returns: int
Modifiers: inline

Gets the number of points in the Polyline3D.

p : Polyline3D
Returns: int

Polyline3D.pointsUnsafeInternal p

Full Usage: Polyline3D.pointsUnsafeInternal p

Parameters:
Returns: ResizeArray<Pnt>

Gets the internal list of all Points of the Polyline3D. This is not a copy, so changes to the list will be reflected in the Polyline3D.

p : Polyline3D
Returns: ResizeArray<Pnt>

Polyline3D.removeColinearAndDuplicatePoints angleTolerance distanceTolerance pl

Full Usage: Polyline3D.removeColinearAndDuplicatePoints angleTolerance distanceTolerance pl

Parameters:
Returns: Polyline3D

Removes consecutive duplicate points and colinear points from the Polyline3D within given tolerances. This algorithm allows the last and first point to be identical if the Polyline3D is closed. Colinear points are removed when the angle between segments is smaller than the cosine threshold (e.g. cosine of 0.5 degrees ). If the Polyline3D is closed and starts and ends with colinear segments, the first point is replaced with the last non-colinear point. So the joint of the loop is now moved to the last non-colinear point. So that there are no colinear segments even between start and end.

angleTolerance : float<MeasureProduct<cosine, MeasureOne>>
distanceTolerance : float
pl : Polyline3D
Returns: Polyline3D

Polyline3D.removeDuplicatePoints distanceTolerance pl

Full Usage: Polyline3D.removeDuplicatePoints distanceTolerance pl

Parameters:
Returns: Polyline3D

Removes consecutive duplicate points from the Polyline3D within a given tolerance. This algorithm allows the last and first point to be identical if the Polyline3D is closed.

distanceTolerance : float
pl : Polyline3D
Returns: Polyline3D

Polyline3D.reverse p

Full Usage: Polyline3D.reverse p

Parameters:
Returns: Polyline3D

Returns new Polyline3D in reversed Order.

p : Polyline3D
Returns: Polyline3D

Polyline3D.reverseInPlace p

Full Usage: Polyline3D.reverseInPlace p

Parameters:

Reverse order of the Polyline3D in place.

p : Polyline3D

Polyline3D.rotate2D r pl

Full Usage: Polyline3D.rotate2D r pl

Parameters:
Returns: Polyline3D

Rotation a Polyline3D around Z-Axis.

r : Rotation2D
pl : Polyline3D
Returns: Polyline3D

Polyline3D.rotate2DWithCenter cen r pl

Full Usage: Polyline3D.rotate2DWithCenter cen r pl

Parameters:
Returns: Polyline3D

Rotation a Polyline3D round given Center point an a local Z-axis.

cen : Pnt
r : Rotation2D
pl : Polyline3D
Returns: Polyline3D

Polyline3D.rotateByQuaternion q pl

Full Usage: Polyline3D.rotateByQuaternion q pl

Parameters:
Returns: Polyline3D

Multiplies (or applies) a Quaternion to the Polyline3D. The polyline is rotated around the World Origin.

q : Quaternion
pl : Polyline3D
Returns: Polyline3D

Polyline3D.rotateWithCenterByQuaternion cen q pl

Full Usage: Polyline3D.rotateWithCenterByQuaternion cen q pl

Parameters:
Returns: Polyline3D

Multiplies (or applies) a Quaternion to the Polyline3D around a given center point.

cen : Pnt
q : Quaternion
pl : Polyline3D
Returns: Polyline3D

Polyline3D.scale factor pl

Full Usage: Polyline3D.scale factor pl

Parameters:
Returns: Polyline3D

Scales the Polyline3D by a given factor. Scale center is World Origin 0,0,0 Returns a new Polyline3D.

factor : float
pl : Polyline3D
Returns: Polyline3D

Polyline3D.segmentCount p

Full Usage: Polyline3D.segmentCount p

Parameters:
Returns: int
Modifiers: inline

Gets the number of segments in the Polyline3D.

p : Polyline3D
Returns: int

Polyline3D.start pl

Full Usage: Polyline3D.start pl

Parameters:
Returns: Pnt

Gets first point of the Polyline3D

pl : Polyline3D
Returns: Pnt

Polyline3D.subPolyline a b pl

Full Usage: Polyline3D.subPolyline a b pl

Parameters:
Returns: Polyline3D

Returns new Polyline3D from point at Parameter a to point at Parameter b. if 'a' is bigger 'b' then the new Polyline3D is in opposite direction. If a parameter is within 1e-4 of an integer value, the integer value is used as parameter.

a : float
b : float
pl : Polyline3D
Returns: Polyline3D

Polyline3D.transform m pl

Full Usage: Polyline3D.transform m pl

Parameters:
Returns: Polyline3D

Applies a 4x4 transformation matrix.

m : Matrix
pl : Polyline3D
Returns: Polyline3D

Polyline3D.transformRigid m pl

Full Usage: Polyline3D.transformRigid m pl

Parameters:
Returns: Polyline3D

Multiplies (or applies) a RigidMatrix to the Polyline3D.

m : RigidMatrix
pl : Polyline3D
Returns: Polyline3D

Polyline3D.translate v pl

Full Usage: Polyline3D.translate v pl

Parameters:
Returns: Polyline3D

Move a Polyline3D by a vector. (same as Polyline3D.move)

v : Vec
pl : Polyline3D
Returns: Polyline3D

Type something to start searching.