Function solverSolutionToFaceOrders

  • Parameters

    • facePairOrders: any

      an object with face-pair keys and 1, 2 values

    • faces_winding: boolean[]

      for every face, is the face aligned with the stacking-axis which was used in the layer solver.

    Returns [number, number, number][]

    faceOrders array

    Description

    Convert encodings of layer solutions between pairs of faces. Convert from the solver's 1, 2 encoding, where for faces "A B", a value of

    • 1: face A is above face B
    • 2: face A is below face B into the +1/-1 "faceOrders" encoding, as described in the FOLD spec, where:
    • +1: face A lies above face B, on the same side pointed by B's normal.
    • −1: face A lies below face B, on the opposite side pointed by B's normal. hence the additional faces_winding data required for conversion.