Class Polyline

Hierarchy (view full)

Constructors

Properties

boundingBox: BoundingBox

Even though this is a property, it is not a "fast" calculation. Every point is evaluated in order to get the bounding box of the list.

capacity: number
count: number
isClosed: boolean

Gets a value that indicates whether this polyline is closed. The polyline is considered to be closed if its start is identical to its endpoint.

isValid: boolean

Gets a value that indicates whether this polyline is valid. Valid polylines have at least one segment, no Invalid points and no zero length segments.Closed polylines with only two segments are also not considered valid.

length: number

Gets the total length of the polyline.

segmentCount: number

Gets the number of segments for this polyline.

Methods

  • Parameters

    • x: number

      The X coordinate.

    • y: number

      The Y coordinate.

    • z: number

      The Z coordinate.

    Returns void

    Description

    Adds a Point3d to the end of the list with given x,y,z coordinates.

  • Parameters

    • points: number[][]

      Points to add.

    Returns void

    Description

    Add a range of points to the list.

  • ...

    Parameters

    • testPoint: number[]

    Returns number[]

  • Parameters

    • testPoint: number[]

      Point to approximate.

    Returns number

    The parameter along the polyline closest to testPoint.

    Description

    Gets the parameter along the polyline which is closest to a test-point.

  • Returns Line[]

    An array of line segments or null if the polyline contains fewer than 2 points.

    Description

    Constructs an array of line segments that make up the entire polyline.

  • Parameters

    • tolerance: number

      The tolerance.

    Returns boolean

    Returns true if polyline has 4 or more points, the distance between the start and end points is <= tolerance, and there is a point in the polyline whose distance from the start and end points is > tolerance.

    Description

    Test a polyline to see if it is closed.

  • Parameters

    • t: number

      Polyline parameter.

    Returns number[]

    The point on the polyline at t.

    Description

    Gets the point on the polyline at the given parameter. The integer part of the parameter indicates the index of the segment.

  • Parameters

    • index: number

      Index of segment to retrieve.

    Returns Line

    Line segment at index or Line.Unset on failure.

    Description

    Gets the line segment at the given index.

  • Parameters

    • xValue: number

    Returns void

    Description

    Set all the X values for the points to a single value

  • Parameters

    • yValue: number

    Returns void

    Description

    Set all the Y values for the points to a single value

  • Parameters

    • t: number

      Polyline parameter.

    Returns number[]

    The tangent along the polyline at t.

    Description

    Gets the unit tangent vector along the polyline at the given parameter. The integer part of the parameter indicates the index of the segment.

  • Returns NurbsCurve

    A Nurbs curve shaped like this polyline or null on failure.

    Description

    Constructs a nurbs curve representation of this polyline.

  • Parameters

    • circle: Circle

      The circle.

    • sideCount: number

      The number of sides

    Returns Polyline

    A closed polyline if successful, null otherwise.

    Description

    Create a regular polygon circumscribe about a circle. The midpoints of the polygon's edges will be tangent to the circle.

  • Parameters

    • points: Point3dList | number[][]

      Points to use for polyline creation as an array of points [x, y, z] or Point3dList.

    Returns Polyline

    Description

    Creates a polyline of points to this point cloud.

  • Parameters

    • circle: Circle

      The circle.

    • sideCount: number

      The number of sides

    Returns Polyline

    A closed polyline if successful, null otherwise.

    Description

    Create a regular polygon inscribed in a circle. The vertices of the polygon will be on the circle.

  • Parameters

    • circle: Circle

      The circle.

    • radius: number

      The radius of other circle.

    • cornerCount: number

      The number of corners on the circle. There will be 2cornerCount sides and 2cornerCount vertices.

    Returns Polyline

    A closed polyline if successful, null otherwise.

    Description

    Create a regular star polygon. The star begins at circle.PointAt(0) and the vertices alternate between being on circle and begin on a concentric circle of other_radius.

Generated using TypeDoc