AdaCAD Library Documentation - v1.1.4
    Preparing search index...
    Index

    Constructors

    • Returns TwoD

    Methods

    • Returns TwoD

    • Parameters

      • j: number

      Returns TwoD

    • Parameters

      • i: number

      Returns TwoD

    • converts the current state to a drawdown format

      Returns Drawdown

    • fills a rectangle of given size with the current state. If the rectangle specified is smaller than state, it crops the current state

      Parameters

      • w: number

        the width

      • h: number

        the hieght

      Returns TwoD

    • Parameters

      • i: number
      • j: number

      Returns number

    • Parameters

      • j: number

      Returns number[]

    • Parameters

      • i: number

      Returns number[]

    • clears the current state (if any) and creates a new 2D Sequence Object from a DD

      Parameters

      Returns TwoD

    • uses the current state to populate a new space, but only upon a certain set of warps and wefts.

      Parameters

      • weftsys: number[]

        the weft system upon which to map this draft

      • warpsys: number[]

        the warp system upon which to map this draft

      • weft_system_map: OneD

        the pattern of weft systems along the wefts

      • warp_system_map: OneD
      • ends: number

        the number of ends required in the output structure (based on the lcm of input warps)

      • pics: number

        the number of picks required in the output structure (based on the lcm of input wefts)

      Returns TwoD

    • used to assign a structure to every weft system associated with a given warp system

      Parameters

      • warpsys: number[]
      • weft_system_map: OneD
      • warp_system_map: OneD
      • ends: number
      • pics: number

      Returns TwoD

    • used to handle layers that are composed only of floats, this function writes this stored sequence accross all warp systems

      Parameters

      • weftsys: number[]
      • weft_system_map: OneD
      • warp_system_map: OneD
      • ends: number
      • pics: number

      Returns TwoD

    • places the non unset values from seq atop any unset values in the current state. It will also make the two sequences compatable sizes by repeating their original values.

      Parameters

      • seq: TwoD
      • consider_heddle_down_as_unset: boolean

      Returns TwoD

    • given a current warp and weft system, as well as a list of the weft and warp systems that have been assigned to layers "above" the current warp and weft system, this function will ensure that structures are assigned such that they fall just under the previous layers in the layer stack

      Parameters

      • cur_warp_sys: number[]

        the current warp systems we are considering

      • warp_sys_above: number[]

        the warp systems that have been used in previous layers above this layer

      • cur_weft_sys: number[]

        the current weft systems we are considering

      • weft_sys_above: number[]

        the weft systems that have been used in previous layers above this layer

      • weft_system_map: OneD

        a map of the weft systems used in this draft

      • warp_system_map: OneD

        a map of the warp systems used in this draft

      Returns TwoD

    • adds a row to the first (or subsequent row) of the 2D sequence

      Parameters

      • seq: number[]

        the 1D sequence value to add

      Returns TwoD

    • adds a col to the first (or subsequent col) of the 2D sequence

      Parameters

      • seq: number[]

        the 1D sequence value to add

      Returns TwoD

    • this sets the value at a given location specified by i and j This function will only succesfully set a value if the current value in that place is "unset", otherwise it returns an error that it is attempting to overwrite a value

      Parameters

      • i: number
      • j: number
      • val: number
      • can_overwrite_set: boolean

      Returns TwoD

    • Parameters

      • val: number | boolean = 2

      Returns TwoD

    • looks at the given warp. Sets any unset value in this warp to the value provided to the function

      Parameters

      • j: number
      • val: number

      Returns TwoD

    • looks at the given weft. Sets any unset value in this weft to the value provided to the function

      Parameters

      • i: number
      • val: number

      Returns TwoD

    • adds this weft to the front of the pattern

      Parameters

      • seq: number[]

        the 1D sequence value to add

      Returns TwoD

    • adds this weft to the front of the pattern

      Parameters

      • seq: number[]

        the 1D sequence value to add

      Returns TwoD

    • Returns number

    • Returns number