M cad/bottom.scad => cad/bottom.scad +2 -2
@@ 5,6 5,6 @@ use <mountings.scad>;
module bottom(caseMargin, keycapWidth, keycapSpacing, stagger, left, screwHoles) {
difference() {
offset(r=caseMargin) outline(keycapWidth, keycapSpacing, stagger, left);
- mountings(screwHoles);
+ // mountings(screwHoles);
}
-}>
\ No newline at end of file
+}
A cad/edge-cuts.dxf => cad/edge-cuts.dxf +646 -0
@@ 0,0 1,646 @@
+ 0
+SECTION
+ 2
+BLOCKS
+ 0
+ENDSEC
+ 0
+SECTION
+ 2
+ENTITIES
+ 0
+LINE
+ 8
+0
+ 10
+113.038
+ 20
+-0.297638
+ 11
+113.075
+ 21
+-0.290573
+ 0
+LINE
+ 8
+0
+ 10
+113.075
+ 20
+-0.290573
+ 11
+113.11
+ 21
+-0.278931
+ 0
+LINE
+ 8
+0
+ 10
+113.11
+ 20
+-0.278931
+ 11
+113.145
+ 21
+-0.262894
+ 0
+LINE
+ 8
+0
+ 10
+113.145
+ 20
+-0.262894
+ 11
+113.176
+ 21
+-0.242706
+ 0
+LINE
+ 8
+0
+ 10
+113.176
+ 20
+-0.242706
+ 11
+113.205
+ 21
+-0.218689
+ 0
+LINE
+ 8
+0
+ 10
+113.205
+ 20
+-0.218689
+ 11
+113.231
+ 21
+-0.191223
+ 0
+LINE
+ 8
+0
+ 10
+113.231
+ 20
+-0.191223
+ 11
+113.253
+ 21
+-0.160751
+ 0
+LINE
+ 8
+0
+ 10
+113.253
+ 20
+-0.160751
+ 11
+113.271
+ 21
+-0.127731
+ 0
+LINE
+ 8
+0
+ 10
+113.271
+ 20
+-0.127731
+ 11
+113.285
+ 21
+-0.0927124
+ 0
+LINE
+ 8
+0
+ 10
+113.285
+ 20
+-0.0927124
+ 11
+113.295
+ 21
+-0.0562134
+ 0
+LINE
+ 8
+0
+ 10
+113.295
+ 20
+-0.0562134
+ 11
+113.3
+ 21
+0
+ 0
+LINE
+ 8
+0
+ 10
+113.3
+ 20
+0
+ 11
+113.3
+ 21
+75
+ 0
+LINE
+ 8
+0
+ 10
+113.3
+ 20
+75
+ 11
+113.298
+ 21
+75.0376
+ 0
+LINE
+ 8
+0
+ 10
+113.298
+ 20
+75.0376
+ 11
+113.291
+ 21
+75.0746
+ 0
+LINE
+ 8
+0
+ 10
+113.291
+ 20
+75.0746
+ 11
+113.279
+ 21
+75.1104
+ 0
+LINE
+ 8
+0
+ 10
+113.279
+ 20
+75.1104
+ 11
+113.263
+ 21
+75.1445
+ 0
+LINE
+ 8
+0
+ 10
+113.263
+ 20
+75.1445
+ 11
+113.243
+ 21
+75.1763
+ 0
+LINE
+ 8
+0
+ 10
+113.243
+ 20
+75.1763
+ 11
+113.219
+ 21
+75.2054
+ 0
+LINE
+ 8
+0
+ 10
+113.219
+ 20
+75.2054
+ 11
+113.191
+ 21
+75.2312
+ 0
+LINE
+ 8
+0
+ 10
+113.191
+ 20
+75.2312
+ 11
+113.161
+ 21
+75.2533
+ 0
+LINE
+ 8
+0
+ 10
+113.161
+ 20
+75.2533
+ 11
+113.128
+ 21
+75.2715
+ 0
+LINE
+ 8
+0
+ 10
+113.128
+ 20
+75.2715
+ 11
+113.093
+ 21
+75.2853
+ 0
+LINE
+ 8
+0
+ 10
+113.093
+ 20
+75.2853
+ 11
+113.056
+ 21
+75.2947
+ 0
+LINE
+ 8
+0
+ 10
+113.056
+ 20
+75.2947
+ 11
+113
+ 21
+75.3
+ 0
+LINE
+ 8
+0
+ 10
+113
+ 20
+75.3
+ 11
+0
+ 21
+75.3
+ 0
+LINE
+ 8
+0
+ 10
+0
+ 20
+75.3
+ 11
+-0.0375977
+ 21
+75.2976
+ 0
+LINE
+ 8
+0
+ 10
+-0.0375977
+ 20
+75.2976
+ 11
+-0.0746002
+ 21
+75.2906
+ 0
+LINE
+ 8
+0
+ 10
+-0.0746002
+ 20
+75.2906
+ 11
+-0.110443
+ 21
+75.2789
+ 0
+LINE
+ 8
+0
+ 10
+-0.110443
+ 20
+75.2789
+ 11
+-0.144531
+ 21
+75.2629
+ 0
+LINE
+ 8
+0
+ 10
+-0.144531
+ 20
+75.2629
+ 11
+-0.176331
+ 21
+75.2427
+ 0
+LINE
+ 8
+0
+ 10
+-0.176331
+ 20
+75.2427
+ 11
+-0.205368
+ 21
+75.2187
+ 0
+LINE
+ 8
+0
+ 10
+-0.205368
+ 20
+75.2187
+ 11
+-0.231155
+ 21
+75.1912
+ 0
+LINE
+ 8
+0
+ 10
+-0.231155
+ 20
+75.1912
+ 11
+-0.253296
+ 21
+75.1608
+ 0
+LINE
+ 8
+0
+ 10
+-0.253296
+ 20
+75.1608
+ 11
+-0.271454
+ 21
+75.1277
+ 0
+LINE
+ 8
+0
+ 10
+-0.271454
+ 20
+75.1277
+ 11
+-0.285324
+ 21
+75.0927
+ 0
+LINE
+ 8
+0
+ 10
+-0.285324
+ 20
+75.0927
+ 11
+-0.294693
+ 21
+75.0562
+ 0
+LINE
+ 8
+0
+ 10
+-0.294693
+ 20
+75.0562
+ 11
+-0.300003
+ 21
+75
+ 0
+LINE
+ 8
+0
+ 10
+-0.300003
+ 20
+75
+ 11
+-0.300003
+ 21
+0
+ 0
+LINE
+ 8
+0
+ 10
+-0.300003
+ 20
+0
+ 11
+-0.297638
+ 21
+-0.0375977
+ 0
+LINE
+ 8
+0
+ 10
+-0.297638
+ 20
+-0.0375977
+ 11
+-0.290573
+ 21
+-0.0746002
+ 0
+LINE
+ 8
+0
+ 10
+-0.290573
+ 20
+-0.0746002
+ 11
+-0.278931
+ 21
+-0.110443
+ 0
+LINE
+ 8
+0
+ 10
+-0.278931
+ 20
+-0.110443
+ 11
+-0.262894
+ 21
+-0.144531
+ 0
+LINE
+ 8
+0
+ 10
+-0.262894
+ 20
+-0.144531
+ 11
+-0.242706
+ 21
+-0.176331
+ 0
+LINE
+ 8
+0
+ 10
+-0.242706
+ 20
+-0.176331
+ 11
+-0.218689
+ 21
+-0.205368
+ 0
+LINE
+ 8
+0
+ 10
+-0.218689
+ 20
+-0.205368
+ 11
+-0.191223
+ 21
+-0.231155
+ 0
+LINE
+ 8
+0
+ 10
+-0.191223
+ 20
+-0.231155
+ 11
+-0.160751
+ 21
+-0.253296
+ 0
+LINE
+ 8
+0
+ 10
+-0.160751
+ 20
+-0.253296
+ 11
+-0.127731
+ 21
+-0.271454
+ 0
+LINE
+ 8
+0
+ 10
+-0.127731
+ 20
+-0.271454
+ 11
+-0.0927124
+ 21
+-0.285324
+ 0
+LINE
+ 8
+0
+ 10
+-0.0927124
+ 20
+-0.285324
+ 11
+-0.0562134
+ 21
+-0.294693
+ 0
+LINE
+ 8
+0
+ 10
+-0.0562134
+ 20
+-0.294693
+ 11
+0
+ 21
+-0.300003
+ 0
+LINE
+ 8
+0
+ 10
+0
+ 20
+-0.300003
+ 11
+113
+ 21
+-0.300003
+ 0
+LINE
+ 8
+0
+ 10
+113
+ 20
+-0.300003
+ 11
+113.038
+ 21
+-0.297638
+ 0
+ENDSEC
+ 0
+SECTION
+ 2
+OBJECTS
+ 0
+DICTIONARY
+ 0
+ENDSEC
+ 0
+EOF
M cad/encoder.scad => cad/encoder.scad +5 -3
@@ 1,13 1,15 @@
module encoder(keyWidth, keySpacing, stagger) {
spacedKey=keyWidth+keySpacing[0];
color("#c9c0bb")
- translate([(spacedKey*4)-(spacedKey/2)-0.54, (spacedKey/1.35)+stagger-1.05,0])
+ // translate([(spacedKey*4)-(spacedKey/2)-0.54, (spacedKey/1.35)+stagger-1.05,0])
+ translate([(spacedKey*4)-(spacedKey/2)-0.54, (spacedKey/3.35)+stagger-1.05,0])
circle(d=8.5);
}
module encoderKnob(keyWidth, keySpacing, stagger) {
spacedKey=keyWidth+keySpacing[0];
color("#c9c0bb")
- translate([(spacedKey*4)-(spacedKey/2)-0.54, (spacedKey/1.35)+stagger-1.05,0])
+ // translate([(spacedKey*4)-(spacedKey/2)-0.54, (spacedKey/1.35)+stagger-1.05,0])
+ translate([(spacedKey*4)-(spacedKey/2)-0.54, (spacedKey/3.35)+stagger-1.05,0])
circle(d=12.7);
-}>
\ No newline at end of file
+}
M cad/full.scad => cad/full.scad +1 -0
@@ 3,6 3,7 @@ use <half.scad>;
layers=["pcb", "keys", "keycaps", "plate", "bottom"];
// layers=["plate"];
// layers=["bottom"];
+// layers=["pcb"];
translate([235,0,0]) union() {
translate([-235,0,0]) half(left=true, layers=layers);
M cad/half.scad => cad/half.scad +4 -4
@@ 30,17 30,17 @@ module half(left, layers) {
color("black")
linear_extrude(height = pcbHeight, center = false, convexity = 0, twist = 0)
difference() {
- offset(r=.3) outline(keycapWidth, keycapSpacing, stagger, left);
- mountings(mountingHoles); // mounting holes
+ offset(r=.3) outline(keycapWidth, keycapSpacing, stagger, !left);
+ // mountings(mountingHoles); // mounting holes
}
} else if (layer == "keys") {
color("#0b113b")
translate([2,2,pcbHeight])
- keys(keyWidth, keyLength, keyHeight, keySpacing, stagger, left);
+ keys(keyWidth, keyLength, keyHeight, keySpacing, stagger, !left);
} else if (layer == "keycaps") {
color("#4f4f4f")
translate([0,0,pcbHeight+11])
- keycaps(keycapWidth, keycapSpacing, stagger, left);
+ keycaps(keycapWidth, keycapSpacing, stagger, !left);
} else if (layer == "plate") {
// color("#191919") // CF
color("#bd9f70")
M cad/keycaps.scad => cad/keycaps.scad +2 -2
@@ 13,7 13,7 @@ module dsaKeycap(keycapWidth, keycapLength) {
}
module keycaps(keycapWidth, keycapSpacing, stagger, withEncoder) {
- layout([keycapWidth, keycapWidth, 0], [keycapSpacing, keycapSpacing], stagger, false);
+ layout([keycapWidth, keycapWidth, 0], [keycapSpacing, keycapSpacing], stagger, withEncoder);
// layout(keycapDims, [keycapSpacing, keycapSpacing], stagger);
// color("#4f4f4f") translate([0,0,pcbHeight+keyHeight]) layout(keycapDimsTop, [keycapSpacing+4, keycapSpacing+4], stagger);
if (withEncoder) {
@@ 25,4 25,4 @@ module keycaps(keycapWidth, keycapSpacing, stagger, withEncoder) {
keycapWidth=18;
-dsaKeycap(keycapWidth, keycapWidth);>
\ No newline at end of file
+dsaKeycap(keycapWidth, keycapWidth);
M cad/keys.scad => cad/keys.scad +2 -2
@@ 3,10 3,10 @@ use <layout.scad>;
use <encoder.scad>;
module keys(keyWidth, keyLength, keyHeight, keySpacing, stagger, withEncoder) {
- layout([keyWidth, keyLength, keyHeight], keySpacing, stagger, false);
+ layout([keyWidth, keyLength, keyHeight], keySpacing, stagger, withEncoder);
if (withEncoder) {
translate([-2,-2,0])
linear_extrude(height = keyHeight-2, center = false, convexity = 0, twist = 0)
encoder(keyWidth, keySpacing, stagger);
}
-}>
\ No newline at end of file
+}
M cad/layout.scad => cad/layout.scad +6 -6
@@ 16,14 16,14 @@ module layout(keyDims, keySpacing, stagger, withEncoder=false) {
}
column(4, [0,0]);
- column(3, [spacedKey[0], spacedKey[1]]);
- column(3, [spacedKey[0]*2, stagger+spacedKey[1]]);
+ column(4, [spacedKey[0], 0]);
+ column(4, [spacedKey[0]*2, 0]);
if (withEncoder) {
- column(4, [spacedKey[0]*3, stagger*2]);
+ column(3, [spacedKey[0]*3, spacedKey[1]]);
} else {
- column(3, [spacedKey[0]*3, (stagger*2)+spacedKey[1]]);
+ column(4, [spacedKey[0]*3, 0]);
}
- column(4, [spacedKey[0]*4, stagger]);
+ column(4, [spacedKey[0]*4, 0]);
column(4, [spacedKey[0]*5, 0]);
}
@@ 50,4 50,4 @@ module layout2(keyDims, keySpacing, stagger, withEncoder=false) {
column(withEncoder ? 4 : 3, withEncoder ? [spacedKey[0]*3, stagger*2] : [spacedKey[0]*3, (stagger*2)+spacedKey[1]]);
column(4, [spacedKey[0]*4, stagger]);
column(4, [spacedKey[0]*5, 0]);
-}>
\ No newline at end of file
+}
M cad/outline.scad => cad/outline.scad +25 -1
@@ 4,6 4,30 @@ module outline(keyWidth, keySpacing, stagger, withEncoder=false) {
col1_top=[[0, fourKeysTall]];
col2_top=[[spacedKey*2, fourKeysTall]];
+ col3_top=[[spacedKey*2, fourKeysTall], [spacedKey*3, fourKeysTall]];
+ col4_top=[[spacedKey*3, fourKeysTall], [(spacedKey*4)-keySpacing, fourKeysTall], [(spacedKey*4)-keySpacing, fourKeysTall]];
+ col5_top=[[(spacedKey*5)-keySpacing, fourKeysTall], [(spacedKey*5)-keySpacing, fourKeysTall]];
+ col6_top=[[(spacedKey*6)-keySpacing, fourKeysTall]];
+
+ col6_bot=[[(spacedKey*6)-keySpacing, 0]];
+ col5_bot=[[spacedKey*5, 0], [spacedKey*5, 0], [spacedKey*4, 0]];
+ col4_bot=[[spacedKey*4, 0], [spacedKey*4, 0], [spacedKey*3, 0]];
+ col3_bot=[[spacedKey*3, 0], [spacedKey*3, 0], [spacedKey*2, 0]];
+ col2_bot=[[spacedKey*2, 0], [spacedKey*2, 0], [spacedKey, 0]];
+ col1_bot=[[keyWidth, 0]];
+
+ top=concat(col1_top, col2_top, col3_top, col4_top, col5_top, col6_top);
+ bottom=concat(col6_bot, col5_bot, col4_bot, col3_bot, col2_bot, col1_bot);
+
+ polygon(concat([[0,0]], top, bottom));
+}
+
+module outline_old(keyWidth, keySpacing, stagger, withEncoder=false) {
+ spacedKey=keyWidth+keySpacing;
+ fourKeysTall=(spacedKey*4)-keySpacing;
+
+ col1_top=[[0, fourKeysTall]];
+ col2_top=[[spacedKey*2, fourKeysTall]];
col3_top=[[spacedKey*2, fourKeysTall+stagger], [spacedKey*3, fourKeysTall+stagger]];
col4_top=[[spacedKey*3, fourKeysTall+(stagger*2)], [(spacedKey*4)-keySpacing, fourKeysTall+(stagger*2)], [(spacedKey*4)-keySpacing, fourKeysTall+stagger]];
col5_top=[[(spacedKey*5)-keySpacing, fourKeysTall+stagger], [(spacedKey*5)-keySpacing, fourKeysTall]];
@@ 24,4 48,4 @@ module outline(keyWidth, keySpacing, stagger, withEncoder=false) {
bottom=concat(col6_bot, col5_bot, col4_bot, col3_bot, col2_bot, col1_bot);
polygon(concat([[0,0]], top, bottom));
-}>
\ No newline at end of file
+}
A cad/plate.dxf => cad/plate.dxf +1798 -0
M cad/plate.scad => cad/plate.scad +4 -4
@@ 7,11 7,11 @@ module plate(caseMargin, keycapWidth, keycapSpacing, keyWidth, keyLength, keySpa
difference() {
offset(r=caseMargin) outline(keycapWidth, keycapSpacing, stagger, left);
union() {
- translate([2,2,0]) layout([keyWidth, keyLength, 0], keySpacing, stagger, false);
- mountings(screwHoles);
- if (left) {
+ translate([2,2,0]) layout([keyWidth, keyLength, 0], keySpacing, stagger, !left);
+ // mountings(screwHoles);
+ if (!left) {
encoder(keyWidth, keySpacing, stagger);
}
}
}
-}>
\ No newline at end of file
+}