pi_rack/tray/common.scad

50 lines
1.5 KiB
OpenSCAD
Raw Permalink Normal View History

2024-03-29 10:34:59 +00:00
include <../pi/raspberry.scad>
include <../pi/orangepi.scad>
tray_size = [102, 61.5, 5];
cutout_marings = [12, 12, -0.5];
pillar_size = [5, 6.3/2];
2024-03-29 11:26:54 +00:00
brim_size = [3, tray_size[1]-(2.5*2), pillar_size[0]];
2024-03-29 10:34:59 +00:00
screw_radius = 3/2;
module tray() {
difference() {
union() {
// body
difference(){
cube(tray_size);
// cutout
translate(cutout_marings) cube([tray_size[0]-(cutout_marings[0]*2), tray_size[1]-(cutout_marings[1]*2), tray_size[2]+1]);
}
// brim
2024-03-29 11:26:54 +00:00
translate([tray_size[0]-brim_size[0], 2.5, tray_size[2]]) cube(brim_size);
2024-03-29 10:34:59 +00:00
}
// remove edges
color("#ff0000") translate([-0.5, 0, tray_size[2]/2]) union() {
rotate([45, 0, 0]) cube([tray_size[0]+1, 3.54, 5]);
mirror([0,0,1]) {
rotate([45, 0, 0]) cube([tray_size[0]+1, 3.54, 5]);
}
translate([0, tray_size[1], 0]) mirror([0,1,0]) {
rotate([45, 0, 0]) cube([tray_size[0]+1, 3.54, 5]);
mirror([0,0,1]) {
rotate([45, 0, 0]) cube([tray_size[0]+1, 3.54, 5]);
}
}
}
}
}
function offset_pi(size) = [tray_size[0]-size[0]-5.5, (tray_size[1] - size[1])/2, tray_size[2]+pillar_size[0]];
module pillar() {
difference() {
cylinder(h=pillar_size[0], r=pillar_size[1], center=true);
cylinder(h=pillar_size[0]+1, r=screw_radius, center=true);
}
}
// tray();