Selva Compute API Reference - v2.1.0
    Preparing search index...

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • initialCapacity: number

      Returns Polyline

    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

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

    • Parameters

      • points: number[][]

        Points to add.

      Returns void

      Add a range of points to the list.

    • ...

      Returns void

    • ...

      Parameters

      • testPoint: number[]

      Returns number[]

    • Parameters

      • testPoint: number[]

        Point to approximate.

      Returns number

      The parameter along the polyline closest to testPoint.

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

    • ...

      Parameters

      • index: number

      Returns number[]

    • Returns Line[]

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

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

    • ...

      Parameters

      • index: number
      • point: number[]

      Returns void

    • 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.

      Test a polyline to see if it is closed.

    • Parameters

      • t: number

        Polyline parameter.

      Returns number[]

      The point on the polyline at t.

      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

      Returns void

    • Parameters

      • index: number

        Index of segment to retrieve.

      Returns Line

      Line segment at index or Line.Unset on failure.

      Gets the line segment at the given index.

    • ...

      Parameters

      • index: number
      • point: number[]

      Returns void

    • Parameters

      • xValue: number

      Returns void

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

    • Parameters

      • yValue: number

      Returns void

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

    • Returns void

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

    • Parameters

      • t: number

        Polyline parameter.

      Returns number[]

      The tangent along the polyline at t.

      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.

      Constructs a nurbs curve representation of this polyline.

    • Returns PolylineCurve

      A curve shaped like this polyline or null on failure.

      Constructs a polyline curve representation of this polyline.

    • Parameters

      Returns void

      Applies a transform to all the points in the list.

    • Parameters

      • circle: Circle

        The circle.

      • sideCount: number

        The number of sides

      Returns Polyline

      A closed polyline if successful, null otherwise.

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

    • Parameters

      • points: number[][] | Point3dList

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

      Returns Polyline

      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.

      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.

      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.