• Parameters

    • graph: FOLD

      a FOLD object

    • Optional axis: number = 0

      which axis to sweep along

    • Optional epsilon: number = EPSILON

      an optional epsilon

    Returns {
        edges: {
            end: number[];
            start: number[];
        };
        faces: {
            end: number[];
            start: number[];
        };
        t: number;
        vertices: number[];
    }[]

    an array of event objects, each event contains:

    • t: the position along the axis
    • vertices: the vertices (one or more) at this event along the axis
    • edges, faces: where each contains:
      • start: the index which begin at this event in the sweep
      • end: the index which end at this event in the sweep

    Description

    Perform a line sweep through all components of a graph, This method will create an array of events, each event occurs at a vertex (or vertices), and each event will either "start" or "end" edges and faces. In the case of degenerate edges or faces whose vertices all lie on a line orthogonal to the sweep axis within an epsilon, These components will only exist inside one event and be present in both "start" and "end" arrays.