initialize

This commit is contained in:
2022-02-06 10:19:03 +01:00
commit 75749efa02
61 changed files with 5121 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
include<luniebox-helper.scad>
module luniebox_back() {
difference() {
union() {
cube([length+depth,height+depth,depth]);
// screws RFID MC522
translate([length/2-22,height*0.6-13.5,depth])
screw();
translate([length/2-22,height*0.6+13.5,depth])
screw();
translate([length/2+16.5,height*0.6-18,depth])
screw();
translate([length/2+16.5,height*0.6+18,depth])
screw();
// clips
translate([clip_space,0,0])
clip_screw();
translate([clip_space,height-clip_h+depth,0])
clip_screw();
translate([clip_length_space,height-clip_h+depth,0])
clip_screw();
translate([clip_length_space,0,0])
clip_screw();
translate([clip_h,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([clip_h,clip_height_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_height_space,0])
rotate([0,0,90])
clip_screw();
}
// USB port hole
translate([54+depth,14+depth,0])
rounded_cube(s=[10,6,depth],r=1.5);
translate([38,20+depth,-render_limiter])
cube([10,1.5,depth+render_limiter*2]);
}
}
luniebox_back();
+48
View File
@@ -0,0 +1,48 @@
include<luniebox-helper.scad>
module luniebox_bottom() {
difference() {
union() {
cube([length+depth,width+depth,depth]);
// clips
translate([6,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([6,clip_width_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_width_space,0])
rotate([0,0,90])
clip_screw();
// screws Raspi Zero
translate([length-10,5+depth,depth])
screw();
translate([length-68,5+depth,depth])
screw();
translate([length-10,28+depth,depth])
screw();
translate([length-68,28+depth,depth])
screw();
// screws MCP
translate([length/2-7.5,width/2-7+depth,depth])
screw();
translate([length/2+7.5,width/2-7+depth,depth])
screw();
}
// clip holes
translate([clip_space,depth+clip_d/2,0])
clip_hole();
translate([clip_length_space,depth+clip_d/2,0])
clip_hole();
translate([clip_space,width-clip_d/2,0])
clip_hole();
translate([clip_length_space,width-clip_d/2,0])
clip_hole();
}
}
luniebox_bottom();
+10
View File
@@ -0,0 +1,10 @@
difference() {
cube([94,50,3]);
translate([6,-0.001,-0.001])
cube([82,44.002,1.502]);
translate([3,-0.001,1.499])
cube([88,47.002,1.502]);
}
+76
View File
@@ -0,0 +1,76 @@
include<luniebox-helper.scad>
module luniebox_front() {
difference() {
union() {
cube([length+depth,height+depth,depth]);
// screws speaker right
translate([height/2-22.5,height/2-22.5,depth])
screw();
translate([height/2+22.5,height/2-22.5,depth])
screw();
translate([height/2-22.5,height/2+22.5,depth])
screw();
translate([height/2+22.5,height/2+22.5,depth])
screw();
// screws speaker left
translate([length-height/2-22.5,height/2-22.5,depth])
screw();
translate([length-height/2+22.5,height/2-22.5,depth])
screw();
translate([length-height/2-22.5,height/2+22.5,depth])
screw();
translate([length-height/2+22.5,height/2+22.5,depth])
screw();
// clips
translate([clip_space,0,0])
clip_screw();
translate([clip_space,height-clip_h+depth,0])
clip_screw();
translate([clip_length_space,height-clip_h+depth,0])
clip_screw();
translate([clip_length_space,0,0])
clip_screw();
translate([clip_h,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([clip_h,clip_height_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_height_space,0])
rotate([0,0,90])
clip_screw();
}
// speaker hole right
translate([height/2,height/2,-depth / 2])
cylinder(d=50,h=depth*2);
// speaker hole left
translate([length-height/2,height/2,-depth / 2])
cylinder(d=50,h=depth * 2);
// screw holes speaker right
translate([height/2-22.5,height/2-22.5,depth])
screw_hole(depth);
translate([height/2+22.5,height/2-22.5,depth])
screw_hole(depth);
translate([height/2-22.5,height/2+22.5,depth])
screw_hole(depth);
translate([height/2+22.5,height/2+22.5,depth])
screw_hole(depth);
// screw holes speaker left
translate([length-height/2-22.5,height/2-22.5,depth])
screw_hole(depth);
translate([length-height/2+22.5,height/2-22.5,depth])
screw_hole(depth);
translate([length-height/2-22.5,height/2+22.5,depth])
screw_hole(depth);
translate([length-height/2+22.5,height/2+22.5,depth])
screw_hole(depth);
}
}
luniebox_front();
+74
View File
@@ -0,0 +1,74 @@
$fa = 1;
$fs = 0.05;
render_limiter = 0.001;
depth = 2;
length = 190;
width = 70;
height = 70;
clip_space=20;
clip_d=5;
clip_h=6;
clip_length_space=length - clip_space + depth;
clip_width_space=width - clip_space + depth;
clip_height_space=height - clip_space + depth;
module clip_screw() {
d=clip_d;
h=clip_h;
translate([0,0,d/2+depth])
rotate([-90,0,0])
difference() {
union() {
cylinder(d=d,h=h);
translate([-d/2,0,0])
cube([d,d/2,h]);
}
translate([0,0,-render_limiter])
cylinder(d=d/2,h=h+render_limiter*2);
}
}
module clip_hole(h=0) {
d=clip_d;
translate([0,0,-render_limiter])
cylinder(d=d/2,h=h+depth+render_limiter * 2);
}
module clip(width=15) {
translate([-render_limiter,-render_limiter,-render_limiter])
cube([width +render_limiter * 2,depth + render_limiter * 2,depth + render_limiter * 2]);
}
module screw_hole(depth=0,d=clip_d/2) {
z= -depth - render_limiter;
h=7+depth;
translate([0,0,z])
cylinder(d=d,h=h);
}
module screw(d=clip_d,h=clip_h) {
difference() {
cylinder(d=d,h=h);
screw_hole(d=d/2);
}
}
module rounded_cube(s=[1,1,1],r=0.5) {
x = s[0];
y = s[1];
z = s[2];
mx = x - 2*r;
my = y - 2*r;
mz = z / 2;
minkowski() {
cube([mx,my,mz]);
translate([r,r,-render_limiter])
cylinder(r=r,h=mz+render_limiter*2);
}
}
+31
View File
@@ -0,0 +1,31 @@
include<luniebox-helper.scad>
module luniebox_side() {
difference() {
cube([width+depth,height+depth*3,depth]);
// clip holes
translate([clip_space,clip_d/2+depth,0])
clip_hole();
translate([clip_width_space,clip_d/2+depth,0])
clip_hole();
translate([clip_space,height-clip_d/2+depth*2,0])
clip_hole();
translate([clip_width_space,height-clip_d/2+depth*2,0])
clip_hole();
translate([clip_d/2+depth,clip_space+depth,0])
clip_hole();
translate([clip_d/2+depth,clip_height_space+depth,0])
clip_hole();
translate([width-clip_d/2,clip_space+depth,0])
clip_hole();
translate([width-clip_d/2,clip_height_space+depth,0])
clip_hole();
}
}
luniebox_side();
+46
View File
@@ -0,0 +1,46 @@
include<luniebox-helper.scad>
module luniebox_top() {
difference() {
union() {
cube([length+depth,width+depth,depth]);
// clips
translate([clip_h,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([clip_h,clip_width_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_width_space,0])
rotate([0,0,90])
clip_screw();
}
// clip holes
translate([clip_space,depth+clip_d/2,0])
clip_hole();
translate([clip_length_space,depth+clip_d/2,0])
clip_hole();
translate([clip_space,width-clip_d/2,0])
clip_hole();
translate([clip_length_space,width-clip_d/2,0])
clip_hole();
// right btn hole
translate([length/2-25+depth,(width+depth)/2,-depth/2])
cylinder(d=30,h=depth*2);
// left button hole
translate([length/2+25+depth,(width+depth)/2,-depth/2])
cylinder(d=30,h=depth*2);
// led holes
translate([length/2+depth,(width+depth)/2-16.666,-depth/2])
cylinder(d=2,h=depth*2);
translate([length/2+depth,(width+depth)/2,-depth/2])
cylinder(d=2,h=depth*2);
translate([length/2+depth,(width+depth)/2+16.666,-depth/2])
cylinder(d=2,h=depth*2);
}
}
luniebox_top();
+34
View File
@@ -0,0 +1,34 @@
include<luniebox-helper.scad>
use<luniebox-bottom.scad>
use<luniebox-front.scad>
use<luniebox-side.scad>
use<luniebox-top.scad>
use<luniebox-back.scad>
color(c=[1,0.1,0.1])
luniebox_bottom();
color(c=[0.2,1,0.2])
translate([0,width+depth,depth])
rotate([90,0,0])
luniebox_front();
color(c=[0.3,0.3,1])
translate([-depth,0,0])
rotate([90,0,90])
luniebox_side();
color(c=[1,1,0.4])
translate([length+depth,0,0])
rotate([90,0,90])
luniebox_side();
translate([0,width+depth,height+depth*3])
rotate([180,0,0])
color(c=[1,0.5,1])
luniebox_top();
color(c=[1,0.6,1])
translate([length+depth,0,depth])
rotate([90,0,180])
luniebox_back();
+48
View File
@@ -0,0 +1,48 @@
include<luniebox-helper.scad>
module luniebox_back() {
difference() {
union() {
cube([length+depth,height+depth,depth]);
// screws RFID MC522
translate([length/2-22,height*0.6-13.5,depth])
screw();
translate([length/2-22,height*0.6+13.5,depth])
screw();
translate([length/2+16.5,height*0.6-18,depth])
screw();
translate([length/2+16.5,height*0.6+18,depth])
screw();
// clips
translate([clip_space,0,0])
clip_screw();
translate([clip_space,height-clip_h+depth,0])
clip_screw();
translate([clip_length_space,height-clip_h+depth,0])
clip_screw();
translate([clip_length_space,0,0])
clip_screw();
translate([clip_h,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([clip_h,clip_height_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_height_space,0])
rotate([0,0,90])
clip_screw();
}
// USB port hole
translate([54+depth,14+depth,0])
rounded_cube(s=[10,6,depth],r=1.5);
translate([38,20+depth,-render_limiter])
cube([10,1.5,depth+render_limiter*2]);
}
}
luniebox_back();
+48
View File
@@ -0,0 +1,48 @@
include<luniebox-helper.scad>
module luniebox_bottom() {
difference() {
union() {
cube([length+depth,width+depth,depth]);
// clips
translate([6,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([6,clip_width_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_width_space,0])
rotate([0,0,90])
clip_screw();
// screws Raspi Zero
translate([length-10,5+depth,depth])
screw();
translate([length-68,5+depth,depth])
screw();
translate([length-10,28+depth,depth])
screw();
translate([length-68,28+depth,depth])
screw();
// screws MCP
translate([length/2-7.5,width/2-7+depth,depth])
screw();
translate([length/2+7.5,width/2-7+depth,depth])
screw();
}
// clip holes
translate([clip_space,depth+clip_d/2,0])
clip_hole();
translate([clip_length_space,depth+clip_d/2,0])
clip_hole();
translate([clip_space,width-clip_d/2,0])
clip_hole();
translate([clip_length_space,width-clip_d/2,0])
clip_hole();
}
}
luniebox_bottom();
@@ -0,0 +1,10 @@
difference() {
cube([94,50,3]);
translate([6,-0.001,-0.001])
cube([82,44.002,1.502]);
translate([3,-0.001,1.499])
cube([88,47.002,1.502]);
}
+76
View File
@@ -0,0 +1,76 @@
include<luniebox-helper.scad>
module luniebox_front() {
difference() {
union() {
cube([length+depth,height+depth,depth]);
// screws speaker right
translate([height/2-22.5,height/2-22.5,depth])
screw();
translate([height/2+22.5,height/2-22.5,depth])
screw();
translate([height/2-22.5,height/2+22.5,depth])
screw();
translate([height/2+22.5,height/2+22.5,depth])
screw();
// screws speaker left
translate([length-height/2-22.5,height/2-22.5,depth])
screw();
translate([length-height/2+22.5,height/2-22.5,depth])
screw();
translate([length-height/2-22.5,height/2+22.5,depth])
screw();
translate([length-height/2+22.5,height/2+22.5,depth])
screw();
// clips
translate([clip_space,0,0])
clip_screw();
translate([clip_space,height-clip_h+depth,0])
clip_screw();
translate([clip_length_space,height-clip_h+depth,0])
clip_screw();
translate([clip_length_space,0,0])
clip_screw();
translate([clip_h,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([clip_h,clip_height_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_height_space,0])
rotate([0,0,90])
clip_screw();
}
// speaker hole right
translate([height/2,height/2,-depth / 2])
cylinder(d=50,h=depth*2);
// speaker hole left
translate([length-height/2,height/2,-depth / 2])
cylinder(d=50,h=depth * 2);
// screw holes speaker right
translate([height/2-22.5,height/2-22.5,depth])
screw_hole(depth);
translate([height/2+22.5,height/2-22.5,depth])
screw_hole(depth);
translate([height/2-22.5,height/2+22.5,depth])
screw_hole(depth);
translate([height/2+22.5,height/2+22.5,depth])
screw_hole(depth);
// screw holes speaker left
translate([length-height/2-22.5,height/2-22.5,depth])
screw_hole(depth);
translate([length-height/2+22.5,height/2-22.5,depth])
screw_hole(depth);
translate([length-height/2-22.5,height/2+22.5,depth])
screw_hole(depth);
translate([length-height/2+22.5,height/2+22.5,depth])
screw_hole(depth);
}
}
luniebox_front();
+74
View File
@@ -0,0 +1,74 @@
$fa = 1;
$fs = 0.05;
render_limiter = 0.001;
depth = 2;
length = 100;
width = 100;
height = 100;
clip_space=20;
clip_d=5;
clip_h=6;
clip_length_space=length - clip_space + depth;
clip_width_space=width - clip_space + depth;
clip_height_space=height - clip_space + depth;
module clip_screw() {
d=clip_d;
h=clip_h;
translate([0,0,d/2+depth])
rotate([-90,0,0])
difference() {
union() {
cylinder(d=d,h=h);
translate([-d/2,0,0])
cube([d,d/2,h]);
}
translate([0,0,-render_limiter])
cylinder(d=d/2,h=h+render_limiter*2);
}
}
module clip_hole(h=0) {
d=clip_d;
translate([0,0,-render_limiter])
cylinder(d=d/2,h=h+depth+render_limiter * 2);
}
module clip(width=15) {
translate([-render_limiter,-render_limiter,-render_limiter])
cube([width +render_limiter * 2,depth + render_limiter * 2,depth + render_limiter * 2]);
}
module screw_hole(depth=0,d=clip_d/2) {
z= -depth - render_limiter;
h=7+depth;
translate([0,0,z])
cylinder(d=d,h=h);
}
module screw(d=clip_d,h=clip_h) {
difference() {
cylinder(d=d,h=h);
screw_hole(d=d/2);
}
}
module rounded_cube(s=[1,1,1],r=0.5) {
x = s[0];
y = s[1];
z = s[2];
mx = x - 2*r;
my = y - 2*r;
mz = z / 2;
minkowski() {
cube([mx,my,mz]);
translate([r,r,-render_limiter])
cylinder(r=r,h=mz+render_limiter*2);
}
}
+31
View File
@@ -0,0 +1,31 @@
include<luniebox-helper.scad>
module luniebox_side() {
difference() {
cube([width+depth,height+depth*3,depth]);
// clip holes
translate([clip_space,clip_d/2+depth,0])
clip_hole();
translate([clip_width_space,clip_d/2+depth,0])
clip_hole();
translate([clip_space,height-clip_d/2+depth*2,0])
clip_hole();
translate([clip_width_space,height-clip_d/2+depth*2,0])
clip_hole();
translate([clip_d/2+depth,clip_space+depth,0])
clip_hole();
translate([clip_d/2+depth,clip_height_space+depth,0])
clip_hole();
translate([width-clip_d/2,clip_space+depth,0])
clip_hole();
translate([width-clip_d/2,clip_height_space+depth,0])
clip_hole();
}
}
luniebox_side();
+46
View File
@@ -0,0 +1,46 @@
include<luniebox-helper.scad>
module luniebox_top() {
difference() {
union() {
cube([length+depth,width+depth,depth]);
// clips
translate([clip_h,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([clip_h,clip_width_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_space,0])
rotate([0,0,90])
clip_screw();
translate([length+depth,clip_width_space,0])
rotate([0,0,90])
clip_screw();
}
// clip holes
translate([clip_space,depth+clip_d/2,0])
clip_hole();
translate([clip_length_space,depth+clip_d/2,0])
clip_hole();
translate([clip_space,width-clip_d/2,0])
clip_hole();
translate([clip_length_space,width-clip_d/2,0])
clip_hole();
// right btn hole
translate([length/2-25+depth,(width+depth)/2,-depth/2])
cylinder(d=30,h=depth*2);
// left button hole
translate([length/2+25+depth,(width+depth)/2,-depth/2])
cylinder(d=30,h=depth*2);
// led holes
translate([length/2+depth,(width+depth)/2-16.666,-depth/2])
cylinder(d=2,h=depth*2);
translate([length/2+depth,(width+depth)/2,-depth/2])
cylinder(d=2,h=depth*2);
translate([length/2+depth,(width+depth)/2+16.666,-depth/2])
cylinder(d=2,h=depth*2);
}
}
luniebox_top();
+34
View File
@@ -0,0 +1,34 @@
include<luniebox-helper.scad>
use<luniebox-bottom.scad>
use<luniebox-front.scad>
use<luniebox-side.scad>
use<luniebox-top.scad>
use<luniebox-back.scad>
color(c=[1,0.1,0.1])
luniebox_bottom();
color(c=[0.2,1,0.2])
translate([0,width+depth,depth])
rotate([90,0,0])
luniebox_front();
color(c=[0.3,0.3,1])
translate([-depth,0,0])
rotate([90,0,90])
luniebox_side();
color(c=[1,1,0.4])
translate([length+depth,0,0])
rotate([90,0,90])
luniebox_side();
translate([0,width+depth,height+depth*3])
rotate([180,0,0])
color(c=[1,0.5,1])
luniebox_top();
color(c=[1,0.6,1])
translate([length+depth,0,depth])
rotate([90,0,180])
luniebox_back();