jakke-graphics-ts
    Preparing search index...

    Function getIntersectionWithLine2d

    • Computes the intersection points between a 2D polyline and a 2D line.

      Iterates through each segment of the polyline, checks for intersection with the given line, and collects intersection points along with their parameter t on the line. The result is sorted by the parameter t in ascending order.

      Parameters

      • polyline: Polyline2d

        The polyline represented as an array of 2D vertices.

      • line: Line2d

        The 2D line to intersect with the polyline.

      Returns { pt: Vertex3d; t: number }[]

      An array of objects containing the intersection point (pt) and its parameter (t) on the line, sorted by t.