working on better design
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
angle = 10;
|
||||
raise = 10;
|
||||
tunnel_w = 160;
|
||||
tunnel_h = 160;
|
||||
tunnel_t = 10; // tunnel thickness
|
||||
@@ -5,19 +7,35 @@ tunnel_s = 40; // tunnel spacing: overlap for screws
|
||||
door_t = 50; // door thickness
|
||||
plexy_t = 6; // thickness of plexy glass sheet
|
||||
gap = 1; // gap between parts moving relative to each other
|
||||
seal = 5;
|
||||
angle = 0;
|
||||
guide_h = 20;
|
||||
seal = 5; // thickness of seal. May be set to gap
|
||||
guide_h = 40;
|
||||
bearing_inner_dia = 10;
|
||||
bearing_outer_dia = 20;
|
||||
bearing_h = 5;
|
||||
stopper_h = 40;
|
||||
stopper_w = 30;
|
||||
space = bearing_outer_dia; // space between plexy glass sheets
|
||||
|
||||
// calculations
|
||||
rad = 3*plexy_t/2;
|
||||
rad = (space+2*plexy_t)/2;
|
||||
sheet_h = tunnel_h-2*seal-rad;
|
||||
|
||||
// colors
|
||||
plexy = [0.4,0.6,1,0.6];
|
||||
red = [1,0,0];
|
||||
green = [0,0.6,0];
|
||||
silver = [0.7,0.7,0.7];
|
||||
snow = [1,1,1,0.5];
|
||||
wood = [0.8,0.3,0];
|
||||
|
||||
// constants
|
||||
$fn = 32;
|
||||
rx = [90,0,0]; // rotate 90 deg around x
|
||||
ry = [0,90,0]; // rotate 90 deg around y
|
||||
x = [1,0,0];
|
||||
y = [0,1,0];
|
||||
z = [0,0,1];
|
||||
|
||||
module door(){
|
||||
color(wood) difference(){
|
||||
cube([1000,door_t,2000],true);
|
||||
@@ -33,30 +51,89 @@ module tunnel(){
|
||||
color(snow)difference(){
|
||||
union(){
|
||||
tunnel_core();
|
||||
translate([0,(door_t+tunnel_t)/2,0]) cube([tunnel_w+2*tunnel_s,tunnel_t,tunnel_h+2*tunnel_s],true); // krempe
|
||||
translate([0,(door_t+tunnel_t)/-2,0]) cube([tunnel_w+2*tunnel_s,tunnel_t,tunnel_h+2*tunnel_s],true); // krempe
|
||||
translate(-y*(door_t+tunnel_t)/2) cube([tunnel_w+2*tunnel_s,tunnel_t,tunnel_h+2*tunnel_s],true); // krempe
|
||||
translate( y*(door_t+tunnel_t)/2) cube([tunnel_w+2*tunnel_s,tunnel_t,tunnel_h+2*tunnel_s],true); // krempe
|
||||
}
|
||||
cube([tunnel_w,door_t+2*tunnel_t+2,tunnel_h],true); // loch
|
||||
}
|
||||
}
|
||||
|
||||
module sheets(){
|
||||
translate([0,-plexy_t,-sheet_h/2])cube([tunnel_w-2*seal,plexy_t,sheet_h],true);
|
||||
translate([0, plexy_t,-sheet_h/2])cube([tunnel_w-2*seal,plexy_t,sheet_h],true);
|
||||
module screw(){
|
||||
rotate(x*90)cylinder(d=4,h=space+3*plexy_t,center=true);
|
||||
}
|
||||
|
||||
translate([0,0,guide_h/2-sheet_h])cube([10,plexy_t,guide_h],true);
|
||||
module sheets(){
|
||||
difference(){
|
||||
union(){
|
||||
translate([0,(space+plexy_t)/2,-sheet_h/2])cube([tunnel_w-2*seal,plexy_t,sheet_h],true);
|
||||
translate([0, (plexy_t+space)/-2,-sheet_h/2])cube([tunnel_w-2*seal,plexy_t,sheet_h],true);
|
||||
}
|
||||
hull(){
|
||||
translate(-z*(sheet_h+10)) rotate(ry) cylinder(d=bearing_outer_dia+2*gap,h=bearing_h+2*gap,center=true);
|
||||
translate(z*(bearing_outer_dia/2-sheet_h)) rotate(ry) cylinder(d=bearing_outer_dia+2*gap,h=bearing_h+2*gap,center=true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module guide(){
|
||||
a = guide_h-gap-10;
|
||||
b = 10+gap+stopper_w/2;
|
||||
translate([b, 0,a/2-sheet_h])cube([20,space,a],true);
|
||||
translate([-b, 0,a/2-sheet_h])cube([20,space,a],true);
|
||||
|
||||
}
|
||||
|
||||
module bearing_case(){
|
||||
a = bearing_h/2+gap;
|
||||
rotate(ry) cylinder(d=bearing_inner_dia-gap,h=a);
|
||||
translate([a/2+stopper_w/4,0,stopper_h/2]) cube([stopper_w/2-a,space-2*gap,stopper_h],true);
|
||||
translate([(stopper_w/2+5)/2,0,stopper_h-5]) cube([stopper_w/2+5,space-2*gap,10],true);
|
||||
}
|
||||
|
||||
module bearing(){
|
||||
color(silver)
|
||||
rotate(ry)
|
||||
difference(){
|
||||
cylinder(d=bearing_outer_dia,h=bearing_h,center=true);
|
||||
cylinder(d=bearing_inner_dia,h=bearing_h+2,center=true);
|
||||
}
|
||||
}
|
||||
|
||||
module stopper(){
|
||||
color(green) {
|
||||
bearing_case();
|
||||
rotate(z*180)bearing_case();
|
||||
}
|
||||
bearing();
|
||||
}
|
||||
|
||||
module flap(){
|
||||
translate([0,0,(sheet_h-rad)/2]) rotate([angle,0,0]) union(){
|
||||
b = 10+gap+stopper_w/2;
|
||||
translate(z*(sheet_h-rad)/2) rotate(x*angle) {
|
||||
difference(){
|
||||
rotate([0,90,0]) cylinder(d=3*plexy_t,h=tunnel_w-2*seal,center=true);
|
||||
rotate(y*90) cylinder(d=2*rad,h=tunnel_w-2*seal,center=true);
|
||||
sheets();
|
||||
translate([tunnel_w/ 4,0,rad/-2])screw();
|
||||
translate([tunnel_w/-4,0,rad/-2])screw();
|
||||
}
|
||||
color(plexy)sheets();
|
||||
color(plexy) difference(){
|
||||
union(){
|
||||
sheets();
|
||||
guide();
|
||||
}
|
||||
translate([b,0,5-sheet_h])screw();
|
||||
translate([b,0,guide_h-15-gap-sheet_h])screw();
|
||||
translate([-b,0,5-sheet_h])screw();
|
||||
translate([-b,0,guide_h-15-gap-sheet_h])screw();
|
||||
translate([tunnel_w/ 4,0,rad/-2])screw();
|
||||
translate([tunnel_w/-4,0,rad/-2])screw();
|
||||
}
|
||||
translate(z*(raise-sheet_h))stopper();
|
||||
}
|
||||
}
|
||||
|
||||
*door();
|
||||
*tunnel();
|
||||
door();
|
||||
tunnel();
|
||||
flap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user