init
This commit is contained in:
commit
1e09b3ea6b
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export
|
59
holder/holder.scad
Normal file
59
holder/holder.scad
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
include <../tray/common.scad>
|
||||||
|
|
||||||
|
u2 = 89;
|
||||||
|
rw = 482.6;
|
||||||
|
|
||||||
|
holder_size = [tray_size[0]+5, u2, tray_size[2]+3*2+36];
|
||||||
|
holder_margin = 7.5;
|
||||||
|
|
||||||
|
top_size = 5;
|
||||||
|
bottom_size = 11;
|
||||||
|
|
||||||
|
module holder() {
|
||||||
|
color("#a0a0a0") difference() {
|
||||||
|
translate([-5.01, 0, -3]) union() {
|
||||||
|
// base
|
||||||
|
translate([0, 2.5-(holder_size[1]-tray_size[1])/2, 0]) cube([holder_size[0], (holder_size[1]-tray_size[1])/2, bottom_size]);
|
||||||
|
mirror([0,1,0]) translate([0, 2.5-(holder_size[1]-tray_size[1])/2 - tray_size[1], 0]) cube([holder_size[0], (holder_size[1]-tray_size[1])/2, bottom_size]);
|
||||||
|
cube([5, tray_size[1], bottom_size]);
|
||||||
|
translate([holder_size[0]-holder_margin, 0, 0]) cube([holder_margin, tray_size[1], 3]);
|
||||||
|
|
||||||
|
// top
|
||||||
|
translate([0, 0, holder_size[2]-top_size]) {
|
||||||
|
translate([0, 2.5-(holder_size[1]-tray_size[1])/2, 0]) cube([holder_size[0], (holder_size[1]-tray_size[1])/2, top_size]);
|
||||||
|
mirror([0,1,0]) translate([0, 2.5-(holder_size[1]-tray_size[1])/2 - tray_size[1], 0]) cube([holder_size[0], (holder_size[1]-tray_size[1])/2, top_size]);
|
||||||
|
cube([5, tray_size[1], top_size]);
|
||||||
|
translate([holder_size[0]-holder_margin, 0, 0]) cube([holder_margin, tray_size[1], top_size]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// pillars
|
||||||
|
translate([0, 2.5-(holder_size[1]-tray_size[1])/2, 0]) {
|
||||||
|
cube([5, (holder_size[1]-tray_size[1])/2-3, holder_size[2]]);
|
||||||
|
translate([0, holder_size[1]-2-(holder_size[1]-tray_size[1])/2, 0]) cube([5, (holder_size[1]-tray_size[1])/2-3, holder_size[2]]);
|
||||||
|
translate([holder_size[0]-5, holder_size[1]-2-(holder_size[1]-tray_size[1])/2, 0]) cube([5, (holder_size[1]-tray_size[1])/2-3, holder_size[2]]);
|
||||||
|
translate([holder_size[0]-5, 0, 0]) cube([5, (holder_size[1]-tray_size[1])/2-3, holder_size[2]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// studs
|
||||||
|
translate([(holder_size[1]-tray_size[1])/4, -(holder_size[1]-tray_size[1])/4, holder_size[2]+2.5]) {
|
||||||
|
cylinder(h=5, r=2.5, center=true);
|
||||||
|
translate([holder_size[0]-(holder_size[1]-tray_size[1])/2, 0, 0]) cylinder(h=5, r=2.5, center=true);
|
||||||
|
translate([0, holder_size[1]-(holder_size[1]-tray_size[1])/2, 0]) cylinder(h=5, r=2.5, center=true);
|
||||||
|
translate([holder_size[0]-(holder_size[1]-tray_size[1])/2, holder_size[1]-(holder_size[1]-tray_size[1])/2, 0]) cylinder(h=5, r=2.5, center=true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
union() {
|
||||||
|
tray();
|
||||||
|
translate([(holder_size[1]-tray_size[1])/4-5.01, -(holder_size[1]-tray_size[1])/4, -0.501]) {
|
||||||
|
cylinder(h=5, r=2.5, center=true);
|
||||||
|
translate([holder_size[0]-(holder_size[1]-tray_size[1])/2, 0, 0]) cylinder(h=5, r=2.5, center=true);
|
||||||
|
translate([0, holder_size[1]-(holder_size[1]-tray_size[1])/2, 0]) cylinder(h=5, r=2.5, center=true);
|
||||||
|
translate([holder_size[0]-(holder_size[1]-tray_size[1])/2, holder_size[1]-(holder_size[1]-tray_size[1])/2, 0]) cylinder(h=5, r=2.5, center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// color("#f0f0f0") holder();
|
21
master.scad
Normal file
21
master.scad
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
include <holder/holder.scad>
|
||||||
|
include <tray/orangepi.scad>
|
||||||
|
include <tray/raspberry.scad>
|
||||||
|
|
||||||
|
$fn=100;
|
||||||
|
|
||||||
|
holder();
|
||||||
|
translate(offset_pi(raspberry_pi_size)) raspberry_pi();
|
||||||
|
raspberry_tray();
|
||||||
|
|
||||||
|
translate([0, 0, holder_size[2]]) {
|
||||||
|
holder();
|
||||||
|
translate(offset_pi(orange_pi_pc_size)) orange_pi_pc();
|
||||||
|
orange_pi_pc_tray();
|
||||||
|
}
|
||||||
|
|
||||||
|
translate([0, 0, holder_size[2]*2]) {
|
||||||
|
holder();
|
||||||
|
translate(offset_pi(orange_pi_4_size)) orange_pi_4();
|
||||||
|
orange_pi_4_tray();
|
||||||
|
}
|
30
pi/orangepi.scad
Normal file
30
pi/orangepi.scad
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
orange_pi_pc_size = [85, 55, 1.4];
|
||||||
|
orange_pi_4_size = [91, 56, 1.4];
|
||||||
|
|
||||||
|
module orange_pi_holes(size) {
|
||||||
|
hole_radius = 2.7/2;
|
||||||
|
hole_center = 1.3+hole_radius;
|
||||||
|
union() {
|
||||||
|
// bottom
|
||||||
|
translate([hole_center, hole_center, 0]) cylinder(h=10, r=hole_radius, center=true);
|
||||||
|
translate([size[0]-hole_center, hole_center, 0]) cylinder(h=10, r=hole_radius, center=true);
|
||||||
|
// top
|
||||||
|
translate([hole_center, size[1]-hole_center, 0]) cylinder(h=10, r=hole_radius, center=true);
|
||||||
|
translate([size[0]-hole_center, size[1]-hole_center, 0]) cylinder(h=10, r=hole_radius, center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module orange_pi(size) {
|
||||||
|
color("#0000ff")
|
||||||
|
difference() {
|
||||||
|
cube(size);
|
||||||
|
orange_pi_holes(size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module orange_pi_pc() { orange_pi(orange_pi_pc_size); }
|
||||||
|
module orange_pi_4() { orange_pi(orange_pi_4_size); }
|
||||||
|
module orange_pi_pc_holes() { orange_pi_holes(orange_pi_pc_size); }
|
||||||
|
module orange_pi_4_holes() { orange_pi_holes(orange_pi_4_size); }
|
||||||
|
// orange_pi_pc();
|
||||||
|
// orange_pi_4();
|
24
pi/raspberry.scad
Normal file
24
pi/raspberry.scad
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
raspberry_pi_size = [85, 56, 1.4];
|
||||||
|
|
||||||
|
module raspberry_pi_holes(size) {
|
||||||
|
hole_radius = 2.7/2;
|
||||||
|
hole_center = 3.5;
|
||||||
|
union() {
|
||||||
|
// left side
|
||||||
|
translate([hole_center, hole_center, 0]) cylinder(h=10, r=hole_radius, center=true);
|
||||||
|
translate([hole_center, size[1]-hole_center, 0]) cylinder(h=10, r=hole_radius, center=true);
|
||||||
|
// right side
|
||||||
|
translate([58+hole_center, hole_center, 0]) cylinder(h=10, r=hole_radius, center=true);
|
||||||
|
translate([58+hole_center, size[1]-hole_center, 0]) cylinder(h=10, r=hole_radius, center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module raspberry_pi() {
|
||||||
|
color("#00ff00")
|
||||||
|
difference() {
|
||||||
|
cube(raspberry_pi_size);
|
||||||
|
raspberry_pi_holes(raspberry_pi_size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// raspberry_pi();
|
56
tray/common.scad
Normal file
56
tray/common.scad
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
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];
|
||||||
|
brim_size = [3, tray_size[1], pillar_size[0]];
|
||||||
|
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
|
||||||
|
translate([tray_size[0]-brim_size[0], 0, tray_size[2]]) cube(brim_size);
|
||||||
|
}
|
||||||
|
// 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]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove edges of brim
|
||||||
|
translate([0, 0, tray_size[2]]) union() {
|
||||||
|
cube([tray_size[0]+1, 2.8, 10]);
|
||||||
|
translate([0, tray_size[1]-2.7, 0]) cube([tray_size[0]+1, 2.8, 10]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
33
tray/orangepi.scad
Normal file
33
tray/orangepi.scad
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
include <common.scad>
|
||||||
|
|
||||||
|
module orange_pi_pillars(size) {
|
||||||
|
hole_radius = 2.7/2;
|
||||||
|
hole_center = 1.3+hole_radius;
|
||||||
|
translate([0, 0, -pillar_size[0]/2]) union() {
|
||||||
|
// bottom
|
||||||
|
translate([hole_center, hole_center, 0]) pillar();
|
||||||
|
translate([size[0]-hole_center, hole_center, 0]) pillar();
|
||||||
|
// top
|
||||||
|
translate([hole_center, size[1]-hole_center, 0]) pillar();
|
||||||
|
translate([size[0]-hole_center, size[1]-hole_center, 0]) pillar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module orange_pi_4_tray() {
|
||||||
|
union() {
|
||||||
|
tray();
|
||||||
|
translate(offset_pi(orange_pi_4_size)) orange_pi_pillars(orange_pi_4_size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module orange_pi_pc_tray() {
|
||||||
|
union() {
|
||||||
|
tray();
|
||||||
|
translate(offset_pi(orange_pi_pc_size)) orange_pi_pillars(orange_pi_pc_size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// translate(offset_pi(orange_pi_4_size)) orange_pi_4();
|
||||||
|
// orange_pi_4_tray();
|
||||||
|
// translate(offset_pi(orange_pi_pc_size)) orange_pi_pc();
|
||||||
|
// orange_pi_pc_tray();
|
24
tray/raspberry.scad
Normal file
24
tray/raspberry.scad
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
include <common.scad>
|
||||||
|
|
||||||
|
module raspberry_pillars() {
|
||||||
|
hole_radius = 2.7/2;
|
||||||
|
hole_center = 3.5;
|
||||||
|
translate([0, 0, -pillar_size[0]/2]) union() {
|
||||||
|
// left side
|
||||||
|
translate([hole_center, hole_center, 0]) pillar();
|
||||||
|
translate([hole_center, raspberry_pi_size[1]-hole_center, 0]) pillar();
|
||||||
|
// right side
|
||||||
|
translate([58+hole_center, hole_center, 0]) pillar();
|
||||||
|
translate([58+hole_center, raspberry_pi_size[1]-hole_center, 0]) pillar();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module raspberry_tray() {
|
||||||
|
union() {
|
||||||
|
tray();
|
||||||
|
translate(offset_pi(raspberry_pi_size)) raspberry_pillars();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// translate(offset_pi(raspberry_pi_size)) raspberry_pi();
|
||||||
|
// raspberry_tray();
|
Loading…
Reference in New Issue
Block a user