jakke-graphics-ts
    Preparing search index...

    Function footingPointOnPolyline3d

    • Finds the closest footing point on a 3D polyline to a given point.

      Iterates through each segment of the polyline and computes the foot point (the closest point on the segment) to the provided point. Returns the best candidate based on minimum distance to the footing point.

      Parameters

      • polyline: Polyline3d

        The polyline represented as an array of 3D vertices.

      • pt: Vertex3d

        The 3D point for which to find the closest footing point on the polyline.

      • includeEnds: boolean = false

        If true, endpoints of the polyline segments are considered as valid footing points; otherwise, only interior points are considered.

      Returns undefined | { lineSegment: Line; pt: Vertex3d; t: number }

      An object containing the closest point (pt) on the polyline, the normalized position (t) along the polyline, and the corresponding line segment (lineSegment), or undefined if no valid footing point is found.