Skip to content

V2 Brainstorming #4

Open
Open
@rianadon

Description

After creating this tool and building my first Manuform I've come up with a lot of ideas of what could be done better. Below is a list of what I'm thinking in case anyone has feedback.

Model Generation

  1. Use OpenCascade instead of OpenSCAD. While both are pretty mature, OpenCascade can export STEP files (big win for dropping models into < Your favorite CAD package > and modifying the keyboard) and can model with splines (enables smoother-looking keyboards). And an added bonus is that the models do not have holes!
  2. Use replicad for modeling. I've already shot myself in the foot trying to use OpenCascade directly, and there's no good reason for me to continue doing so. Replicad has great docs & the api has TypeScript types, which makes developing very easy. However, Replicad is lacking many features of OpenCascade, so I will have to fall back on the OpenCascade primitives for advanced features.
  3. Develop in TypeScript. While Clojure's functional programming style works great with this application of building up a 3D model, Typescript autocomplete and its extremely fast compilation (especially with Vite/esbuild) make it a more ideal language. Plus, it will work great with Replicad.

Develop a New Design from (Almost) Scratch

I tried porting the rendering code to use OpenCascade, but it takes an extremely long time to generate (i.e. too long for fast previews), and operations like hulls just don't make a lot of sense in OpenCascade's BREPs (they make more sense for a CSG-based library).
If I'm going to use OpenCascade, I need to rewrite the model to be efficient to generate. Here's how I'm thinking of doing this:

  1. Work with points first. To generate the plates, the current Clojure/SCAD code first generates the wall assembly (which involves drawing skinny cubes at the keypoints of the case boundary taking a few convex hulls) then projects the assembly to the XY Plane. While this fits the geometry-heavy paradigm of OpenSCAD, this approach is not very flexible (V1 is unable to fill in the plate) and leads to time wasted generating geometry that is purely for computation and not modeling. Instead, I should first start by finding the 3D location of every key. Then the 3D location of every keypoint on the wall. Then I take all these points and start drawing geometry whether it be for the walls or the plate...

  2. Eliminate magic. A large chunk of the V1 code is devoted to drawing the webs and the case because the geometry of these parts are all hardcoded for every configuration of thumb cluster. This code is difficult to both interpret and maintain, and it is also inflexible: I'd have to write even more code to accommodate new thumb cluster designs. Instead, the locations of the walls and webs should be computationally generated based on the key locations (which need not even be in a typical manuform shape). I can use triangularization meshing algorithms to create the web.

  3. Caching. Currently operations like generating the hotswap holder are repeated for every single key, which takes up a lot of time. This single model could be cached and copied.

  4. Pre-generation. Models like the hotswap holder are not dependent on any user configuration, so they could be generated in the process of building the website then imported. This will especially help with larger models like trackball holders.

  5. Generate in parallel. Assuming generating the keypoints is fast, every component of the case (key holes, web, case, bottom plate) should be able to be generated in parallel.

  6. Show intermediate results. Generating items like the keyholes should be quite fast, so they can be shown as the case generates to give faster feedback. While this gives results faster, psychologically the intermediate results make the generation step appear to take longer.

  7. CSG as a backup? If these optimizations are unable to bring rendering to a speed fast enough for fast previews, I could use a library like Manifold for CSG that will hopefully not create lots of holes in the model.

Personalization to Hand Shapes

The Manuform is meant to be customizable to the user's hand shape, but it's very intimidating starting at a bunch of offsets and tenting angles and being expected to know what's right for you.

  1. Use Hand Pose Detection to build a hand model. The TensorFlow hand model seems to be promising in creating a model of a hand from video. Asking the user to position their hands in a comfortable position, I could analyze what a good home row layout might be and use the hand model to figure out tenting from there.

  2. Inputs relative to hand. Rather than asking "how many mm left should the H key be next to the J key", I should ask "what angle do you wish to move your wrist and index finger to press the H key?"

  3. Come up with a new name. Even though this model will share many similarities with the Manuform, it's shape & tenting may end up looking different depending on how it's adapted to your hand. It should have a unique name to distinguish itself from the Dactyl Manuform.

User Experience

  1. Multiple Pages: Measuring hands, editing shaping, and configuring keyboard connectors/keycaps are separate processes. They can be split into multiple sections/pages/tabs if there's too much for one page.

  2. Generate Diagrams: Wiring diagrams and perhaps even generate flat PCBs that can be wired together.

  3. Ergogen-inspired editor: If the code is flexible enough to create a keyboard out of any key layout, power users should be able to create any key layout they like. I'm thinking of a tool like ergogen.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions