Function flatten

  • Flattens a 2D or 3D array whether its a flat point ([x, y, z]) or object ({ x, y, z })

    Parameters

    • data: number[][][] | Point[][] | Point3D[][]

      either a 2D or 3D array

    Returns FlattenResult

    • the flattened array including the holes and dimensions