1
0
mirror of https://github.com/whowechina/popn_pico.git synced 2024-11-27 16:10:52 +01: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_h = 4.15; // 4.1 +0.05
stem_l = 4.8;
gap_w = 1.16; // socket cross width
gap_h = 3.98; // socket cross height
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() {
translate([0,0,3]) difference() {
bean([28,28,10]);
translate([0,0,-1.5]) bean([25,25,10]);
}
translate([-50,-50,-100]) cube([100,100,100]);
union() {
cap();
stem();
}
socket();
//bevel();
}
stem();
//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("blue", 0.6) translate([0,0,3]) cylinder(d=9,h=stem_l);
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 cap() {
difference() {
translate([0,0,3]) difference() {
translate([0,0,0]) bean([28,28,10]);
translate([0,0,-1.5]) bean([25,25,10]);
}
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() {
color("cyan") translate([0,0,8-stem_l-1]) union() {
difference() {
union() {
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);
}
}
translate([0,0,-1]) cube([gap_h,gap_w,20], center=true);
translate([0,0,-1]) cube([gap_w,gap_h,20], center=true);
translate([0,0,-1]) cube([gap_w+0.3*2,gap_w+0.3*2,20], 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);
translate([gap_w/2+0.3,gap_w/2+0.3, 0]) cylinder(d=0.6,h=4.5,$fn=24);
}
translate([0,0,6.5-stem_l]) {
cylinder(d=stem_d,h=stem_l+1,$fn=64);
translate([0,0,stem_l-0.3]) cylinder(d1=5.5,d2=8.5,h=1,$fn=64);
}
}
module socket()
{
translate([0,0,6.5-stem_l-0.01]) difference() {
l=stem_l+1;
union() {
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([0,0,l/2]) cube([gap_w+gap_r*2,gap_w+gap_r*2,l], center=true);
}
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.
* Mix some drops of UV resin pigment, you can make all Pop'n Music button colors.
<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%">
* There're many other choices.
* Homemade bottle cover keycaps