1
0
mirror of https://github.com/pgrondek/SixInchRack.git synced 2024-11-22 03:53:42 +00:00

Merge pull request #1 from aschiweck/master

Merge additional models
This commit is contained in:
Przemek Grondek 2019-10-02 07:20:32 +00:00 committed by GitHub
commit ba41bdc38a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 874938 additions and 150 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,131 @@
include<../sixinch_library.scad>
debug = false;
if (debug) {
$fn = 16;
color("red") {
AnkerPowerPort5();
}
}
//////////////////////////////////////////////////
// PASTE ALL OF: sixinch_library.scad IN HERE //
// Thingiverse can only accept one file. //
//////////////////////////////////////////////////
AnkerPowerPort5_length = 90;
AnkerPowerPort5_height = 27;
AnkerPowerPort5_width = 58;
AnkerPowerPort5_powerdepth = 50;
Part = "a"; // [a:All, b:FrontPlate, c:Cabinet, d:Lid, e:BackPlate, f:Handles]
Units = 3;
Depth = AnkerPowerPort5_length + AnkerPowerPort5_powerdepth;
xoffset = ((width - AnkerPowerPort5_width) / 2) - 2;
yoffset = (((Units * unit) - AnkerPowerPort5_height) / 2) - 2;
round_holes = [[6, 9, 6],
[6, 5, 6],
[6, 1, 6]];
square_holes = [[xoffset + 5.5, yoffset + 6, 6, 14],
[xoffset + 5.5 +(1*10), yoffset + 6, 6, 14],
[xoffset + 5.5 +(2*10), yoffset + 6, 6, 14],
[xoffset + 5.5 +(3*10), yoffset + 6, 6, 14],
[xoffset + 5.5 +(4*10), yoffset + 6, 6, 14]];
go();
module go(){
rotate([90,0,-90]){
if(Part=="a"){
frontplate(Units,[],[],[],[Units/2],[45],[45]);
cabinet_supported () {
cabinet(Depth,Units,[45],[],[Units/2]);
}
lid_supported () {
lid(Depth,Units,[45],[45]);
}
back_plate(Units, Depth, [45], [45], [Units/2], square_holes, round_holes);
handle(Units, false);
}else if(Part=="b"){
frontplate(Units,[],[],[],[Units/2],[45],[45]);
}else if(Part=="c"){
cabinet_supported () {
cabinet(Depth,Units,[45],[],[Units/2]);
}
}else if(Part=="d"){
lid_supported () {
lid(Depth,Units,[45],[45]);
}
}else if(Part=="e"){
back_plate(Units, Depth, [45], [45], [Units/2], square_holes, round_holes);
}else if(Part=="f"){
handle(Units, true);
}
}
}
module lid_supported () {
children();
difference () {
union () {
translate([(sixinch - AnkerPowerPort5_width) / 2 , (Units * unit), (AnkerPowerPort5_length / 3) * 2 + AnkerPowerPort5_powerdepth]) {
rotate([90, 0, 0]) {
cylinder(h=20, r=5);
}
}
translate([((sixinch - AnkerPowerPort5_width) / 2) + AnkerPowerPort5_width, (Units * unit), (AnkerPowerPort5_length / 3) * 2 + AnkerPowerPort5_powerdepth]) {
rotate([90, 0, 0]) {
cylinder(h=20, r=5);
}
}
}
rotate([0, 90, 90]){
AnkerPowerPort5();
}
}
}
module cabinet_supported () {
children();
difference () {
union () {
translate([(sixinch - AnkerPowerPort5_width) / 2, 20, (AnkerPowerPort5_length / 3) * 2 + AnkerPowerPort5_powerdepth]) {
rotate([90, 0, 0]) {
cylinder(h=20, r=5);
}
}
translate([((sixinch - AnkerPowerPort5_width) / 2) + AnkerPowerPort5_width, 20, (AnkerPowerPort5_length / 3) * 2 + AnkerPowerPort5_powerdepth]) {
rotate([90, 0, 0]) {
cylinder(h=20, r=5);
}
}
translate([(sixinch - AnkerPowerPort5_width) / 2, 20, AnkerPowerPort5_powerdepth + 1]) {
rotate([90, 0, 0]) {
cylinder(h=20, r=5);
}
}
translate([((sixinch - AnkerPowerPort5_width) / 2) + AnkerPowerPort5_width, 20, AnkerPowerPort5_powerdepth + 1]) {
rotate([90, 0, 0]) {
cylinder(h=20, r=5);
}
}
}
rotate([0, 90, 90]){
AnkerPowerPort5();
}
}
}
module AnkerPowerPort5 () {
rotate([0,0,0]) {
translate([-AnkerPowerPort5_length - 1 - AnkerPowerPort5_powerdepth, -AnkerPowerPort5_width - ((sixinch - AnkerPowerPort5_width) / 2), ((Units * unit) - AnkerPowerPort5_height) / 2]) {
cube([AnkerPowerPort5_length, AnkerPowerPort5_width, AnkerPowerPort5_height ]);
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,116 @@
include<../sixinch_library.scad>
/* debug = false; */
/* if (debug) { */
/* $fn = 16; */
/* translate([85.5, 4, 54]) { */
/* rotate(a=[-90, -90, 0]) { */
/* color("red") { */
/* import("../../../Open_SCAD_Raspberry_PI3_model/files/Pi3HifiBerry.stl"); */
/* } */
/* } */
/* } */
/* } */
///////////////////////////////
// Raspberry Pi 3 Model B //
///////////////////////////////
print_frontplate_sml = false;
print_handle_sml = false;
print_cabinet_sml = false;
print_lid = false;
print_rear = true;
remove = true;
if(print_frontplate_sml){ // Frontplate //
square_hole = [];
round_hole = [[65 ,7.5, 3.1],[69.5 ,7.5, 3.1]];
round_peg = [];
screw_side_front = [];
screw_top = [36];
screw_bottom_front = [36];
units = 3;
frontplate(units,square_hole,round_hole,round_peg,screw_side_front,screw_top,screw_bottom_front);
}
if(print_handle_sml){ // Handle //
units = 3;
lay_flat_for_print = false;
handle(units,lay_flat_for_print);
}
if(print_cabinet_sml){ // Cabinet //
w=88;
h=70;
screw_bottom_front = [36];
screw_side_front = [];
round_peg = [[w,h,6,3,4],
[w-49,h,6,3,4],
[w-49,h-58,6,3,4],
[w,h-58,6,3,4]];
depth = 98;
units = 3;
difference() {
cabinet(depth,units,screw_bottom_front,round_peg,screw_side_front);
hull() {
hull() {
rotate(a=90, v=[0, 1, 0]) {
translate([-45.5, 30, 10]) {
cylinder(h=50, r=7);
}
}
rotate(a=90, v=[0, 1, 0]) {
translate([-62.5, 30, 10]) {
cylinder(h=50, r=7);
}
}
}
hull() {
rotate(a=90, v=[0, 1, 0]) {
translate([-45.5, 50, 10]) {
cylinder(h=50, r=7);
}
}
rotate(a=90, v=[0, 1, 0]) {
translate([-62.5, 50, 10]) {
cylinder(h=50, r=7);
}
}
}
}
}
}
if(print_lid){ // Lid //
depth = 98;
units = 3;
screw_front = [36];//mm
screw_back = [36];//mm
lid(98,3,screw_front,screw_back);
translate([65, 20.5, 12]) {
cube([40, 21.5, 5]);
}
translate([65, 20.5, 71]) {
cube([40, 21.5, 5]);
}
}
if(print_rear){ // Back plate //
square_hole = [[37, 5, 17, 15] , [57, 6, 15, 16] , [75, 6, 15, 16] ];
round_hole = [[6,5,6],[6,1,6], [24,3.5,3.5], [24,1.2,3.5] ,[30,3.5,3.5], [30,1.2,3.5]];
screw_top = [36];//mm
screw_bottom = [36];//mm
screw_side = [];
depth = 98;
units = 3;
back_plate(units,depth,screw_top,screw_bottom,screw_side,square_hole,round_hole);
}

View File

@ -0,0 +1,3 @@
$fn=50;
cylinder(h=14, d=2.8);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

203
RackCabinets/SMSLSA50/case.scad Executable file
View File

@ -0,0 +1,203 @@
include<../sixinch_library.scad>
debug = false;
if (debug) {
$fn = 16;
color("red") {
sa50();
}
}
//////////////////////////////////////////////////
// PASTE ALL OF: sixinch_library.scad IN HERE //
// Thingiverse can only accept one file. //
//////////////////////////////////////////////////
sa50_length = 117.5;
sa50_height = 39;
sa50_width = 88;
Part = "a"; // [a:All, b:FrontPlate, b2:FrontPlate2, c:Cabinet, d:Lid, e:BackPlate, f:Handles]
Units = 5;
Depth = sa50_length;
xoffset = (width - sa50_width) / 2;
yoffset = ((Units * unit) - sa50_height) / 2;
round_holes = [[xoffset + 12, yoffset + 14, 10],
[xoffset + 12, yoffset + 28, 10],
[xoffset + 35.5, yoffset + 10, 13],
[xoffset + 35.5, yoffset + 26, 13],
[xoffset + 54, yoffset + 10, 13],
[xoffset+ 54, yoffset + 26, 13],
[xoffset + 73, yoffset + 13.5, 7]];
go();
module go(){
rotate([90,0,-90]){
if(Part=="a"){
lower() {
frontplate(Units,[],[],[],[Units/2],[45],[45]);
}
upper() {
frontplate(Units,[],[],[],[Units/2],[45],[45]);
}
cabinet_supported () {
cabinet(Depth,Units,[45],[],[Units/2]);
}
lid_supported () {
lid(Depth,Units,[45],[45]);
}
back_plate(Units, Depth, [45], [45], [Units/2], [], round_holes);
handle(Units,false);
}else if(Part=="b"){
lower() {
frontplate(Units,[],[],[],[Units/2],[45],[45]);
}
}else if(Part=="b2"){
upper() {
frontplate(Units,[],[],[],[Units/2],[45],[45]);
}
}else if(Part=="c"){
cabinet_supported () {
cabinet(Depth,Units,[45],[],[Units/2]);
}
}else if(Part=="d"){
lid_supported () {
lid(Depth,Units,[45],[45]);
}
}else if(Part=="e"){
back_plate(Units, Depth, [45], [45], [Units/2], [], round_holes);
/* translate([-sa50_length, -sa50_width - ((sixinch - sa50_width) / 2), ((Units * unit) - sa50_height) / 2]) { */
/* cube([10, 10, 10]); */
/* } */
}else if(Part=="f"){
handle(Units,true);
}
}
}
module lower () {
difference() {
children();
rotate([0, 90, 90]){
sa50();
}
rotate([0, 90, 90]){
translate([0, 0, -sa50_height]) {
sa50();
}
}
}
}
module upper () {
intersection() {
children();
rotate([0, 90, 90]){
translate([0, 0, -sa50_height]) {
sa50();
}
}
}
rotate([-90,90,0]) {
translate([-6, -(width - sa50_width + 10), 2]) {
cube([3, 8, 12]);
}
translate([-6, - width - 10, 2]) {
cube([3, 8, 12]);
}
}
}
module lid_supported () {
children();
difference () {
union () {
translate([(sixinch - sa50_width) / 2 , (Units * unit), (sa50_length / 2) + 20]) {
rotate([90, 0, 0]) {
cylinder(h=20, r=5);
}
}
translate([((sixinch - sa50_width) / 2) + sa50_width, (Units * unit), (sa50_length / 2) + 20]) {
rotate([90, 0, 0]) {
cylinder(h=20, r=5);
}
}
}
rotate([0, 90, 90]){
sa50();
}
}
}
module cabinet_supported () {
children();
difference () {
union () {
translate([(sixinch - sa50_width) / 2, 25, (sa50_length / 2) - 45]) {
rotate([90, 0, 0]) {
cylinder(h=25, r=5);
}
}
translate([((sixinch - sa50_width) / 2) + sa50_width, 25, (sa50_length / 2) - 45]) {
rotate([90, 0, 0]) {
cylinder(h=25, r=5);
}
}
translate([(sixinch - sa50_width) / 2, 25, (sa50_length / 2)]) {
rotate([90, 0, 0]) {
cylinder(h=25, r=5);
}
}
translate([((sixinch - sa50_width) / 2) + sa50_width, 25, (sa50_length / 2)]) {
rotate([90, 0, 0]) {
cylinder(h=25, r=5);
}
}
difference () {
translate([((sixinch - sa50_width) / 2) + 5 + 10, 20, sa50_length - 12 - 5]) {
rotate([90, 0, 0]) {
cylinder(h=20, r=5 + 2);
}
}
translate([((sixinch - sa50_width) / 2) + 5 + 10, 20, sa50_length - 12]) {
rotate([90, 0, 0]) {
cylinder(h=8, r=5.5);
}
}
}
difference () {
translate([((sixinch - sa50_width) / 2) + sa50_width - 5 - 10, 20, sa50_length - 12 - 5]) {
rotate([90, 0, 0]) {
cylinder(h=20, r=5 + 2);
}
}
translate([((sixinch - sa50_width) / 2) + sa50_width - 5 - 10, 20, sa50_length - 12]) {
rotate([90, 0, 0]) {
cylinder(h=8, r=5.5);
}
}
}
}
rotate([0, 90, 90]){
sa50();
}
}
}
module sa50 () {
rotate([0,0,0]) {
translate([-sa50_length, -sa50_width - ((sixinch - sa50_width) / 2), ((Units * unit) - sa50_height) / 2]) {
cube([sa50_length, sa50_width, sa50_height ]);
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

68980
RackCabinets/SMSLSA50/lid.stl Normal file

File diff suppressed because it is too large Load Diff

26714
RackCabinets/SMSLSA50/rear.stl Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,31 +2,31 @@
$fn = 50*1;
//Constants, do not change !
sixinch = 155*1; // cm = 6"
sixinch = 155*1; // cm = 6"
width = 155-20-20; // 11.5cm between rails
unit = (44.5/19)*6; // 1U
gauge = 3*1;
gauge_box = 2*1;
//Cabinet screws in mm. They can be changed a little
screw_head = 7.4;
screw_head_height = 2.2;
screw_dia = 3;
screw_hole = 2.6;
screw_head = 7.4;
screw_head_height = 2.2;
screw_dia = 3;
screw_hole = 2.6;
screw_length = 15;
nut_4mm = 8.1;
nut_4mm = 8.1;
slip = 0.35;
module chimney() {
module chimney() {
for(i=[0:8:80]){
echo(i);
translate([20 + (width-80)/2 +i,-1,20]){
minkowski(){
cube([0.01,200,30]);
sphere(d=2,h=1);
cube([0.01,200,30]);
sphere(d=2,h=1);
}
}
}
@ -34,26 +34,26 @@ for(i=[0:8:80]){
module back_plate(u,dp,screw_top,screw_bottom,screw_side,square_hole,round_hole){
difference(){
union(){
translate([20+gauge_box+slip,gauge_box+slip,gauge+dp-gauge_box]){
cube([width-2*gauge_box-2*slip, u*unit-2*gauge_box-2*slip, gauge_box]);
}
}
//Square holes
for(i=[0:len(square_hole)-1]){
x = square_hole[i][0];
y = square_hole[i][1];
w = square_hole[i][2];
h = square_hole[i][3];
translate([x+20+gauge_box,y+gauge_box,dp-1]){cube([w,h,gauge+2]);}
}
h = square_hole[i][3];
translate([x+20+gauge_box,y+gauge_box,dp-1]){cube([w,h,gauge+2]);}
}
//Round holes
if(len(round_hole)>0){
for(i=[0:len(round_hole)-1]){
@ -63,36 +63,36 @@ for(i=[0:8:80]){
translate([20+gauge_box+x,gauge_box+y,dp-4]){ cylinder(d=dia,h=10); }
}
}
//Screw holes
if(len(screw_top)>0){
for(i=[0:len(screw_top)-1]){
p = screw_top[i];
translate([p,unit*u-gauge_box-4,gauge+dp+0.1]){rotate([0,180,0]){screw();}}
translate([sixinch-p,unit*u-gauge_box-4,gauge+dp+0.1]){rotate([0,180,0]){screw();}}
translate([sixinch-p,unit*u-gauge_box-4,gauge+dp+0.1]){rotate([0,180,0]){screw();}}
}
}
if(len(screw_bottom)>0){
for(i=[0:len(screw_bottom)-1]){
p = screw_bottom[i];
p = screw_bottom[i];
translate([p,gauge_box+4 ,gauge+dp+0.1]){rotate([0,180,0]){screw();}}
translate([sixinch-p, gauge_box+4 ,gauge+dp+0.1]){rotate([0,180,0]){screw();}}
translate([sixinch-p, gauge_box+4 ,gauge+dp+0.1]){rotate([0,180,0]){screw();}}
}
}
if(len(screw_side)>0){
for(i=[0:len(screw_side)-1]){
p = screw_side[i];
translate([sixinch-20-6, unit*p ,gauge+dp+0.1]){rotate([0,180,0]){screw();}}
translate([20+6, unit*p ,gauge+dp+0.1]){rotate([0,180,0]){screw();}}
p = screw_side[i];
translate([sixinch-20-6, unit*p ,gauge+dp+0.1]){rotate([0,180,0]){screw();}}
translate([20+6, unit*p ,gauge+dp+0.1]){rotate([0,180,0]){screw();}}
}
}
}
}
module peg(x,y,od,id,he){
@ -101,28 +101,28 @@ module peg(x,y,od,id,he){
difference(){
cylinder(r=od/2,h=he);
translate([0,0,-0.5]){cylinder(r=id/2,h=he+1);}
}
}
}
}
}
module screwtrap(){
module screwtrap(){
difference(){
translate([0,0,5]){
intersection(){
scale([1,1,0.7]){
sphere(r=8);
}
sphere(r=8);
}
translate([0,-0.001,-10]){ cube([20,20,20]);}
}
}
}
translate([2,4,5]){
rotate([90,90,90]){
translate([0,0,-10]){ cylinder(r=screw_dia/2,h=20,$fn=100);}
}
}
}
}
}
@ -158,18 +158,18 @@ module nuttrap(){
module cabinet (dp,u,screw_bottom_front,round_peg,screw_side_front){
difference(){
box(dp,u,screw_bottom_front,round_peg,screw_side_front);
translate([20,unit/2+3,sixinch-40]){ cylinder(d=gauge_box,h=41);}
translate([20,unit/2+0,sixinch-40]){ cylinder(d=gauge_box,h=41);}
translate([20,unit/2-3,sixinch-40]){ cylinder(d=gauge_box,h=41);}
translate([20+width,unit/2+3,sixinch-40]){ cylinder(d=gauge_box,h=41);}
translate([20+width,unit/2+0,sixinch-40]){ cylinder(d=gauge_box,h=41);}
translate([20+width,unit/2-3,sixinch-40]){ cylinder(d=gauge_box,h=41);}
}
}
@ -177,121 +177,151 @@ module cabinet (dp,u,screw_bottom_front,round_peg,screw_side_front){
module box(dp,u,screw_bottom_front,round_peg,screw_side_front){
/* RaspberryPi3ModelBHifiBerry */
/* difference(){ */
/* union() { */
difference(){
translate([20,0,gauge]){
difference(){
cube([115,u*unit,dp]);
translate([gauge_box,gauge_box,-1]){ cube([115-gauge_box*2,u*unit,dp+2]);}
}
translate([gauge_box,gauge_box,-1]){ cube([115-gauge_box*2,u*unit,dp+2]);}
}
}
//CHIMNEY
chimney();
chimney();
}
//Screw mounts on the bottom plate
for(i=[0:len(screw_bottom_front)-1]){
p = screw_bottom_front[i];
translate([p+5,gauge_box,gauge]){rotate([0,-90,0]){screwtrap();}}
translate([sixinch-p+5,gauge_box,gauge]){rotate([0,-90,0]){screwtrap();}}
translate([sixinch-p+5,gauge_box,gauge]){rotate([0,-90,0]){screwtrap();}}
translate([p-5,gauge_box,gauge+dp-gauge_box]){rotate([0,90,0]){screwtrap();}}
translate([sixinch-p-5,gauge_box,gauge+dp-gauge_box]){rotate([0,90,0]){screwtrap();}}
}
//Screw mounts on the side of cabinet
if(len(screw_side_front)>0){
for(i=[0:len(screw_side_front)-1]){
p = screw_side_front[i]*unit;
translate([20+gauge_box,p-5,gauge]){rotate([0,-90,-90]){screwtrap();}}
translate([sixinch-20-gauge_box,p+5,gauge]){rotate([0,-90,90]){screwtrap();}}
translate([sixinch-20-gauge_box,p+5,gauge]){rotate([0,-90,90]){screwtrap();}}
translate([20+gauge_box,p+5,gauge+dp-gauge_box]){rotate([0,90,-90]){screwtrap();}}
translate([sixinch-20-gauge_box,p-5,gauge+dp-gauge_box]){rotate([0,90,90]){screwtrap();}}
translate([sixinch-20-gauge_box,p-5,gauge+dp-gauge_box]){rotate([0,90,90]){screwtrap();}}
}
}
//Screw mounts for lid. Two on each side, three if dp>90
translate([20+gauge_box,unit*u-gauge_box,gauge+10]){rotate([0,0,-90]){screwtrap();}}
translate([20+gauge_box,unit*u-gauge_box,gauge+dp-10-10]){rotate([0,0,-90]){screwtrap();}}
translate([20+gauge_box,unit*u-gauge_box,gauge+dp-10-10]){rotate([0,0,-90]){screwtrap();}}
translate([sixinch-20-gauge_box,unit*u-gauge_box,gauge+10+10]){rotate([180,0,-90]){screwtrap();}}
translate([sixinch-20-gauge_box,unit*u-gauge_box,gauge+dp-10-10+10]){rotate([180,0,-90]){screwtrap();}}
if(dp>90){
translate([sixinch-20-gauge_box,unit*u-gauge_box,gauge+dp/2-5+10]){rotate([180,0,-90]){screwtrap();}}
translate([20+gauge_box,unit*u-gauge_box,gauge+dp/2-5]){rotate([0,0,-90]){screwtrap();}}
}
//Lid rest bar
//Lid rest bar
translate([20+gauge_box,unit*u-3-gauge_box,gauge]){
linear_extrude(dp-gauge_box){polygon (points=[[0,0],[3,3],[0,3]]);}
}
translate([sixinch-20-gauge_box,unit*u-3-gauge_box,gauge]){
linear_extrude(dp-gauge_box){polygon (points=[[0,0],[-3,3],[0,3]]);}
}
// Back/front rest bar
translate([0,0,dp+gauge-2-gauge_box]){
difference(){
translate([20,0,0]){ cube([width,unit*u-gauge_box,2]); }
translate([20+gauge_box+2,gauge_box+2,-1]){ cube([width-2*gauge_box-4,unit*u,4]); }
translate([20+gauge_box+2,gauge_box+2,-1]){ cube([width-2*gauge_box-4,unit*u,4]); }
}
}
//PEGS Relative to inside corner
translate([20+gauge_box,0,gauge]){
translate([20+gauge_box,0,gauge]){
if(len(round_peg)>0){
for(i=[0:len(round_peg)-1]){
x = round_peg[i][0];
y = round_peg[i][1];
od = round_peg[i][2];
id = round_peg[i][3];
he = round_peg[i][4];
translate([x,0,y]){peg(0,0,od,id,he); }
}
id = round_peg[i][3];
he = round_peg[i][4];
translate([x,0,y]){peg(0,0,od,id,he);}
}
}
}
}
/* RaspberryPi3ModelBHifiBerry */
/* } */
/* translate([20+gauge_box,0,gauge]){ */
/* if(len(round_peg)>0){ */
/* for(i=[0:len(round_peg)-1]){ */
/* x = round_peg[i][0]; */
/* y = round_peg[i][1]; */
/* od = round_peg[i][2]; */
/* id = round_peg[i][3]; */
/* he = round_peg[i][4]; */
/* translate([x,5,y]){ */
/* color("red") { */
/* rotate([90, 0, 0]) { */
/* cylinder(h=4,r=1.5); */
/* } */
/* } */
/* } */
/* } */
/* } */
/* } */
/* } */
}
module lid(dp,u,screw_front,screw_back){
module lid(dp,u,screw_front,screw_back){
difference(){
union(){
union(){
if(len(screw_front)>0){
for(i=[0:len(screw_front)-1]){
p = screw_front[i];
for(i=[0:len(screw_front)-1]){
p = screw_front[i];
translate([p-5,unit*u-gauge_box,gauge]){rotate([0,-90,180]){screwtrap();}}
translate([sixinch-p-5,unit*u-gauge_box,gauge]){rotate([0,-90,180]){screwtrap();}}
}
}
}
if(len(screw_back)>0){
for(i=[0:len(screw_back)-1]){
p = screw_back[i];
for(i=[0:len(screw_back)-1]){
p = screw_back[i];
translate([p+5,unit*u-gauge_box,gauge+dp-gauge_box]){rotate([0,90,180]){screwtrap();}}
translate([sixinch-p+5,unit*u-gauge_box,gauge+dp-gauge_box]){rotate([0,90,180]){screwtrap();}}
translate([sixinch-p+5,unit*u-gauge_box,gauge+dp-gauge_box]){rotate([0,90,180]){screwtrap();}}
}
}
//lid
translate([20+gauge_box+slip,u*unit-gauge_box,gauge]){
cube([115-gauge_box*2-slip*2,gauge_box,dp]);
}
}
//back rest
translate([sixinch/2-40,u*unit-gauge_box-2,gauge+dp-2-gauge_box]){
cube([80,2,2]);
}
}
}
//Negative
translate([20+gauge_box+4,unit*u+0.01 ,gauge+10+5]){rotate([90,0,0]){screw();}}
translate([20+gauge_box+4,unit*u+0.01 ,gauge+dp-10-10+5]){rotate([90,0,0]){screw();}}
translate([20+gauge_box+4,unit*u+0.01 ,gauge+dp-10-10+5]){rotate([90,0,0]){screw();}}
translate([sixinch-20-gauge_box-4,unit*u+0.01 ,gauge+10+10-5]){rotate([90,0,0]){screw();}}
translate([sixinch-20-gauge_box-4,unit*u +0.01 ,gauge+dp-10-10+10-5]){rotate([90,0,0]){screw();}}
if(dp>90){
translate([sixinch-20-gauge_box-4,unit*u+0.01 ,gauge+dp/2-5+10-5]){rotate([90,0,0]){screw();}}
translate([20+gauge_box+4,unit*u+0.01 ,gauge+dp/2-5+5]){rotate([90,0,0]){screw();}}
translate([sixinch-20-gauge_box-4,unit*u+0.01 ,gauge+dp/2-5+10-5]){rotate([90,0,0]){screw();}}
if(!remove){
translate([20+gauge_box+4,unit*u+0.01 ,gauge+dp/2-5+5]){rotate([90,0,0]){screw();}}
}
}
chimney();
}
}
}
@ -299,62 +329,62 @@ module lid(dp,u,screw_front,screw_back){
module screw(){
cylinder(r1=screw_head/2, r2=screw_dia/2, h=screw_head_height);
cylinder(r=screw_dia/2, h=40);
translate([0,0,-0.99]){cylinder(r=screw_head/2, h=1);}
cylinder(r=screw_dia/2, h=40);
translate([0,0,-0.99]){cylinder(r=screw_head/2, h=1);}
}
module frontholes(u,screw_top,screw_bottom_front,screw_side_front){
if(len(screw_bottom_front)>0){
if(len(screw_bottom_front)>0){
for(i=[0:len(screw_bottom_front)-1]){
p = screw_bottom_front[i];
translate([p,gauge_box+4,-0.01]){screw();}
translate([sixinch-p,gauge_box+4,-0.01]){screw();}
}
}
if(len(screw_side_front)>0){
}
}
if(len(screw_side_front)>0){
for(i=[0:len(screw_side_front)-1]){
p = screw_side_front[i]*unit;
translate([20+gauge_box+4,p,-0.01]){screw();}
translate([sixinch-20-gauge_box-4,p,-0.01]){screw();}
}
}
if(len(screw_top)>0){
translate([sixinch-20-gauge_box-4,p,-0.01]){screw();}
}
}
if(len(screw_top)>0){
for(i=[0:len(screw_top)-1]){
p = screw_top[i];
translate([p,unit*u-gauge_box-4,-0.01]){screw();}
translate([sixinch-p,unit*u-gauge_box-4,-0.01]){screw();}
translate([sixinch-p,unit*u-gauge_box-4,-0.01]){screw();}
}
}
}
}
module handle(u,print){
if(print){
translate([16,-u*unit,8]){rotate([0,90,0]){handle1(u);}}
translate([0,-u*unit,8]){rotate([0,90,0]){handle1(u);}}
}else{
translate([22,2,0]){rotate([0,180,0]){handle1(u);}}
translate([sixinch-14,2,0]){rotate([0,180,0]){handle1(u);}}
}
translate([sixinch-14,2,0]){rotate([0,180,0]){handle1(u);}}
}
}
module handle1(u){
difference(){
handle2(8,u*unit-4,10,3);
translate([-1,5,-1]){handle2(10,u*unit-10-4,6,3);}
translate([4,2.5,-1]){ cylinder(r=screw_hole/2,h=9);}
translate([4,u*unit-4-2.5,-1]){ cylinder(r=screw_hole/2,h=9);}
}
}
module handle2(w,h,d,ra){
module handle2(w,h,d,ra){
translate([0,ra,d-ra]){
rotate([0,90,0]){
cylinder(r=ra,h=w);
@ -364,11 +394,11 @@ module handle2(w,h,d,ra){
rotate([0,90,0]){
cylinder(r=ra,h=w);
}
}
}
translate([0,ra,0]){
cube([w,h-ra-ra,d]);
}
cube([w,h,d-ra]);
cube([w,h,d-ra]);
}
@ -379,22 +409,22 @@ module insideprofile(l){
difference(){
union(){
translate([7.6,10,0]){cube([4.8,10,l]);}
translate([0,7.6,0]){cube([20,4.8,l]);}
translate([0,7.6,0]){cube([20,4.8,l]);}
translate([6.5,10-2.1,0]){cube([7 ,10,l]);}
translate([2.1,6.5,0]){cube([15.8,7 ,l]);}
translate([2.1,6.5,0]){cube([15.8,7 ,l]);}
}
translate([4,4,-1]){
cube([12,12,l+2]);
}
}
}
translate([20,20,0]){
rotate([0,-90,0]){
linear_extrude(20){
polygon (points=[[0,0],[l,0],[0,l]]);
}
}
}
}
}
@ -416,14 +446,14 @@ module leftbottomplate(t){
}
# translate([10,10,-1]){cylinder(r=2.5,h=base+2);}
translate([10,sixinch+20-10,-1]){cylinder(r=2.5,h=base+2);}
translate([(sixinch+20)/2-20,-1,2.1]){cube([40,sixinch+20+2,2]);}
}
translate([0,0,base]){insideprofile(10);}
rotate([0,0,180]){translate([-20,-sixinch-20,base]){insideprofile(10);}}
rotate([0,0,180]){translate([-20,-sixinch-20,base]){insideprofile(10);}}
}
@ -443,39 +473,39 @@ module frontplate(u,square_hole,round_hole,round_peg,screw_side_front,screw_top,
difference(){
baseplate(u);
//Square holes
if(len(square_hole)>0){
for(i=[0:len(square_hole)-1]){
x = square_hole[i][0];
y = square_hole[i][1];
w = square_hole[i][2];
h = square_hole[i][3];
translate([x,y,-1]){cube([w,h,gauge+2]);}
}
h = square_hole[i][3];
translate([x,y,-1]){cube([w,h,gauge+2]);}
}
}
//Round holes
if(len(round_hole)>0){
for(i=[0:len(round_hole)-1]){
x = round_hole[i][0];
y = round_hole[i][1];
d = round_hole[i][2];
translate([x,y,-1]){cylinder(r=d/2,gauge+1);}
}
d = round_hole[i][2];
translate([x,y,-1]){cylinder(r=d/2,gauge+1);}
}
}
//Cabinet holes
frontholes(u,screw_top,screw_bottom_front,screw_side_front);
//Handle holes
translate([18,4.5,gauge-0.25]){rotate([180,0,0]){screw();}}
translate([18,u*unit-4.5,gauge-0.25]){rotate([180,0,0]){screw();}}
translate([18,u*unit-4.5,gauge-0.25]){rotate([180,0,0]){screw();}}
translate([sixinch-18,4.5,gauge-0.25]){rotate([180,0,0]){screw();}}
translate([sixinch-18,u*unit-4.5,gauge-0.25]){rotate([180,0,0]){screw();}}
}
}
//chassis support
/*
@ -504,26 +534,30 @@ module frontplate(u,square_hole,round_hole,round_peg,screw_side_front,screw_top,
x = round_peg[i][0];
y = round_peg[i][1];
od = round_peg[i][2];
id = round_peg[i][3];
he = round_peg[i][4];
id = round_peg[i][3];
he = round_peg[i][4];
translate([x,y,gauge]){
difference(){
# cylinder(r=od/2,h=he);
# cylinder(r=id/2,h=he+1);
}
}
}
}
}
//cabinet support bars
translate([0,0,gauge]){
translate([20+width*0.25,gauge_box,0]){ cube([width*0.5,1,1.5]); }
translate([20+width*0.25,unit*u-1-gauge_box,0]){ cube([width*0.5,1,1.5]); }
/* translate([20+width*0.25,gauge_box,0]){ cube([width*0.5,1,1.5]); } */
/* translate([20+width*0.25,unit*u-1-gauge_box,0]){ cube([width*0.5,1,1.5]); } */
/* FIXME: */
translate([25+width*0.25,gauge_box,0]){ cube([width*0.5-12.5,1,1.5]); }
translate([25+width*0.25,unit*u-1-gauge_box,0]){ cube([width*0.5-12.5,1,1.5]); }
}
}
@ -551,25 +585,6 @@ module baseplate(u,handle){
if(u>=5){
translate([10-0.5,(u*unit)/2,-gauge/2]) {cylinder(r=2.3,gauge*2);}
translate([sixinch-10+0.5,(u*unit)/2,-gauge/2]) {cylinder(r=2.3,gauge*2);}
}
}
}
}
}