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,38 +1,27 @@
module rpi4_cover(){ $fn=32*2;
pi_height=28; thickness=1.6;
pi_width=104; width=208.2;
depth=70.2;
difference(){ height=10;
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([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([31+thickness+62, (depth+(thickness*2))/2, height+pi_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 // cover
translate([31+thickness+62, (depth+(thickness*2))/2, height+pi_height]) difference(){
linear_extrude(height=1.6) translate([0, 0, 0])
resize([42, 42, 0]) chamferCube(width+(thickness*2), depth+(thickness*2), height+thickness, 8, [0, 0, 1, 1], [0, 1, 1, 0], [0, 0, 0, 0]);
import(file="mk-logo.svg", center=true);
translate([thickness, thickness, 0])
chamferCube(width, depth, height, 8, [0, 0, 1, 1], [0, 1, 1, 0], [0, 0, 0, 0]);
translate([(width+(thickness*2))/2, (depth+(thickness*2))/2, height])
cylinder(h=thickness, d=41.5);
} }
// logo
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) { module chamferCube(sizeX, sizeY, sizeZ, chamferHeight, chamferX, chamferY, chamferZ) {
chamferX = (chamferX == undef) ? [1, 1, 1, 1] : chamferX; chamferX = (chamferX == undef) ? [1, 1, 1, 1] : chamferX;
chamferY = (chamferY == undef) ? [1, 1, 1, 1] : chamferY; chamferY = (chamferY == undef) ? [1, 1, 1, 1] : chamferY;