doggie-door/limit-switch-flag-and-chain-catch.scad

66 lines
2.1 KiB
OpenSCAD
Raw Normal View History

2024-04-16 06:11:18 +00:00
showAssembled=0;
2024-04-03 23:04:36 +00:00
$fn=12;
flagHeight=15;
2024-04-16 06:11:18 +00:00
flagWidth=25;
2024-04-03 23:04:36 +00:00
flagDepth=10;
2024-04-16 06:11:18 +00:00
baseThickness=4;
chainHolderDiameter=4;
2024-04-03 23:04:36 +00:00
gutterHeight=5;
gutterWidth=4;
// slice it for printing
if (showAssembled) {
wholeModel();
} else {
2024-04-16 06:11:18 +00:00
translate([0,0,baseThickness]) rotate([180,0,180])
2024-04-03 23:04:36 +00:00
difference(){
wholeModel();
translate([-50,-50,baseThickness]) cube(100);
}
2024-04-16 06:11:18 +00:00
translate([-20,0,-baseThickness]) difference(){
2024-04-03 23:04:36 +00:00
wholeModel();
translate([-50,-50,-100+baseThickness]) cube(100);
}
}
module wholeModel(){
difference() {
union() {
translate([0,-gutterWidth/2,gutterHeight/2-(gutterHeight-1)]){
cube([flagDepth,flagWidth-gutterWidth,gutterHeight-2], center=true);
}
translate([0,-gutterWidth,(flagHeight-gutterHeight)/2]){
cube([flagDepth,flagWidth,flagHeight-gutterHeight], center=true);
}
2024-04-16 06:11:18 +00:00
translate([0,-(flagWidth+20)/2,baseThickness/2]){
2024-04-03 23:04:36 +00:00
difference(){
cube([flagDepth,20,baseThickness], center=true);
translate([0,0,0])
2024-04-16 06:11:18 +00:00
cylinder(h=baseThickness+1,r=2.5,center=true);
2024-04-03 23:04:36 +00:00
}
}
}
2024-04-16 06:11:18 +00:00
// screw holes
translate([0,flagWidth*.12,flagHeight*.65]) rotate([0,0,0]) cylinder(h=flagHeight/4,d=4.5, center=true);
translate([0,flagWidth*.12,flagHeight/4]) rotate([0,0,0]) cylinder(h=flagHeight+1,d=1.5, center=true);
translate([0,-flagWidth*.45,flagHeight*.65]) rotate([0,0,0]) cylinder(h=flagHeight/4,d=4.5, center=true);
translate([0,-flagWidth*.45,flagHeight/4]) rotate([0,0,0]) cylinder(h=flagHeight+1,d=1.5, center=true);
translate([0,2,baseThickness]){
2024-04-03 23:04:36 +00:00
chainHolder();
translate([0,chainHolderDiameter+.5,0]) chainHolder();
}
}
}
module chainHolder() {
translate([-flagDepth/3,-flagWidth/2+2,0]) rotate([0,90,0]) cylinder(h=flagDepth/2+1,d=chainHolderDiameter, center=true);
translate([flagDepth/3,-flagWidth/2+2,0]) rotate([0,90,0]) cylinder(h=flagDepth/2+1,d=chainHolderDiameter, center=true);
2024-04-16 06:11:18 +00:00
translate([0,-flagWidth/2+2,0]) rotate([0,90,0]) cylinder(h=flagDepth,d=1, center=true);
2024-04-03 23:04:36 +00:00
}