Commit dca43a7f by Hubert

created openscad eurobox container with screws, waterpipe and drain holes

1 parent 0914eb49
include<vars.scad>
module cornerdrills() {
translate([2.4,0.8,0]) {
cylinder(d=0.6,h=40, $fn=10);
}
translate([0.8,2.4,0]) {
cylinder(d=0.6,h=40, $fn=10);
}
}
module draindrills(x,y) {
/* translate([x/2,y/2,-5]) { */
/* #cylinder(d=1,h=10); */
/* } */
minX = gratesize+strength+0.6;
minY = gratesize+strength+0.6;
maxX = x-gratesize-strength-0.6;
maxY = y-gratesize-strength-0.6;
/* echo(minX); */
/* echo(maxX); */
for (mmx =[minX,maxX])
for (mmy =[minY,maxY])
translate([ mmx
, mmy
, -5
]) cylinder(d=0.6,h=10, $fn=10);
for (xx =[1:5])
for (yy =[1:5])
translate([x/6*xx,y/6*yy,-5])
cylinder(d=1,h=10, $fn=10);
/* translate([x/2,y/4,-5]) { */
/* #cylinder(d=1,h=10); */
/* } */
/* translate([x/4,y/2,-5]) { */
/* #cylinder(d=1,h=10); */
/* } */
}
module gx12drill(z) {
translate([gxXPos,gxYPos,0])
cylinder(d=1.2,h=3, $fn=10);
translate([gxXPos,gxYPos,z-2])
cylinder(d=1.2,h=3, $fn=10);
translate([gxXPos,gxYPos,z-4])
cylinder(d=0.6,h=3, $fn=10);
}
module pipedrill() {
translate([1,5,0]) cylinder(d=0.6,h=50, $fn=10);
}
module drills(x,y,z) {
draindrills(x,y);
cornerdrills();
mirror([0,1,0]) translate([0,-y,0]) cornerdrills();
mirror([1,0,0]) translate([-x,0,0]) cornerdrills();
mirror([1,0,0]) translate([-x,y,0]) mirror([0,1,0]) cornerdrills();
mirror([1,0,0]) translate([-x,0,0]) gx12drill(z);
mirror([1,0,0]) translate([-x,0,0]) rotate([0,0,90]) translate([0,-1.4,0]) gx12drill(z);
pipedrill();
}
include<vars.scad>
include<modules.scad>
module handleShape(x,y,z,extra,bool){
translate([
x/2 - handleWidth/2 - offset,
-( offset+1 ),
z-(2.06+roundborderInner+strength*3)
]) {
hull() {
translate([-extra,0,-1])cube([handleWidth+extra*2,5,1]);
translate([handleCorner,0,handleCorner-handleHeight]) rotate([-90,0,0]) union() {
cylinder(r=handleCorner+extra,h=5);
translate([handleWidth-handleCorner*2,0,0]) cylinder(r=handleCorner+extra,h=5);
}
}
if(bool==true) {
hull() {
translate([-strength*2,0,-1.5])
cube([handleWidth+strength*4,1,1]);
translate([-strength*2,0.85,-(1+handleHeight+strength)])
cube([handleWidth+strength*4,1,1]);
}
}
}
}
module volume(x,y,z,extra) {
hull() {minkowski() {
translate([strength*1.5,strength*1.5,0]) cube([
x-(offset)*2-strength*3,
y-(offset)*2-strength*3,
1
]);
sphere(r=roundborderInner+extra);
}
minkowski() {
translate([0,0,z]) cube([
x-(offset)*2,
y-(offset)*2,
1
]);
sphere(r=roundborderInner+extra);
}
}
}
module innerWall(x,y,z) {
difference() {
volume(x,y,z,strength);
volume(x,y,z,0);
}
}
module grateX(x,y,z) {
translate([0,8,0]) cube([x/2,strength,z]);
}
module grateY(x,y,z) {
translate([7,0,0]) cube([strength,y/2,z]);
}
module grateXY(x,y,z) {
translate([0,0+strength/2,0]) {
rotate([0,0,-45])
cube([strength,y/2,z]);
}
}
module grateZ(x,y,z) {
translate([-(offset),-(offset),z])
cube([x,y,strength]);
}
module grates(x,y,z) {
translate([ -offset,
-offset,
base ]) {
union() {
grateX(x,y,z);
grateY(x,y,z);
grateXY(x,y,z);
}
}
}
module mirroredgrates(x,y,z) {
union() {
union() {
grates(x,y,z);
translate([-offset*2+x,0, 0]) mirror([1,0,0]) grates(x,y,z);
}
translate([0,-offset*2+y, 0]) mirror([0,1,0]) {
union() {
grates(x,y,z);
translate([-offset*2+x,0, 0]) mirror([1,0,0]) grates(x,y,z);
}
}
}
}
module eurobox(x,y,z,handle) {
color("#888") translate([offset, offset, roundborderInner+strength]) {
difference () {
union() {
intersection() {
union() {
innerWall(x,y,z);
mirroredgrates(x,y,z);
grateZ(x,y,base);
grateZ(x,y,z-(roundborderInner+strength*2));
grateZ(x,y,z-(2.06+roundborderInner+strength*3));
if (handle==true) {
handleShape(x,y,z,strength,bool=false);
translate([0,y-4,0])mirror([0,1,0]){
handleShape(x,y,z,strength,bool=false);
}
}
}
intersection() {
shapeZ(x,y,z);
translate([-offset,-offset,-(roundborderInner+strength)]) cube([x,y,z]);
}
}
}
union() {
volume(x,y,z,0);
if (handle==true) {
handleShape(x,y,z,0,bool=true);
translate([0,y-offset*2,0])mirror([0,1,0]){
handleShape(x,y,z,0,bool=true);
}
}
}
}
}
}
/* eurobox(30,40,22,true); */
/* testprobes */
/* translate([0,18,0]) #cube([1.9,2,3]); */
/* translate([0,18,18]) #cube([1.5,2,3]); */
/* difference(){ */
/* eurobox(30,40,22,true); */
/* translate([-1,-1,-10]) cube([15,20,30]); */
/* } */
include<eurobox.scad>
include<lid.scad>
include<cuts.scad>
include<screws.scad>
include<pipes.scad>
/* translate([0,0,2]) euroboxlid(30,40); */
/* translate([0,0,-7]) cuts(); */
/* translate([0,0,-7]) { */
/* difference() { */
/* eurobox(30,40,7,handle=false); */
/* cuts(); */
/* } */
translate([0,0,6.3]) {
difference() {
eurobox(30,40,22,handle=true);
drills(30,40,22);
}
screws(30,40,22);
pipes(22);
}
#translate([0,0,6.3+21.3]) {
difference() {
eurobox(30,40,22,handle=true);
drills(30,40,22);
}
screws(30,40,22);
pipes(22);
}
strength = 5;
width = 30;
height = 13;
length = 136;
radius = 5;
difference() {
#cube([length,width,height]);
translate([strength,strength,-strength/2])
cube([length-strength*2,width-strength*2,height+strength]);
}
\ No newline at end of file
solid OpenSCAD_Model
facet normal 1 -0 0
outer loop
vertex 136 0 13
vertex 136 30 0
vertex 136 30 13
endloop
endfacet
facet normal 1 0 0
outer loop
vertex 136 30 0
vertex 136 0 13
vertex 136 0 0
endloop
endfacet
facet normal 0 0 1
outer loop
vertex 136 30 13
vertex 131 25 13
vertex 136 0 13
endloop
endfacet
facet normal 0 0 1
outer loop
vertex 136 30 13
vertex 5 25 13
vertex 131 25 13
endloop
endfacet
facet normal 0 0 1
outer loop
vertex 5 25 13
vertex 0 30 13
vertex 5 5 13
endloop
endfacet
facet normal -0 0 1
outer loop
vertex 0 30 13
vertex 5 25 13
vertex 136 30 13
endloop
endfacet
facet normal -0 0 1
outer loop
vertex 131 5 13
vertex 136 0 13
vertex 131 25 13
endloop
endfacet
facet normal -0 0 1
outer loop
vertex 5 5 13
vertex 136 0 13
vertex 131 5 13
endloop
endfacet
facet normal 0 0 1
outer loop
vertex 5 5 13
vertex 0 0 13
vertex 136 0 13
endloop
endfacet
facet normal 0 0 1
outer loop
vertex 0 0 13
vertex 5 5 13
vertex 0 30 13
endloop
endfacet
facet normal 0 0 -1
outer loop
vertex 136 0 0
vertex 131 5 0
vertex 136 30 0
endloop
endfacet
facet normal 0 0 -1
outer loop
vertex 136 0 0
vertex 5 5 0
vertex 131 5 0
endloop
endfacet
facet normal -0 0 -1
outer loop
vertex 5 5 0
vertex 0 0 0
vertex 5 25 0
endloop
endfacet
facet normal 0 0 -1
outer loop
vertex 0 0 0
vertex 5 5 0
vertex 136 0 0
endloop
endfacet
facet normal 0 0 -1
outer loop
vertex 131 25 0
vertex 136 30 0
vertex 131 5 0
endloop
endfacet
facet normal 0 0 -1
outer loop
vertex 5 25 0
vertex 136 30 0
vertex 131 25 0
endloop
endfacet
facet normal 0 0 -1
outer loop
vertex 5 25 0
vertex 0 30 0
vertex 136 30 0
endloop
endfacet
facet normal 0 0 -1
outer loop
vertex 0 30 0
vertex 5 25 0
vertex 0 0 0
endloop
endfacet
facet normal -1 0 0
outer loop
vertex 0 0 0
vertex 0 30 13
vertex 0 30 0
endloop
endfacet
facet normal -1 -0 0
outer loop
vertex 0 30 13
vertex 0 0 0
vertex 0 0 13
endloop
endfacet
facet normal 0 1 -0
outer loop
vertex 136 30 0
vertex 0 30 13
vertex 136 30 13
endloop
endfacet
facet normal 0 1 0
outer loop
vertex 0 30 13
vertex 136 30 0
vertex 0 30 0
endloop
endfacet
facet normal 0 -1 0
outer loop
vertex 0 0 0
vertex 136 0 13
vertex 0 0 13
endloop
endfacet
facet normal 0 -1 -0
outer loop
vertex 136 0 13
vertex 0 0 0
vertex 136 0 0
endloop
endfacet
facet normal -1 0 0
outer loop
vertex 131 5 0
vertex 131 25 13
vertex 131 25 0
endloop
endfacet
facet normal -1 -0 0
outer loop
vertex 131 25 13
vertex 131 5 0
vertex 131 5 13
endloop
endfacet
facet normal 1 -0 0
outer loop
vertex 5 5 13
vertex 5 25 0
vertex 5 25 13
endloop
endfacet
facet normal 1 0 0
outer loop
vertex 5 25 0
vertex 5 5 13
vertex 5 5 0
endloop
endfacet
facet normal 0 -1 0
outer loop
vertex 5 25 0
vertex 131 25 13
vertex 5 25 13
endloop
endfacet
facet normal 0 -1 -0
outer loop
vertex 131 25 13
vertex 5 25 0
vertex 131 25 0
endloop
endfacet
facet normal 0 1 -0
outer loop
vertex 131 5 0
vertex 5 5 13
vertex 131 5 13
endloop
endfacet
facet normal 0 1 0
outer loop
vertex 5 5 13
vertex 131 5 0
vertex 5 5 0
endloop
endfacet
endsolid OpenSCAD_Model
/* Copyright (C) 2021 Hubert Berezowski */
/* This program is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <https://www.gnu.org/licenses/>. */
include<vars.scad>
include<modules.scad>
module lidbordertop(x,y,offset) {
translate([ roundborderInner+strength*2 + offset
, roundborderInner+strength*2 + offset
, 0.1
]) difference() {
minkowski() {
cube([ x-(roundborderInner+strength*2)*2 - offset*2
, y-(roundborderInner+strength*2)*2 - offset*2
, 0.1
]);
cylinder( r=roundborderInner+strength
, h=0.95 - 0.2
);
}
minkowski() {
translate([strength,strength,-0.5])
cube([ x-(roundborderInner+strength*3)*2 - offset*2
, y-(roundborderInner+strength*3)*2 - offset*2
, 0.1
]);
cylinder( r=roundborderInner
, h=2
);
}
}
}
module tubpositive(x,y,offset) {
difference(){
minkowski() {
translate([ offset
, offset
, roundborderInner-lidrecess
]) cube([ x-offset*2
, y-offset*2
, 1
]);
sphere(r=roundborderInner);
}
translate([0,0,0.1]) cube([ x
, y
, 2
]);
}
}
module tubnegative(x,y,offset) {
minkowski() {
translate([ offset+strength
, offset+strength
, -lidrecess+strength+roundborderInner/2
]) cube([ x-offset*2-strength*2
, y-offset*2-strength*2
, 1
]);
sphere(r=roundborderInner/2);
}
}
module euroboxlid(x,y) {
translate([0,0,lidrecess]){
difference() {
union() {
lidbordertop(x,y,1.4);
tubpositive(x,y,2.8);
intersection() {
cube([x,y,strength]);
translate([offset, offset, roundborderInner+strength])
shapeZ(x,y);
}
}
tubnegative(x,y,2.8);
}
}
}
include<vars.scad>
module materialDot(radius, height, roundness) {
roundness = roundness >= height/2 ? height/2-0.000001 : roundness;
translate([0,0, roundness]) minkowski() {
linear_extrude( height = height-roundness*2
, convexity = 10
, twist = 0 )
circle( r=radius-roundness);
sphere(r=roundness);
}
}
module shapeZ(x,y,z) {
translate([0,0,-25]) minkowski() {
cube([
x-(offset)*2,
y-(offset)*2,
1
]);
cylinder(
r=offset,
h=50
);
}
}
module pushInAdapterStraignt() {
difference() {
union() {
cylinder(d=0.95,h=3.6, $fn=10);
translate([0,0,0.1]) cylinder(d=1.5,h=1.2, $fn=20);
translate([0,0,2.3]) cylinder(d=1.5,h=1.2, $fn=20);
}
translate([0,0,-0.1]) cylinder(d=0.7,h=10, $fn=10);
}
}
module sidepipe(z) {
/* translate([0,0,0.6+strength+1.7]) { */
translate([0,0,1+1.7+0.3]) {
difference() {
cylinder(d=0.6,h=z-1, $fn=10);
translate([0,0,-0.1]) cylinder(d=0.4,h=z, $fn=10);
}
}
}
module pipes(z) {
translate([1,5,0]) {
color("#fff") sidepipe(z);
color("#fff") translate([0,0,1.1]) {
pushInAdapterStraignt();
}
}
}
module screw6x50() {
color("#ccc") translate([0,0,-0.3]) {
cylinder(d=0.58,h=5, $fn=10);
translate([0,0,-0.3]) {
cylinder(d=1,h=0.3,$fn=6);
}
}
}
module shim() {
color("#eee") cylinder(d=1.3,h=0.1);
}
module nut() {
color("#aaa") cylinder(d=1,h=0.3,$fn=6);
}
module cornerscrew(z) {
translate([0,0,2]) shim();
translate([0,0,1.7]) nut();
translate([0,0,-0.30]) shim();
translate([0,0,-0.30+strength+0.1]) shim();
translate([0,0,-0.30+strength+0.2]) nut();
screw6x50();
}
module cornerscrews(z) {
translate([2.4
, 0.8
, z - 2.36
])
cornerscrew(z);
translate([0.8
, 2.4
, z - 2.36
])
cornerscrew(z);
}
module screws(x,y,z) {
cornerscrews(22);
mirror([0,1,0]) translate([0,-y,0]) cornerscrews(22);
mirror([1,0,0]) translate([-x,0,0]) cornerscrews(22);
mirror([1,0,0]) translate([-x,y,0]) mirror([0,1,0]) cornerscrews(22);
}
$fn=20;
strength = 0.25;strength = 0.25;
gratesize = 1.68;
roundborderInner = 0.5;
recess = 0.787;
lidrecess = 0.57;
handleWidth = 12.63;
handleHeight = 3;
handleCorner = 0.8;
gxXPos = 5.8;
gxYPos = 0.7;
offset = gratesize+roundborderInner;
base = recess-(roundborderInner+strength);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!