Browse Source

working on design

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
main
Stephan Richter 1 year ago
parent
commit
dd700290ac
  1. 71
      catflap.scad

71
catflap.scad

@ -2,35 +2,56 @@ @@ -2,35 +2,56 @@
door_thick = 50;
flap_w = 150;
flap_h = 150;
flap_thick = 20;
flap_thick = 6;
bearing_inner_dia = 5;
bearing_outer_dia = 10;
bearing_outer_dia = 20;
bearing_h = 5;
gap = 1;
/* constants */
$fn = 32;
rx = [90,0,0]; // rotate 90 deg around x
ry = [0,90,0]; // rotate 90 deg around y
silver = [0.7,0.7,0.7];
plexy = [0.4,0.6,1,0.6];
red = [1,0,0];
/* variable */
raise_stopper = 2;
angle = 11;
raise_stopper = 0;
angle = 0;
module door(){
translate([-450,0,0])cube([900,door_thick,2000]);
difference(){
translate([900,door_thick,0]/-2)cube([900,door_thick,2000]);
translate([-flap_w/2-gap,(door_thick+1)/-2,-1])cube([2*gap+flap_w,door_thick+1,flap_h+1]);
}
}
module stopper_guide(){
translate([-30,flap_thick/2,bearing_outer_dia])
difference(){
cube([60,flap_thick,20-bearing_outer_dia]);
translate([8,0,5])rotate(rx) cylinder(d=4,h=40,center=true);
translate([52,0,5])rotate(rx) cylinder(d=4,h=40,center=true);
}
}
module flap(){
difference(){
translate([flap_w,flap_thick,0]/-2)
cube([flap_w,flap_thick,flap_h]);
translate([2*(10+gap)+bearing_h,bearing_outer_dia+gap,2]/-2)
cube([bearing_h+2*(gap+10),bearing_outer_dia+gap,2*bearing_h+20+gap+1]);
color(plexy) {
difference(){
translate([flap_w,flap_thick,0]/-2)
cube([flap_w,flap_thick,flap_h]);
translate([2*(10+gap)+bearing_h,bearing_outer_dia+gap,2]/-2)
cube([bearing_h+2*(gap+10),bearing_outer_dia+gap,2*bearing_h+20+gap+1]);
}
translate([0,0,flap_h])
rotate(ry)
cylinder(d=flap_thick,h=flap_w,center=true);
stopper_guide();
rotate([0,0,180])stopper_guide();
}
translate([0,0,flap_h])rotate(ry)#cylinder(d=flap_thick,h=flap_w,center=true);
translate([0,0,raise_stopper])stopper();
}
@ -45,14 +66,16 @@ module bearing(){ @@ -45,14 +66,16 @@ module bearing(){
module bearing_case(){
rotate(ry)
cylinder(d=(bearing_inner_dia+gap)/2,h=bearing_h+gap);
translate([(bearing_h+gap)/2,0,bearing_inner_dia/2])
cylinder(d=bearing_inner_dia-gap,h=bearing_h+gap);
translate([(bearing_h+gap)/2,0,0])
rotate(ry)
cylinder(d=bearing_outer_dia,h=10);
translate([(bearing_h+1)/2,-bearing_outer_dia/2,0])
cube([10,bearing_outer_dia,bearing_h+20]);
translate([0,bearing_outer_dia/-2,bearing_h+1])
cube([bearing_h,bearing_outer_dia,19]);
cylinder(d=flap_thick,h=10);
translate([bearing_h+1,-flap_thick,0]/2)
cube([10,flap_thick,bearing_h+20]);
translate([0,flap_thick/-2,bearing_h+1])
cube([bearing_h,flap_thick,19]);
translate([0,flap_thick/-2-2,20])
#cube([(20+bearing_h+gap)/2,flap_thick+4,5]);
}
module stopper(){
@ -64,11 +87,19 @@ module stopper(){ @@ -64,11 +87,19 @@ module stopper(){
}
module frame(){
// TODO
difference(){
translate([flap_w+20,0,20]/-2)
cube([flap_w+20,door_thick,flap_h+20]);
translate([flap_w+2*gap,1,gap]/-2)
cube([flap_w+2*gap,door_thick+1,flap_h+2*gap]);
translate([bearing_h+2*gap,bearing_outer_dia-door_thick,bearing_outer_dia+2]/-2)
cube([bearing_h+2*gap,bearing_outer_dia,2+bearing_outer_dia/2]);
}
}
*door();
translate([0,0,flap_h])
translate([0,door_thick/-2,flap_h]) frame();
translate([0,0,flap_h*2])
rotate([angle,0,0])
translate([0,0,-flap_h])
flap();

Loading…
Cancel
Save