Simplified cover for centered logo

This commit is contained in:
2023-08-26 23:19:59 +02:00
parent cf1be92010
commit 8ac85fb99f

View File

@@ -1,37 +1,26 @@
module rpi4_cover(){
pi_height=28;
pi_width=104;
$fn=32*2;
thickness=1.6;
width=208.2;
depth=70.2;
height=10;
// cover
difference(){
translate([31+thickness+10, 0, height])
chamferCube(pi_width, depth+(thickness*2), pi_height+thickness, 8, [0, 0, 1, 1], [0, 0, 0, 0], [0, 0, 0, 0]);
translate([0, 0, 0])
chamferCube(width+(thickness*2), depth+(thickness*2), height+thickness, 8, [0, 0, 1, 1], [0, 1, 1, 0], [0, 0, 0, 0]);
translate([31+thickness+10, thickness, height])
chamferCube(pi_width, depth, pi_height, 8, [0, 0, 1, 1], [0, 0, 0, 0], [0, 0, 0, 0]);
translate([thickness, thickness, 0])
chamferCube(width, depth, height, 8, [0, 0, 1, 1], [0, 1, 1, 0], [0, 0, 0, 0]);
translate([31+thickness+62, (depth+(thickness*2))/2, height+pi_height])
translate([(width+(thickness*2))/2, (depth+(thickness*2))/2, height])
cylinder(h=thickness, d=41.5);
// hdmi gap
translate([thickness+95, depth+thickness, height])
cube([25, 0.8, 17]);
// keyboard cabel hole
translate([width/2+thickness-6, thickness+1, 20])
rotate([90, 0, 0])
#cylinder(h=thickness+1, d=3);
translate([width/2+thickness+6, thickness+1, 20])
rotate([90, 0, 0])
#cylinder(h=thickness+1, d=3);
}
// logo
translate([31+thickness+62, (depth+(thickness*2))/2, height+pi_height])
translate([(width+(thickness*2))/2, (depth+(thickness*2))/2, height])
linear_extrude(height=1.6)
resize([42, 42, 0])
import(file="mk-logo.svg", center=true);
}
module chamferCube(sizeX, sizeY, sizeZ, chamferHeight, chamferX, chamferY, chamferZ) {
chamferX = (chamferX == undef) ? [1, 1, 1, 1] : chamferX;