{"id":13838028,"url":"https://github.com/geoffder/dometyl-keyboard","last_synced_at":"2025-04-09T09:06:14.306Z","repository":{"id":46008178,"uuid":"358959565","full_name":"geoffder/dometyl-keyboard","owner":"geoffder","description":"A parametric generator for designing split, concave, ergonomic keyboards written in ocaml.","archived":false,"fork":false,"pushed_at":"2024-01-19T05:47:01.000Z","size":119833,"stargazers_count":256,"open_issues_count":1,"forks_count":28,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T05:10:03.465Z","etag":null,"topics":["3d-models","3d-printing","ergonomic-keyboard","ergonomics","keyboard","ocaml","openscad","parametric","split-keyboard"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geoffder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-models.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"geoffder"}},"created_at":"2021-04-17T18:59:04.000Z","updated_at":"2025-04-01T12:39:41.000Z","dependencies_parsed_at":"2024-09-29T06:51:06.481Z","dependency_job_id":null,"html_url":"https://github.com/geoffder/dometyl-keyboard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffder%2Fdometyl-keyboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffder%2Fdometyl-keyboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffder%2Fdometyl-keyboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geoffder%2Fdometyl-keyboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geoffder","download_url":"https://codeload.github.com/geoffder/dometyl-keyboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008629,"owners_count":21032556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-models","3d-printing","ergonomic-keyboard","ergonomics","keyboard","ocaml","openscad","parametric","split-keyboard"],"created_at":"2024-08-04T15:01:34.076Z","updated_at":"2025-04-09T09:06:14.280Z","avatar_url":"https://github.com/geoffder.png","language":"OCaml","funding_links":["https://github.com/sponsors/geoffder"],"categories":["OCaml"],"sub_categories":[],"readme":"# Dometyl Keyboard\n\n![Splaytyl Build](things/splaytyl/images/splaytyl_both.jpeg)\n\n## Another Dactyl inspired keyboard. Supporting MX, Choc, and even rubber domes.\nThis is a library for generating paramaterized split-hand, concave, columnar,\nergonomic keyboards in the spirit of the\n[Dactyl](https://github.com/adereth/dactyl-keyboard), but written from the\nground up in [ocaml](https://ocaml.org/), rather than\n[clojure](https://clojure.org). **Dometyl** also takes inspiration from a\nlineage of **Dactyl-like** keyboards that evolved from the original script,\nincluding the [Compactyl](https://github.com/dereknheiley/dactyl-manuform-tight)\nitself a fork of forks of dactyl-manuform keyboards with many accumulated\nfeatures, and the [Skeletyl](https://github.com/Bastardkb/Skeletyl), a sleak,\nlow-profile, open-case design built in\n[Fusion360](https://www.autodesk.ca/en/products/fusion-360/overview).\n\nThe name **(rubber) dometyl** comes from this library's introduction of a means\nof building split-hand concave keyboards with rubber domes. Taking advantage of\nthe readily available [Niz housing and\nsliders](https://www.nizkeyboard.com/products/2019-new-niz-ec-switch), and\nthird-party non-sheet rubber domes (e.g. [DES BKE\nDOMES](https://www.apexkeyboards.ca/products/des-domes-bke-tactile)), we can\nbuild dome-with-slider switches of our own without canabilizing an existing\nTopre or Niz board. You may be thinking that we still need expensive to obtain\nconical springs, and difficult to design (and *very* difficult to make use of\ninside a curved case) electro capacitive sensing PCBs to complete the picture,\nbut then you would be wrong! One need simply glue magnets to sliders, and glue\n[hall-effect sensors](https://www.diodes.com/assets/Datasheets/AH3572.pdf) into\na case, and *voila* the rubber dometyl is born.\n\n![niztyl - gone topless](things/niztyl/images/topless.jpg)\n\nThe relevant code for generating the required keyhole can be found in the [Niz\nmodule](lib/niz.ml), the first example of a board\nconfiguration using them [here](models/examples/niztyl.ml), and the build\nshowcase for it [here](things/legacy/niztyl).\n\nOf course, if you aren't an insane person, the dometyl generator also supports\nmore civilized Mx and Choc switch options.\n\n## Setup\nThis generator is written in [ocaml](https://ocaml.org/), so you'll need to get\nan environment set up, including the package manager\n[opam](https://opam.ocaml.org/) and the build system\n[dune](https://github.com/ocaml/dune) (which we'll install through opam). You'll\nof course also want [OpenSCAD](https://openscad.org/) to preview/render/export\nthe generated models (see [OpenSCAD configuration](#openscad-configuration) for tips).\n\nAfter installing `opam`, and confirming that you are in this branch, you can run\nthe [setup.sh](setup.sh) script for convenience, or follow the instructions\nunder the [opam dependencies](#opam-dependencies) sub-section.\n\n### opam dependencies\nAll dependencies are available from the opam package manager including the build\nsystem [dune](https://github.com/ocaml/dune), and of course\n[OCADml](https://github.com/OCADml/OCADml),\n[OSCADml](https://github.com/OCADml/OSCADml)\nand [ppx_deriving_cad](https://github.com/OCADml/ppx_deriving_cad) for the\nmodelling. I'd also recommend that you pick up the listed dev tools (which\nyou'll want to get the corresponding packages/plugins for in your editor of\nchoice).\n\n**Required:**\nFrom this folder (repo root):\n* `opam install . --deps-only --with-doc`\n* `dune build`\n\n**Highly recommended for dev experience:**\n* `opam install merlin ocp-indent ocaml-lsp-server ocamlformat ocamlformat-rpc`\n\n## OpenSCAD configuration\nIt is **highly recommended** that you use a [development snapshot](https://openscad.org/downloads.html) of OpenSCAD,\nrather than whatever version your package manager may have for you. Then under\nthe `Features` tab in `Edit/Preferences` and check the following:\n- `fast-csg`, `fast-csg-trust-corefinement`, `fast-csg-remesh`,\n  `fast-csg-remesh-predictability`, `lazy-union`, `vertex-object-*`\nThe newly added `fast-csg` and related features speed up rendering considerably,\nmaking the development cycle much more pleasant\n\n## Documentation\nAPI documentation and usage guides are available\n[online](https://geoffder.github.io/dometyl-keyboard/dometyl/index.html).\n\n## Usage\n1. Make a new `.ml` file in [models](models), maybe\n   starting with a copy of and existing one and and modifying it to suit your\n   preferences / fit your hand.\n2. Modify [main.ml](models/main.ml), adding lines to generate and write\n   your case models/parts to file with `Scad.to_file`.\n3. Run your [main.ml](models/main.ml) with `dune build @models` from the [dometyl](dometyl)\n   project folder. Any `.scad` files produced will then appear in the\n   [models](models/scads) directory. For a more fluid experience, you\n   can install `fswatch` (cross-platform) or `inotify` (GNU/linux) on your\n   system, and use `dune build -w @models` to automatically build and execute on\n   file changes.\n4. Open generated `.scad` files in OpenSCAD where they can be\n   previewed/rendered/exported to `.stl`. If a viewed `.scad` is overwritten by\n   compiling and running the generator, the changes will be visible in the GUI.\n\n### Direct Export\n`dune build @export_models` is also made available for convenient batch `stl`\nexport. When run, this rule will call out to the `openscad` cli (assumed to be\ninstalled on your system) to asynchronously export *all* of the `scad` files in\n[models](models/scads) directory to `stl` models in the\n[models](models/stls) directory at once.\n\n**Note:**\n- Enabling `fast-csg` and the like is not currently supported by the `OSCADml`\n  CLI helpers.\n- STL export can take quite a while (which is why this can be helpful) and\n consume a lot of resources, so one should be mindful of what one is signing up\n for by building this rule.\n- Unfortunately, CLI export sometimes fails in CGAL when the same model would\n pass via the GUI.\n\n## Example Output\n* An uglier [recreation](models/examples/skeletyl.ml) (yellow) of the\n  [BastardKB Skeletyl v4](https://github.com/Bastardkb/Skeletyl) (purple).\n  ![bk skeletyl comparison](assets/images/bk_skeletyl_mimic.png)\n  This configuration can be a good place to start if what you are looking for is\n  minor tweaks to more \"standard\" dactyl-like curvatures and offsets (or you want hotswap\n  sockets).\n* Configurable heat-set insert screw holes, magnet insets, or bumpon feet can be\n  placed at the base of walls of your choosing ![splaytyl bumpon\n  view](assets/images/splaytyl_bumpon.png)\n* Base plates and configurable tents can be generated to fit your case, using\n  either screws (into brass insets in the case), or magnets for mounting.\n  ![splaytyl bottom plate](assets/images/splaytyl_bottom_plate.png)\n  ![splaytyl tent](assets/images/splaytyl_tent.png)\n\n## Builds / STLs\nThere is a showcase of finished builds and some example STLs [here](things), including some\npictures, bills of materials, and notes. If you've designed and built a board\nwith the dometyl generator, and you are happy with it, please consider contributing the\nconfiguration to the [models](models) directory, and adding a folder\nto the [boards showcase](things).\n\n## MCU / TRRS jack holders\n* A few solutions for MCU (elite-C and pro-micro currently) and TRRS jack\n  mounting are available at the moment. Rough placement is done with the help of\n  coordinates kept within the records of the `Case.t` type, with offset and\n  rotation parameters available to fine-tune.\n* Firstly, there is support for using the familiar slot-in trays from\n  [dereknheiley](https://github.com/dereknheiley/dactyl-manuform-tight)\n  (reversible, elite-C without and without reset button access) and\n  [carbonfet](https://github.com/carbonfet/dactyl-manuform) (non-reversible,\n  elite-C and pro-micro). Eventually a more tailored tray holder that should be\n  available, but these existing stls can get the job done today.\n* Second, the [BastardKB shield\n  pcb](https://github.com/Bastardkb/Elite-C-holder) used in the\n  [Skeletyl](https://github.com/Bastardkb/Skeletyl) (as well Quentin's other\n  boards) is supported as well. In addition to making the required insets/holes\n  in the case, the included helper functions will place configurable eyelets for\n  heatset inserts for mounting. ![BK shield\n  side-view](assets/images/bk_shield_demo_side_view.png) ![BK shield\n  under-view](assets/images/bk_shield_demo_under_view.png)\n  Some time ago, I ordered way too many of these off of JLCPCB, so if you are in\n  NA, something could likely be arranged! Alternatively, if would like to use\n  this mounting method rather than one of the trays, and you don't want get PCBs\n  made, there is an [stl](assets/mcu_holders/bastardkb/printable_shield_right.stl)\n  available which you can print and solder your components around / glue to.\n* When using one of the trays, be mindful that the rails/slots are cut nicely in\n  the wall, and for an option that cuts ports into the wall, be sure that they\n  don't start too far away from the outside, so that the plugs will be able to\n  reach. `Walls.make` has an `index_scale` parameter so that these\n  holder-relevant walls can be tuned separately from the rest to adapt to your\n  chosen mounting method.\n\n## The Hand\n![Hand](assets/images/hand_example.png)\nThere is an as yet undocumented (and subject to evolution) [Hand\nmodule](lib/hand.ml) available to play around with. One can\ngenerate hand from knuckle (base of proximal bones, or the meta-carpal for the\nthumb) offset coordinates and bone lengths, then pose it with the available\nflexion/extension/abduction/adduction/etc functions, and place it over the home\nrow of a generated `Plate.t`. Hopefully this can help give you a sense of what\ncolumn offsets and curvatures are going to work for you before you commit to a\ntest print.\n\n## Troubleshooting\nNow and then, when you attempt to render a model, part of it will disappear.\nThis is due to my imperfect abuse of\n[OpenSCAD\npolyhedrons](https://en.m.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#polyhedron),\nwhich can sometimes self-intersect despite the so-far built-in preventative\nefforts. The walls (from keyholes to the ground) and the connections between the\nwalls both use polyhedrons so they are prone to breaking in this manner.\n\nWhen this happens, and more than one piece of the case disappears (e.g. all of the\nconnections between the walls), it can be useful to narrow down which part(s) in\nparticular caused it, since it isn't necessarily all of them that have gone bad.\nTo help with this, you can use **Thrown Together** mode in the OpenSCAD GUI\n(found in the **View** menu, or activated by hitting **F12**), which will show\npink where you can see into the inside of any shapes (unclosed mesh).\n\nGenerally, you should be able to fix the problem by adjusting the parameters\nused for drawing the polyhedrons in question, such as scaling walls to prevent\nthem overlapping with eachother, adjusting resolution with `~fn` parameters, etc.\n\n## Contributing\nContributions extending the functionality of the library (in addition to board\nconfigurations as mentioned above) are welcome. If you plan to make a PR, please\nhave autoformatting working with your editor working (using the `.ocamlformat`\nprofile included in this repo) beforehand, and ammend/write doc comments in the\nrelevant interface files (already not 100% as is).\n\n## License\nCopyright © 2023 Geoff deRosenroll\n\nThe source code for generating the models is distributed under the [GNU AFFERO\nGENERAL PUBLIC LICENSE Version 3](LICENSE.md).\n\nThe generated models are distributed under the [Creative Commons\nAttribution-ShareAlike 4.0 International (CC BY-SA 4.0)](LICENSE-models.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoffder%2Fdometyl-keyboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeoffder%2Fdometyl-keyboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeoffder%2Fdometyl-keyboard/lists"}