# mnt-keyboard-spacebar.scad -rw-r--r-- 1.7 KiB View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
$fn=20;

module roundcube(size, radius, center=true) {
    minkowski() {
        cube([size.x-radius*2, size.y-radius*2, size.z-radius*2], center=center);
        sphere(radius);
    }
}

module choc_stem(draftAng = 5) {
  stemHeight = 3.1;
  dia = .15;
  wids = 1.2/2;
  lens = 2.9/2; 
  module Stem() {
    difference(){
      translate([0,0,-stemHeight/2])linear_extrude(height = stemHeight)hull(){
        translate([wids-dia,-3/2])circle(d=dia);
        translate([-wids+dia,-3/2])circle(d=dia);
        translate([wids-dia, 3/2])circle(d=dia);
        translate([-wids+dia, 3/2])circle(d=dia);
      }

    //cuts
      translate([3.9,0])cylinder(d1=7+sin(draftAng)*stemHeight, d2=7,3.5, center = true, $fn = 64);
      translate([-3.9,0])cylinder(d1=7+sin(draftAng)*stemHeight,d2=7,3.5, center = true, $fn = 64);
    }
  }

  translate([5.7/2,0,-stemHeight/2+2])Stem();
  translate([-5.7/2,0,-stemHeight/2+2])Stem();
  
  translate([2.7,-7, 1.7]) cube([0.2,14, 1]);
    translate([-2.7,-7, 1.7]) cube([0.2,14, 1]);
  
  translate([-7,1, 1.7]) cube([14,0.2, 1]);
  translate([-7,-1, 1.7]) cube([14,0.2, 1]);

}

difference() {
union() {
choc_stem();
translate([32.25, 0 ,0])
choc_stem();
translate([-32.25, 0 ,0])
choc_stem();

difference() {
    translate([0,0,2.5])
        roundcube([91, 17, 5], 1.5, center=true);
    translate([0,0,-0.6])
        roundcube([89, 14.5, 5], 1.5, center=true);
    translate([0,0,-4])
        cube([100, 20,  10], center=true);
    translate([0,0,36])
        rotate([0,90,0])
        cylinder(h=80, r=32, center=true, $fn=200);
    translate([-40,0,36])
        rotate([0,90,0])
        sphere(32, $fn=200);
    translate([40,0,36])
        rotate([0,90,0])
        sphere(32, $fn=200);
}

}

//translate([0, -20, 0]) cube(80, 80, 80);
}