1
0
mirror of https://github.com/whowechina/popn_pico.git synced 2024-09-23 19:08:26 +02:00

More accurate keycap socket

This commit is contained in:
whowechina 2022-10-05 19:10:31 +08:00
parent d8b2a96f6d
commit 6881198c81
5 changed files with 63 additions and 36 deletions

View File

@ -1,49 +1,76 @@
gap_w = 1.19; // 1.17 +/-0.02 gap_w = 1.16; // socket cross width
gap_h = 4.15; // 4.1 +0.05 gap_h = 3.98; // socket cross height
stem_l = 4.8; gap_r = 0.15; // radius of round corner in cross
stem_l = 4.3; // socket stem length
stem_d = 5.6; // socket stem diameter
difference() { difference() {
translate([0,0,3]) difference() { union() {
bean([28,28,10]); cap();
translate([0,0,-1.5]) bean([25,25,10]); stem();
} }
translate([-50,-50,-100]) cube([100,100,100]); socket();
//bevel();
} }
stem();
//color("green", 0.3) translate([0,0,0]) cylinder(d=28,h=8); //color("green", 0.3) translate([0,0,0]) cylinder(d=28,h=8);
//color("red", 0.6) translate([0,0,0]) cylinder(d=8,h=3); //color("red", 0.6) translate([0,0,0]) cylinder(d=8,h=3);
//color("blue", 0.6) translate([0,0,3]) cylinder(d=9,h=stem_l); //color("blue", 0.6) translate([0,0,3]) cylinder(d=9,h=stem_l);
module bean(x) { module cap() {
resize(x) minkowski() { difference() {
difference() { translate([0,0,3]) difference() {
translate([0,0,-1.8]) resize([30,30,5]) sphere(d=50,$fn=96); translate([0,0,0]) bean([28,28,10]);
translate([-50,-50,-100]) cube([100,100,100]); translate([0,0,-1.5]) bean([25,25,10]);
}
sphere(d=7,$fn=64);
} }
translate([-50,-50,-100]) cube([100,100,100]);
}
}
module bean(x) {
resize(x) minkowski() {
difference() {
translate([0,0,-1.8]) resize([30,30,5]) sphere(d=50,$fn=96);
translate([-50,-50,-100]) cube([100,100,100]);
}
sphere(d=7,$fn=64);
}
} }
module stem() { module stem() {
color("cyan") translate([0,0,8-stem_l-1]) union() { translate([0,0,6.5-stem_l]) {
difference() { cylinder(d=stem_d,h=stem_l+1,$fn=64);
union() { translate([0,0,stem_l-0.3]) cylinder(d1=5.5,d2=8.5,h=1,$fn=64);
cylinder(d=5.5,h=stem_l+1,$fn=64); }
hull() { }
translate([0,0,stem_l-0.5]) cylinder(d=5.5,h=0.1,$fn=64);
translate([0,0,stem_l+1]) cylinder(d=10,h=0.1,$fn=64); module socket()
} {
} translate([0,0,6.5-stem_l-0.01]) difference() {
translate([0,0,-1]) cube([gap_h,gap_w,20], center=true); l=stem_l+1;
translate([0,0,-1]) cube([gap_w,gap_h,20], center=true); union() {
translate([0,0,-1]) cube([gap_w+0.3*2,gap_w+0.3*2,20], center=true); translate([0,0,l/2]) cube([gap_h,gap_w,l], center=true);
} translate([0,0,l/2]) cube([gap_w,gap_h,l], center=true);
translate([-gap_w/2-0.3,-gap_w/2-0.3, 0]) cylinder(d=0.6,h=4.5,$fn=24); translate([0,0,l/2]) cube([gap_w+gap_r*2,gap_w+gap_r*2,l], center=true);
translate([gap_w/2+0.3,-gap_w/2-0.3, 0]) cylinder(d=0.6,h=4.5,$fn=24); }
translate([-gap_w/2-0.3,gap_w/2+0.3, 0]) cylinder(d=0.6,h=4.5,$fn=24);
translate([gap_w/2+0.3,gap_w/2+0.3, 0]) cylinder(d=0.6,h=4.5,$fn=24); r = gap_w/2 + gap_r;
} for (i=[-1,1]) {
for (j=[-1,1]) {
translate([i*r,j*r,-1]) cylinder(r=gap_r,h=l+2,$fn=24);
}
}
}
}
module bevel() {
color("red", 0.5) translate([0,0,6.5-stem_l]) hull() {
translate([0,0,-0.01]) cube([gap_w+0.4, gap_h+0.4, 0.01],center=true);
translate([0,0,0.3]) cube([gap_w, gap_h, 0.01],center=true);
}
color("red", 0.5) hull() {
translate([0,0,-0.01]) cube([gap_h+0.4, gap_w+0.4, 0.01],center=true);
translate([0,0,0.3]) cube([gap_h, gap_w, 0.01],center=true);
}
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -86,7 +86,7 @@ Thanks to:
* Make half-transparent resin by mixing translucent and white resin (5:1) as the base resin. * Make half-transparent resin by mixing translucent and white resin (5:1) as the base resin.
* Mix some drops of UV resin pigment, you can make all Pop'n Music button colors. * Mix some drops of UV resin pigment, you can make all Pop'n Music button colors.
<img src="doc/color_pigment.jpg" width="50%"> <img src="doc/color_pigment.jpg" width="50%">
* 3D file is **/PRODUCTION/popn_keycap.stl** or if you're using Chitubox - **/PRODUCTION/popn_6keys.chitubox**. Orientation and support should be like this to get perfect button surface. * 3D file is **/PRODUCTION/popn_keycap.stl** or if you're using Chitubox - **/PRODUCTION/popn_keycaps.chitubox**. Orientation and support should be like this to get perfect button surface.
<img src="doc/button_resin_support.png" width="50%"> <img src="doc/button_resin_support.png" width="50%">
* There're many other choices. * There're many other choices.
* Homemade bottle cover keycaps * Homemade bottle cover keycaps