Module Dometyl.Key

module Face : sig ... end

An outer face of a keyhole.

module Faces : sig ... end
type config = {
  1. outer_w : float;
  2. outer_h : float;
  3. inner_w : float;
  4. inner_h : float;
  5. thickness : float;
  6. clip : OSCADml.Scad.d3 -> OSCADml.Scad.d3;
  7. cap_height : float;
  8. clearance : float;
  9. corner : OCADml.Path3.Round.corner option;
  10. fn : int option;
}
type t = {
  1. config : config;
  2. scad : OSCADml.Scad.d3;
  3. origin : OCADml.V3.t;
  4. faces : Faces.t;
  5. cap : OSCADml.Scad.d3 option;
  6. cutout : OSCADml.Scad.d3 option;
}
val translate : OCADml.V3.t -> t -> t
val xtrans : float -> t -> t
val ytrans : float -> t -> t
val ztrans : float -> t -> t
val rotate : ?about:OCADml.V3.t -> OCADml.V3.t -> t -> t
val xrot : ?about:OCADml.V3.t -> float -> t -> t
val yrot : ?about:OCADml.V3.t -> float -> t -> t
val zrot : ?about:OCADml.V3.t -> float -> t -> t
val axis_rotate : ?about:OCADml.V3.t -> OCADml.V3.t -> float -> t -> t
val quaternion : ?about:OCADml.V3.t -> OCADml.Quaternion.t -> t -> t
val scale : OCADml.V3.t -> t -> t
val xscale : float -> t -> t
val yscale : float -> t -> t
val zscale : float -> t -> t
val mirror : OCADml.V3.t -> t -> t
val affine : OCADml.Affine3.t -> t -> t
val rotate_about_origin : OCADml.V3.t -> t -> t

rotate_about_origin r t

Rotate the keyhole t about its origin by the (euler) angles r.

val quaternion_about_origin : float -> t -> t

quaternion_about_origin a t

Rotate the keyhole t about its normal by a radians.

val cycle_faces : t -> t

cycle_faces t

Swap the faces of the keyhole t in the clockwise direction.

val orthogonal : t -> [< `East | `North | `South | `West ] -> OCADml.V3.t

orthogonal t side

Compute the orthogonal of the face at the given side of keyhole t.

val normal : t -> OCADml.V3.t

normal t

Compute the normal of the plane that the keyhole t rests on.

val make : ?render:bool -> ?cap:OSCADml.Scad.d3 -> ?cutout:OSCADml.Scad.d3 -> config -> t
val mirror_internals : t -> t

mirror_internals t

Mirror interal cutouts/shapes of the keyhole t.

val to_scad : t -> OSCADml.Scad.d3

to_scad t

Obtain the final scad from the keyhole t, subtracting out the cutout if there is one.