Created
September 11, 2026 19:15
-
-
Save exupero/02c8efecf0efb12d21173d44cee19040 to your computer and use it in GitHub Desktop.
3D printed PocketMod wallet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* ========================================================= | |
| PocketMod EDC Case — parametric snap-together clamshell | |
| --------------------------------------------------------- | |
| Two separate parts: | |
| - a RIGID base tray (print in PLA/PETG) that the folded | |
| paper sits in, and doubles as a hard writing surface. | |
| - a FLEXIBLE lid (print in TPU) that stretches on as a | |
| snug sleeve over the base, holding the paper down by | |
| compression (no retention nibs needed) and sealing | |
| against moisture better than a rigid snap-on lid. | |
| Both parts are chamfered around their top AND bottom edges | |
| by the same amount, so each part stays front/back symmetric. | |
| That's what lets the lid go on over either end of the base, | |
| and what makes the whole thing slide smoothly into and out | |
| of a pocket regardless of which way it's facing. | |
| HOW TO USE: | |
| 1. Open this file in OpenSCAD (free, openscad.org). | |
| 2. Measure YOUR folded PocketMod (length, width, and | |
| stack thickness with calipers) and update the values | |
| in the "Paper" section below. | |
| 3. Set `part` to "base", render (F6), export STL. | |
| 4. Set `part` to "lid", render (F6), export STL. | |
| 5. Print the base in PLA/PETG, normal settings. | |
| Print the lid in TPU — see the printing notes below. | |
| 6. Test-fit the base first with your paper. Tweak `clr` if | |
| needed. Then test the lid over the base and tweak | |
| `lid_clr` (can go negative — see notes) for the stretch | |
| fit you want. | |
| PRINTING THE LID IN TPU: | |
| - Use a firmer shore hardness (≈95A) if you can — softer | |
| TPU (85A) is much harder to feed reliably, especially on | |
| Bowden-style extruders. Direct-drive handles either fine. | |
| - Slow down: ~20-25 mm/s print speed. TPU is forgiving of | |
| almost everything except speed. | |
| - Minimize retraction (short distance, low speed) — TPU | |
| is compressible, so long/fast retractions cause skipped | |
| steps or grinding rather than clean retracts. A little | |
| stringing is a smaller problem than a jam. | |
| - No supports needed: the design tapers outward from the | |
| bed at the bottom chamfer (a self-supporting flare), and | |
| the lid is open at the bottom the same way the base tray | |
| is open at the top. | |
| - Infill barely matters here — walls make up nearly all of | |
| the part's thickness. 2-3 walls, any infill %, is plenty. | |
| - This part is meant to be an interference (stretch) fit — | |
| see `lid_clr` below, which defaults to a small negative | |
| value on the assumption you're printing it in TPU. If you | |
| print the lid in a rigid filament instead, change `lid_clr` | |
| back to a small positive number (e.g. 0.3) or it won't | |
| go on at all. | |
| ========================================================= */ | |
| /* [Paper — measure YOUR folded PocketMod and adjust] */ | |
| pm_l = 110; // folded length, long edge (mm). US Letter ≈108, A4 ≈105 | |
| pm_w = 72; // folded width, short edge (mm). US Letter ≈70, A4 ≈74 | |
| pm_t = 2; // thickness of the folded paper stack (mm) — measure with calipers, | |
| // this varies a lot with paper weight, so don't skip this | |
| /* [Fit tolerances] */ | |
| clr = 0.35; // clearance around the paper, per side | |
| wall = 1.8; // wall thickness | |
| corner_r = 4; // outer corner radius | |
| inner_r = 2; // paper-cavity corner radius | |
| cham = 1.0; // edge chamfer size (top & bottom, both parts). | |
| // Keep this noticeably smaller than `wall` — the | |
| // wall thins by roughly this much right at the | |
| // very edge, so cham ≈ wall or larger risks a | |
| // knife-thin, hard-to-print rim. | |
| /* [Base tray — rigid, PLA/PETG] */ | |
| floor_base = 2.4; // base floor thickness = your rigid writing surface | |
| lip_h = pm_t + clr + 1.4; // base wall height (covers paper stack + margin) | |
| /* [Lid — flexible, TPU] */ | |
| lid_clr = -0.2; // clearance: lid inner wall vs base outer wall. | |
| // Negative = interference/stretch fit, relies on | |
| // TPU's elasticity. Set to +0.3 if printing rigid. | |
| lid_floor = 1.6; // lid floor thickness (a bonus second hard-ish surface) | |
| lid_wall_h = lip_h + floor_base - 1.0; // lid skirt height, covers the base | |
| /* [Render] */ | |
| part = "both"; // "base" | "lid" | "both" (both = side-by-side preview, export one at a time) | |
| gap = 8; | |
| $fn = 48; | |
| // ---- derived sizes ---- | |
| base_outer_w = pm_w + 2*clr + 2*wall; | |
| base_outer_l = pm_l + 2*clr + 2*wall; | |
| module rounded_rect(w, l, r, h) { | |
| hull() { | |
| for (x = [-1, 1]) | |
| for (y = [-1, 1]) | |
| translate([x*(w/2 - r), y*(l/2 - r), 0]) | |
| cylinder(r = r, h = h); | |
| } | |
| } | |
| // A rounded-rect prism of height h, with symmetric chamfers cut | |
| // into its top and bottom edges by amount `c`. Straight-walled in | |
| // the middle, tapered at both ends — keeps the part front/back | |
| // symmetric so it doesn't matter which end faces which way. | |
| module chamfered_block(w, l, r, h, c) { | |
| r_in = max(r - c, 0.3); | |
| // bottom taper | |
| hull() { | |
| translate([0, 0, 0]) | |
| rounded_rect(w - 2*c, l - 2*c, r_in, 0.001); | |
| translate([0, 0, c]) | |
| rounded_rect(w, l, r, 0.001); | |
| } | |
| // straight midsection | |
| translate([0, 0, c]) | |
| rounded_rect(w, l, r, h - 2*c); | |
| // top taper | |
| hull() { | |
| translate([0, 0, h - c]) | |
| rounded_rect(w, l, r, 0.001); | |
| translate([0, 0, h]) | |
| rounded_rect(w - 2*c, l - 2*c, r_in, 0.001); | |
| } | |
| } | |
| module base_tray() { | |
| total_h = floor_base + lip_h; | |
| difference() { | |
| chamfered_block(base_outer_w, base_outer_l, corner_r, total_h, cham); | |
| translate([0, 0, floor_base]) | |
| rounded_rect(pm_w + 2*clr, pm_l + 2*clr, inner_r, lip_h + 1); | |
| } | |
| } | |
| module lid_shell() { | |
| lid_outer_w = base_outer_w + 2*lid_clr + 2*wall; | |
| lid_outer_l = base_outer_l + 2*lid_clr + 2*wall; | |
| lid_h = lid_floor + lid_wall_h; | |
| difference() { | |
| chamfered_block(lid_outer_w, lid_outer_l, corner_r + wall, lid_h, cham); | |
| translate([0, 0, lid_floor]) | |
| rounded_rect(base_outer_w + 2*lid_clr, base_outer_l + 2*lid_clr, corner_r, lid_wall_h + 1); | |
| } | |
| } | |
| if (part == "base") { | |
| base_tray(); | |
| } else if (part == "lid") { | |
| lid_shell(); | |
| } else { | |
| translate([-base_outer_w/2 - gap/2, 0, 0]) base_tray(); | |
| translate([(base_outer_w + 2*lid_clr + 2*wall)/2 + gap/2, 0, 0]) lid_shell(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment