Add case colour
This commit is contained in:
parent
ceb09681ec
commit
dace90c21b
1 changed files with 7 additions and 0 deletions
|
@ -13,6 +13,8 @@ module keyboard_base_plate(pcb_width, pcb_height) {
|
||||||
wall_height = 14.0;
|
wall_height = 14.0;
|
||||||
corner_radius = thickness / 2.0;
|
corner_radius = thickness / 2.0;
|
||||||
|
|
||||||
|
case_color = [0, 0, 0, 1.0];
|
||||||
|
|
||||||
screw_holes = [
|
screw_holes = [
|
||||||
[ 4.8150, 85.7250],
|
[ 4.8150, 85.7250],
|
||||||
[ 47.4822, 85.7250],
|
[ 47.4822, 85.7250],
|
||||||
|
@ -36,6 +38,7 @@ module keyboard_base_plate(pcb_width, pcb_height) {
|
||||||
];
|
];
|
||||||
|
|
||||||
module round_corner(translation, rotation) {
|
module round_corner(translation, rotation) {
|
||||||
|
color(case_color)
|
||||||
translate(translation)
|
translate(translation)
|
||||||
rotate(rotation)
|
rotate(rotation)
|
||||||
rotate_extrude(angle=90) {
|
rotate_extrude(angle=90) {
|
||||||
|
@ -47,6 +50,7 @@ module keyboard_base_plate(pcb_width, pcb_height) {
|
||||||
}
|
}
|
||||||
|
|
||||||
module round_edge(translation, rotation, length) {
|
module round_edge(translation, rotation, length) {
|
||||||
|
color(case_color)
|
||||||
translate(translation)
|
translate(translation)
|
||||||
rotate(rotation)
|
rotate(rotation)
|
||||||
linear_extrude(length)
|
linear_extrude(length)
|
||||||
|
@ -57,12 +61,14 @@ module keyboard_base_plate(pcb_width, pcb_height) {
|
||||||
}
|
}
|
||||||
|
|
||||||
module side(translation, dimensions) {
|
module side(translation, dimensions) {
|
||||||
|
color(case_color)
|
||||||
translate(translation)
|
translate(translation)
|
||||||
linear_extrude(dimensions[2])
|
linear_extrude(dimensions[2])
|
||||||
square([dimensions[0], dimensions[1]], false);
|
square([dimensions[0], dimensions[1]], false);
|
||||||
}
|
}
|
||||||
|
|
||||||
module wall_corner(translation, rotation, radius, length) {
|
module wall_corner(translation, rotation, radius, length) {
|
||||||
|
color(case_color)
|
||||||
translate(translation)
|
translate(translation)
|
||||||
rotate(rotation)
|
rotate(rotation)
|
||||||
linear_extrude(length)
|
linear_extrude(length)
|
||||||
|
@ -73,6 +79,7 @@ module keyboard_base_plate(pcb_width, pcb_height) {
|
||||||
}
|
}
|
||||||
|
|
||||||
module screw_post(translation, h, d1, d2) {
|
module screw_post(translation, h, d1, d2) {
|
||||||
|
color(case_color)
|
||||||
translate(translation)
|
translate(translation)
|
||||||
difference() {
|
difference() {
|
||||||
cylinder(h=h, r=d1/2.0);
|
cylinder(h=h, r=d1/2.0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue