ProtoTwin API
    Preparing search index...

    Class Arc

    Immutable arc.

    The arc starts at origin + firstAxis * radius and proceeds counter-clockwise when looking against the direction of the plane's normal (right-hand rule).

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    • Constructor.

      Parameters

      • plane: Plane

        The plane in which the arc lies.

      • angle: number

        The angle for the arc.

      • radius: number

        The uniform radius for the arc.

      • initialSurfaceNormal: Vec3 = Vec3.zero

        The (optional) initial surface normal for the arc.

      Returns Arc

    Properties

    angle: number

    The angle for the arc.

    initialSurfaceNormal: Vec3

    The initial surface normal for the arc.

    Used to orient the frame and to disambiguate the normal direction for transport surfaces.

    plane: Plane

    The plane in which the arc lies.

    radius: number

    The uniform radius for the arc.

    Accessors

    • get closed(): boolean

      Whether the arc is a complete circle.

      Returns boolean

    • get length(): number

      The arc length.

      Returns number

    Methods

    • Evaluates the frame at the specified distance.

      Parameters

      • s: number

        The distance.

      Returns Frame

      The frame.

    • Evaluates the normal to the arc at the specified arc-length.

      Parameters

      • s: number

        The arc-length.

      Returns Vec3

      The normal to the arc.

      Uses the supplied initial surface normal when it is non-zero; otherwise uses the geometric normal.

    • Parameters

      • s: number

      Returns number

    • Evaluates the point on the arc at the specified arc-length.

      Parameters

      • s: number

        The arc-length.

      Returns Vec3

      The point on the arc.

    • Calculates the angle for the specified point when projected onto the arc.

      Parameters

      Returns number

      The angle for the projected point.

    • Calculates the arc-length for the specified point when projected onto the arc.

      Parameters

      Returns number

      The arc-length for the projected point.

    • Parameters

      • s: number
      • distances: readonly number[]

      Returns number

    • Parameters

      • s: number
      • distances: readonly number[]

      Returns number

    • Evaluates the tangent to the arc at the specified arc-length.

      Parameters

      • s: number

        The arc-length.

      Returns Vec3

      The tangent to the arc.

    • Returns the portion of the arc between two arc-length distances.

      Parameters

      • s0: number

        The start arc-length.

      • s1: number

        The end arc-length.

      Returns Arc

      The trimmed arc.

    • Determines whether two arcs are exactly equal.

      Parameters

      • lhs: Arc

        The first arc.

      • rhs: Arc

        The second arc.

      Returns boolean

      True if the two arcs are exactly equal, false otherwise.

    • Determines whether two arcs are not exactly equal.

      Parameters

      • lhs: Arc

        The first arc.

      • rhs: Arc

        The second arc.

      Returns boolean

      True if the two arcs are different, false otherwise.