Python (build123d) scripts that generate TrackPoint extensions that can be used in DIY keyboards.
- 1. Photos
- 2. Print Instructions
- 3. How to generate customized Extensions
- 4. How to add new TrackPoint models
- 5. Related Resources
- 6. License
Note
I am a complete beginner with 3D printing. So, take my advice below with caution. If you have suggestions on how to do this better, please let me know.
In my experience, resin 3D printers do a much better job than FDM.
At first, I tried two local companies that offered 3D printing services using FDM printers. However, they were not accurate enough to make the extension hole fit the TrackPoints without cutting the hole bigger.
Next, I tried a company that used a resin printer with ABSLike material. This one was much more precise and the adapter hole fit well on the TP, but the material was too soft and cracked under pressure because the wall thickness at the corners was too small.
So, I increased the diameter of the adapter at the bottom of the extension and it worked much better. The current default for the diameter is 5mm, which means the wall thickness at the corners of the adapter hole is approximately 0.8mm.
I would prefer a thicker wall thickness, but my keyboard PCB's TrackPoint hole is only 5.5mm and I can't go bigger. So, if you design your own keyboard I recommend using a bigger hole.
You also have to consider how much space is between your switches, above the PCB. I am using choc switches with the corne stagger and 4mm is working well.
I tried printing it with JLC 3DP and had a very good result. The fit was perfect using a 0.2mm hole increase, but 0.3 also fit.
I used 9000R SLA material, but I think SLA 8228 and MJF PA-12 would also work well due to their low tolerances and relatively high strength.
With JLC you can combine multiple parts into one file with sprues to get around their minimum cost. This way you can order 10 different versions with slightly different hole sizes and heights for approximately $1.30.
You can generate various step files with different options and then run tp_extension_builder combine
to generate one file with multiple designs like in the screenshot below.
But keep in mind that JLC might charge you an extra $1 per combined STL as per their connected parts printing policy.
# Install directly from the repo
pipx install git+https://github.com/infused-kim/kb_trackpoint_extension.git
# Or clone it and install from the directory
git clone https://github.com/infused-kim/kb_trackpoint_extension.git
pipx install ./kb_trackpoint_extension
Note
For macOS Apple Silicon (ARM / M1, M2, M3) users:
This software relies on cadquery-ocp, which is currently not available for Apple Silicon systems on pypi. Instead it has to be installed using a github release wheel.
The pyproject.toml file already takes care of this, but if it fails for whatever reason, you can learn more about how to resolve Apple Silicon issues here.
Once installed you can use the tp_extension_builder
command:
โฏ tp_extension_builder -h
Usage: tp_extension_builder [OPTIONS] COMMAND [ARGS]...
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --install-completion Install completion for the current shell. โ
โ --show-completion Show completion for the current shell, to copy โ
โ it or customize the installation. โ
โ --help -h Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Commands โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ build Creates a trackpoint extension model for 3d printing. โ
โ build-kicad-model Creates a 3D model of the extension and cap that can be used โ
โ in KiCad. The model is positioned at the mounting distance. โ
โ combine Combines multiple step files into one (optionally) โ
โ sprued file. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
And you can customize a lot of the extension values through command line parameters:
โฏ tp_extension_builder build -h
Usage: tp_extension_builder build [OPTIONS] TRACKPOINT_MODEL:{red_t460s|green_
t430|blue_x1_carbon}
Creates a trackpoint extension model for 3d printing.
โญโ Arguments โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ * trackpoint_model TRACKPOINT_MODEL:{red_t460s|green_t430|blu The TrackPoint model [default: None] โ
โ e_x1_carbon} [required] โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --export-path -e PATH The path where the 3D โ
โ models should be exported โ
โ to โ
โ [default: โ
โ exports/tp_extension_<tp_โฆ โ
โ --export-format -f [step|stl] The format for the export. โ
โ [default: step] โ
โ --overwrite --ask-before-overwriting The format for the export. โ
โ [default: โ
โ ask-before-overwriting] โ
โ --interactive -i --not-interactive Don't export a file and โ
โ instead display the model โ
โ in VSCode OCP Viewer. โ
โ [default: not-interactive] โ
โ --mounting-distance,--md FLOAT This allows you to specify โ
โ how far below the PCB your โ
โ TrackPoint is mounted. โ
โ This refers to the bottom โ
โ of the white TrackPoint โ
โ stem. So if you mount the โ
โ TrackPoint flush against โ
โ the PCB, you would use 0.0 โ
โ and if you mount it below โ
โ the hotswap sockets, you โ
โ would use 1.85 or 2.00. โ
โ [default: 0.0] โ
โ --cap-height,--ch FLOAT The height above the PCB โ
โ where the top of the red โ
โ cap should end up. This is โ
โ NOT the total height of โ
โ the extension, because the โ
โ red cap adds a little bit โ
โ of height and because a โ
โ portion of the extension โ
โ will be within or below โ
โ the PCB. The default value โ
โ is the keycap height for โ
โ Khail Choc switches. โ
โ [default: 10.5] โ
โ --pcb-height,--ph FLOAT Adjust the thickness of โ
โ your keyboard PCB to โ
โ ensure the total height โ
โ above the PCB is correct โ
โ [default: 1.6] โ
โ --space-above-pcb,--sap FLOAT Specify how much space you โ
โ have above PCB for the โ
โ thicker part of the โ
โ extension adapter. This is โ
โ the space between the PCB โ
โ and anything above it that โ
โ might be in the way, such โ
โ as a switch plate. On โ
โ Khail Choc boards without โ
โ a switch plate, you have โ
โ 2.2mm until the switch โ
โ plate notch, for example. โ
โ [default: 2.2] โ
โ --width-below-pcb,--wbp FLOAT Specify the max width โ
โ (diameter) of the โ
โ extension below and within โ
โ the PCB. This should be โ
โ slightly smaller than your โ
โ TrackPoint PCB hole. โ
โ [default: 5.0] โ
โ --width-above-pcb,--wap FLOAT Specify the max width โ
โ (diameter) of the โ
โ extension above the PCB. โ
โ This should be smaller โ
โ than the space available โ
โ between your switches. โ
โ Keep in mind that the โ
โ stagger of the keys can โ
โ significantly affect the โ
โ available space. โ
โ [default: 4.0] โ
โ --width-extension,--we FLOAT Specify the max width โ
โ (diameter) of the โ
โ extension between the โ
โ adapter and the tip. This โ
โ should be smaller than the โ
โ distance between the โ
โ switches at their widest โ
โ point (plate notch) and โ
โ smaller than the โ
โ TrackPoint hole in your โ
โ switch plate. โ
โ [default: 2.0] โ
โ --cap-model,--cm [red_t460s|green_t430|blu Create the extension with โ
โ e_x1_carbon] a tip that fits a โ
โ different TrackPoint โ
โ model's red cap. For โ
โ example, create an โ
โ extension for the green โ
โ T430 TrackPoint that would โ
โ be used with the smaller โ
โ T460S cap. โ
โ [default: None] โ
โ --adapter-hole-increase,-โฆ FLOAT In 3D printing holes โ
โ frequently end up being โ
โ smaller than specified. โ
โ This allows you to โ
โ compensate for it by โ
โ increasing the TrackPoint โ
โ adapter hole. โ
โ [default: 0.2] โ
โ --help -h Show this message and โ
โ exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
A best practice is to create virtual python environments for different purposes and projects. I recommend using pyenv and pyenv-virtualenv for that purpose.
Here is an example setup...
# Clone the repo
git clone [email protected]:infused-kim/kb_trackpoint_extension.git
# cd into the repo directory
cd kb_trackpoint_extension
# Install python
pyenv install 3.11
# Create a new environment
pyenv virtualenv 3.11 build123d
# Activate the environment
pyenv activate build123d
# Make it the default environment for the current directory
# so that it activates whenever you cd into it.
pyenv local build123d
# Install tp_extension_builder in edit mode so that new changes
# are automatically reflected in the CLI app.
pip install -e .[dev]
You have to edit the following files:
tp_extension_builder/tp_extensions.py
-> Duplicate one of the exsting extension classes and adjust the values.tp_extension_builder/tp_caps.py
-> Duplicate one of the exsting cap classes and adjust the values.tp_extension_builder/cli_helpers.py
-> Add the new TP model to the TrackPointModel class.Makefile
-> Add the new TP model toTRACKPOINT_MODELS_VALUES
.
After that the CLI should automatically pick up the new TrackPoint model.
TLDR:
- Personal use with attribution
- Commercial use not allowed
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.