concertina /
3d
Neale Pickett
·
2026-02-06
cherry_mx.scad
1/**
2a cherry mx switch.
3
4most of the measurements done with a caliper. some taken from
5http://geekhack.org/index.php?topic=47744.0
6
7This is just to illustrate and to drop in a a gross reference. It is mostly artistic apart from the steam and mounting plate dimensions
8*/
9
10// move the whole thing 3mm to give the empty space in usual keycaps.
11// that is, the extra space inside a keycap female connector.
12// i do that since i create all my keycaps with 0,0,0 being the internal base of the keycap
13module switch() {
14 //1. steam
15 color("brown"){
16 //1.1. l-r tab is 1.35mm
17 translate([0,0,-3.62/2])
18 cube([1.35,4.5,3.62], center=true);
19 //1.2. f-b tab is 1.15mm. it has a smal notch that i will ignore.
20 translate([0,0,-3.62/2])
21 cube([4.5,1.15,3.62], center=true);
22 //1.3. base. it has a chamfered top that i will ignore.
23 translate([0,0,-5.62])
24 cube([7.2,5.56,4], center=true);
25 }
26 // 2. top
27 color("grey"){
28 difference(){
29 // make a trapezoid with the general shape (volume?) of the top
30 hull(){
31 translate([0,0,-4]) //distance from top of switch... some i measured 3.9 others 4.2... so leaving at 4
32 cube([9.87,10.62,0.1], center=true);
33 translate([0,0,-4 -5.2]) // bottom has a measured 5.3... so move 5.2 and use the 0.1 bellow
34 cube([14.58,14.58,0.1], center=true);
35 }
36
37 // and subtract:
38 // the front led. NOTE: totally off... measured by eye. just for astetics
39 // adding just so there is a visual cue of the direction
40 translate([0,-4.7,-6])
41 cylinder(r=3/2, h=6, center=true);
42 translate([0,-5.5,-6])
43 cube([8,4,5], center=true);
44 // the four corners
45 // TODO waste of time? this is all for looks, you shouldn't invade any of that space anyway...
46 }
47 }
48
49 // 3. bottom
50 color("green")
51 // 3.1 main body volume
52 hull(){
53 translate([0,0,-4 -5.3]) //steam + top
54 cube([13.98,13.98,0.1], center=true);
55 translate([0,0,-4 -5.3 -2.2]) //steam + top + straigth part
56 cube([13.98,13.98,0.1], center=true);
57 translate([0,0,-4 -5.3 -5.5]) //steam + top + bottom (measured 5.5)
58 cube([12.74,13.6,0.1], center=true);
59 }
60 // 3.2 tabs
61 // note: only measured the lenght, if they are slightly off-center, this will be all wrong :)
62 color("black")
63 difference(){
64 translate([0,0,-4 -5.3 -0.82/2]) //steam + top
65 cube([15.64,15.64,0.82], center=true);
66 translate([0,0,-4 -5.3 -0.82/2 ]) // front-back cut
67 cube([5.64,20,0.82 +2], center=true);
68 translate([0,0,-4 -5.3 -0.82/2 ]) //side cut
69 cube([20,11.64,0.82 +2], center=true);
70 }
71
72 // 3.3 tab (plate snap on). to use this mechanically, you have to take into account the bending (as it will move the bottom part slightly up...) just for gross reference here for now
73 color("white"){
74 // 3.3.1 top
75 translate([0,0,-4 -5.3 -0.82/2 ]) // front-back cut
76 cube([1.82,16.33,0.82], center=true);
77 // 3.3.2 bottom
78 difference(){
79 hull(){
80 translate([0,0,-4 -5.3 -0.82/2 -1.76 ]) // front-back cut
81 cube([3.65,14,0.1], center=true);
82 translate([0,0,-4 -5.3 -0.82/2 -2.2 ]) // front-back cut
83 cube([3.65,14.74,0.1], center=true);
84 translate([0,0,-4 -5.3 -0.82/2 -2.89 ]) // front-back cut
85 cube([3.65,14,0.1], center=true);
86 }
87 translate([0,0,-4 -5.3 -0.82/2 -1.76 ]) // front-back cut
88 cube([2.2,20,4], center=true);
89
90 }
91 }
92
93 // 4. bottom guides
94 // again, i'm assuming everything is centered...
95 color("darkGreen"){
96 // 4.1 cylinder
97 translate([0,0,-4 -5.3 -5.5 -2/2]) //steam + top + bottom (measured 5.5)
98 cylinder(r=3.85/2, h=2, center=true);
99 translate([0,0,-4 -5.3 -5.5 -2 -1/2]) //steam + top + bottom (measured 5.5)
100 cylinder(r2=3.85/2, r=2.8/2, h=1, center=true);
101 // 4.2 PCB pins
102 translate([4.95,0,-4 -5.3 -5.5 -2/2]) //steam + top + bottom (measured 5.5)
103 cylinder(r=1.6/2, h=2, center=true);
104 translate([4.95,0,-4 -5.3 -5.5 -2 -1/2]) //steam + top + bottom (measured 5.5)
105 cylinder(r2=1.6/2, r=1/2, h=1, center=true);
106 translate([-4.95,0,-4 -5.3 -5.5 -2/2]) //steam + top + bottom (measured 5.5)
107 cylinder(r=1.6/2, h=2, center=true);
108 translate([-4.95,0,-4 -5.3 -5.5 -2 -1/2]) //steam + top + bottom (measured 5.5)
109 cylinder(r2=1.6/2, r=1/2, h=1, center=true);
110 }
111
112 // 5. pins
113 color("orange"){
114 translate([-3.77,2.7,-4 -5.3 -5.5 -3.1/2]) //steam + top + bottom (measured 5.5)
115 cube([.86, 0.2,3.1], center=true);
116 translate([2.7,5.2,-4 -5.3 -5.5 -3.1/2]) //steam + top + bottom (measured 5.5)
117 cube([.86, 0.2,3.1], center=true);
118 }
119
120}