Move more values into keyboard.scad
This commit is contained in:
parent
51a804b723
commit
651a39d9dc
2 changed files with 23 additions and 23 deletions
|
@ -1,5 +1,17 @@
|
|||
keyboard_pcb_width = 257.175;
|
||||
keyboard_pcb_length = 95.250;
|
||||
keyboard_switch_width = 19.0500;
|
||||
keyboard_switch_length = 19.0500;
|
||||
keyboard_switch_leg_length = 3.30;
|
||||
keyboard_switch_height = 11.10;
|
||||
keyboard_switch_sizes = [
|
||||
[0.5, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
|
||||
[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.5],
|
||||
[1.25, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.25],
|
||||
[1.75, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.75],
|
||||
[1.0, 1.25, 1.25, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
|
||||
];
|
||||
|
||||
keyboard_pcb_width = 13.5 * keyboard_switch_width;
|
||||
keyboard_pcb_length = 5.0 * keyboard_switch_length;
|
||||
keyboard_pcb_height = 1.600;
|
||||
|
||||
keyboard_pcb_screw_holes = [
|
||||
|
@ -14,13 +26,3 @@ keyboard_pcb_screw_holes = [
|
|||
[123.8250, 9.5250],
|
||||
[238.1250, 9.5250]
|
||||
];
|
||||
|
||||
keyboard_switch_leg_length = 3.30;
|
||||
keyboard_switch_height = 11.10;
|
||||
keyboard_switch_sizes = [
|
||||
[0.5, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
|
||||
[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.5],
|
||||
[1.25, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.25],
|
||||
[1.75, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.75],
|
||||
[1.0, 1.25, 1.25, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
|
||||
];
|
||||
|
|
|
@ -28,10 +28,8 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
|
|||
wall_width = 2.5000;
|
||||
wall_height = 17.2500;
|
||||
|
||||
key_switch_width = 19.0500;
|
||||
key_switch_length = 19.0500;
|
||||
keyboard_width = key_switch_width * 13.5;
|
||||
keyboard_length = key_switch_length * 5.0;
|
||||
keyboard_width = keyboard_switch_width * 13.5;
|
||||
keyboard_length = keyboard_switch_length * 5.0;
|
||||
keyboard_x_offset = 12.2500;
|
||||
keyboard_y_offset = 12.2500;
|
||||
|
||||
|
@ -117,12 +115,12 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
|
|||
function addrange(v, x, y) = add(slice(v, x, y));
|
||||
|
||||
module key_switch_plate(key_switch_size) {
|
||||
plate_width = key_switch_width * key_switch_size;
|
||||
plate_length = key_switch_length;
|
||||
plate_width = keyboard_switch_width * key_switch_size;
|
||||
plate_length = keyboard_switch_length;
|
||||
|
||||
if (key_switch_size <= 0.5) {
|
||||
cube([key_switch_width * key_switch_size,
|
||||
key_switch_length,
|
||||
cube([keyboard_switch_width * key_switch_size,
|
||||
keyboard_switch_length,
|
||||
wall_width], false);
|
||||
} else {
|
||||
hole_width = key_switch_footprint[0];
|
||||
|
@ -163,13 +161,13 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
|
|||
rows = len(key_switch_sizes);
|
||||
|
||||
for (i = [0: rows-1]) {
|
||||
y = key_switch_length * (rows - 1 - i);
|
||||
y = keyboard_switch_length * (rows - 1 - i);
|
||||
|
||||
key_switch_row = key_switch_sizes[i];
|
||||
cols = len(key_switch_row);
|
||||
|
||||
for (j = [0: cols-1]) {
|
||||
x = key_switch_width * ((j == 0)?
|
||||
x = keyboard_switch_width * ((j == 0)?
|
||||
0:
|
||||
addrange(key_switch_row, 0, j-1));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue