Module Plate.Lookups

Provides per-column lookup functions to be used by make for placement of Key.ts to form Column.ts, and for arrangment and orientation of the generated columns to form the plate.

type t = {
  1. offset : int -> OCADml.V3.t;
    (*

    Translation of columns following default spacing and tenting.

    *)
  2. curve : int -> Curvature.t;
    (*

    Distribution of Key.ts to form the columns

    *)
  3. swing : int -> float;
    (*

    Rotation around columnar y-axis, which can emulate row curvature, adding to or subtracting from rotation due to tenting.

    *)
  4. splay : int -> float;
    (*

    Rotation around columnar z-axis (origin of centre_row key). Applying splay will always have to go hand in hand with adjustments to offset to end up with something sensible.

    *)
  5. rows : int -> int;
    (*

    Number of keys to distribute for the given column.

    *)
  6. centre : int -> float;
    (*

    Relative centre key index for the given column. Used by key distribution functions, namely Curvature.place. Relevant to thumb_curve and Lookups.t.curve.

    *)
}

Record containing the column generation and placement functions. When each column is being generated (and placed) its index will be given to the lookup functions here to get the relevant settings.

val default_offset : int -> OCADml.V3.t
val default_curve : int -> Curvature.t
val default_swing : int -> float
val default_splay : int -> float
val default_rows : int -> int
val default_centre : int -> float
val body : ?offset:(int -> OCADml.V3.t) -> ?curve:(int -> Curvature.t) -> ?swing:(int -> float) -> ?splay:(int -> float) -> ?rows:(int -> int) -> ?centre:(int -> float) -> unit -> t

body ?offset ?curve ?swing ?splay ?rows ?centre ()

Optionally provide each of the functions to overide the defaults. See t for overview of what each one is used for.

val thumb : ?offset:(int -> OCADml.V3.t) -> ?curve:(int -> Curvature.t) -> ?swing:(int -> float) -> ?splay:(int -> float) -> ?rows:(int -> int) -> ?centre:(int -> float) -> unit -> t

thumb ?offset ?curve ?swing ?splay ?rows ?centre ()

Same as body, but the resulting columns are rotated pi / 4 to account for typical thumb cluster placement (matters for subsequent steps of Case.t construction).