Add case colour

This commit is contained in:
XANTRONIX 2023-11-12 01:06:25 -05:00
parent ceb09681ec
commit dace90c21b

View file

@ -13,6 +13,8 @@ module keyboard_base_plate(pcb_width, pcb_height) {
wall_height = 14.0;
corner_radius = thickness / 2.0;
case_color = [0, 0, 0, 1.0];
screw_holes = [
[ 4.8150, 85.7250],
[ 47.4822, 85.7250],
@ -36,6 +38,7 @@ module keyboard_base_plate(pcb_width, pcb_height) {
];
module round_corner(translation, rotation) {
color(case_color)
translate(translation)
rotate(rotation)
rotate_extrude(angle=90) {
@ -47,6 +50,7 @@ module keyboard_base_plate(pcb_width, pcb_height) {
}
module round_edge(translation, rotation, length) {
color(case_color)
translate(translation)
rotate(rotation)
linear_extrude(length)
@ -57,12 +61,14 @@ module keyboard_base_plate(pcb_width, pcb_height) {
}
module side(translation, dimensions) {
color(case_color)
translate(translation)
linear_extrude(dimensions[2])
square([dimensions[0], dimensions[1]], false);
}
module wall_corner(translation, rotation, radius, length) {
color(case_color)
translate(translation)
rotate(rotation)
linear_extrude(length)
@ -73,6 +79,7 @@ module keyboard_base_plate(pcb_width, pcb_height) {
}
module screw_post(translation, h, d1, d2) {
color(case_color)
translate(translation)
difference() {
cylinder(h=h, r=d1/2.0);