3d printable Pinephone soft case, written in CadQuery
Go to file
Colin 94bf928388 readme: normalize punctuation 2024-02-08 02:02:17 +00:00
build/web-viewer web-viewer: factor out a "renderWindow.js" helper 2024-02-08 01:14:17 +00:00
doc.in web-viewer: factor out a "renderWindow.js" helper 2024-02-08 01:14:17 +00:00
readme_files README: add photos 2024-02-08 01:01:20 +00:00
src document where to buy the ldtek battery 2024-02-08 01:58:55 +00:00
.gitignore add a Makefile to export the cadquery to stl and gcode 2023-12-28 09:10:09 +00:00
Makefile cq_toplevel.py -> main.py 2024-02-08 01:45:50 +00:00
README.md readme: normalize punctuation 2024-02-08 02:02:17 +00:00
flake.lock init 2023-12-25 23:37:15 +00:00
flake.nix flake: include chromium in the dev env to aid browser automation 2024-02-06 23:50:31 +00:00
main.py cq_toplevel.py -> main.py 2024-02-08 01:45:50 +00:00


this is a 3d-printable case designed for the PinePhone, but implemented with an eye towards generalizing beyond just that model and supporting future phones/preferences alongside this first model.

as an example, the default case (pictured below) includes a pouch for carrying an external battery, but if you don't want the pouch then you can build with CASE_BATTERY=none make.

the battery pouch is the defining feature of this case though. it's a quick solution to achieve all-day battery life without any special requirements from the OS, and it requires no supports to print: it's a simple mesh which prints flat with the rest of the case, but deforms to fit the battery upon installation.


front view side view back view

back view with battery side view with battery phone in hand

for an interactive viewer, see build/web-viewer/index.html. you'll need a browser which supports webGL (e.g. chromium).


  • run nix develop to enter a dev environment
  • or manually install these dependencies:
    • Python3
    • cadquery
    • cq-editor (for interactive viewing/development)


  • make all will produce STLs, gcode, etc in the build/ directory
  • the models can be parameterized with environment variables:
    • CASE_RENDER_PHONE=1 => render not just the case, but also what it would look like with the phone inside
    • CASE_RENDER_PHONE_ONLY=1 => render ONLY the phone, no case
    • CASE_BATTERY=<name> => design the case to fit a specific battery model, or "none"


  • ./main.py --editor or cq-editor ./main.py to load an interactive GUI

    • press the green play button to render the model
    • call with --render-phone to see how the phone would fit inside the case, or apply any of the environment variables from above
  • CadQuery docs may be found here: https://cadquery.readthedocs.io/en/latest/quickstart.html

Bill of Materials

  • print using a flexible material like TPU
  • the "ldtek" battery is sold under a few brands: