Browse Source

working on better design

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
main
Stephan Richter 1 year ago
parent
commit
9737e93b76
  1. 105
      katzenklappe.scad

105
katzenklappe.scad

@ -1,3 +1,5 @@
angle = 10;
raise = 10;
tunnel_w = 160; tunnel_w = 160;
tunnel_h = 160; tunnel_h = 160;
tunnel_t = 10; // tunnel thickness tunnel_t = 10; // tunnel thickness
@ -5,19 +7,35 @@ tunnel_s = 40; // tunnel spacing: overlap for screws
door_t = 50; // door thickness door_t = 50; // door thickness
plexy_t = 6; // thickness of plexy glass sheet plexy_t = 6; // thickness of plexy glass sheet
gap = 1; // gap between parts moving relative to each other gap = 1; // gap between parts moving relative to each other
seal = 5; seal = 5; // thickness of seal. May be set to gap
angle = 0; guide_h = 40;
guide_h = 20; 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 // calculations
rad = 3*plexy_t/2; rad = (space+2*plexy_t)/2;
sheet_h = tunnel_h-2*seal-rad; sheet_h = tunnel_h-2*seal-rad;
// colors // colors
plexy = [0.4,0.6,1,0.6]; 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]; snow = [1,1,1,0.5];
wood = [0.8,0.3,0]; 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(){ module door(){
color(wood) difference(){ color(wood) difference(){
cube([1000,door_t,2000],true); cube([1000,door_t,2000],true);
@ -33,30 +51,89 @@ module tunnel(){
color(snow)difference(){ color(snow)difference(){
union(){ union(){
tunnel_core(); 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(-y*(door_t+tunnel_t)/2) 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
} }
cube([tunnel_w,door_t+2*tunnel_t+2,tunnel_h],true); // loch cube([tunnel_w,door_t+2*tunnel_t+2,tunnel_h],true); // loch
} }
} }
module screw(){
rotate(x*90)cylinder(d=4,h=space+3*plexy_t,center=true);
}
module sheets(){ module sheets(){
translate([0,-plexy_t,-sheet_h/2])cube([tunnel_w-2*seal,plexy_t,sheet_h],true); difference(){
translate([0, plexy_t,-sheet_h/2])cube([tunnel_w-2*seal,plexy_t,sheet_h],true); 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);
translate([0,0,guide_h/2-sheet_h])cube([10,plexy_t,guide_h],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(){ 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(){ 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(); 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(); door();
*tunnel(); tunnel();
flap(); flap();

Loading…
Cancel
Save