~kennylevinsen/skadis-brackets

e1c97c04398c88d587d8648478da60a7d836eb2a — Kenny Levinsen 1 year, 2 months ago a9792db
Split stuff
4 files changed, 181 insertions(+), 181 deletions(-)

A common.scad
M hook.scad
A powerdrill-bracket.scad
A screwdriver-bracket.scad
A common.scad => common.scad +48 -0
@@ 0,0 1,48 @@

module backTabs(short=false) {
    holeBore = 2.45;
    depth = 11;
    zOffset = -2.75;
    up = short ? 0.5 : 10;

    slotTolerance = 4.5;
    slotLength = 10 - slotTolerance;
    throughDepth = 5.5;

    translate([0, 0, zOffset])
        difference() {
            union() {
                hull() {
                    // lower slot, made of 2 balls cut to half height
                    intersection() {
                        hull() {
                            translate([0, up, -1+zOffset])
                                sphere(r=holeBore);
                            translate([0, -8.5, -1+zOffset])
                                sphere(r=holeBore);
                        }
                        hull() {
                            translate([0, up, -1-holeBore+zOffset])
                                cylinder(h=holeBore, r=holeBore);
                            translate([0, -8.5, -1-holeBore+zOffset])
                                cylinder(h=holeBore, r=holeBore);
                        }
                    }

                    // Top edge, two slim cylinders
                    translate([0, up, -0.1+zOffset])
                        cylinder(h=0.1, r=holeBore);
                    translate([0, -9, -0.1+zOffset])
                        cylinder(h=0.1, r=holeBore);
                }

                // Through-slot component
                hull() {
                    translate([0, (slotLength/2)-(slotTolerance/2), -throughDepth/2])
                        cylinder(h=throughDepth, r=holeBore);
                    translate([0, (-slotLength/2)-(slotTolerance/2), -throughDepth/2])
                        cylinder(h=throughDepth, r=holeBore);
                };
            }
        }
}

M hook.scad => hook.scad +6 -181
@@ 1,66 1,12 @@
$fn = 100;

module prism(l, w, h){
   polyhedron(
           points=[[0,0,0], [l,0,0], [l,w,0], [0,w,0], [0,w,h], [l,w,h]],
           faces=[[0,1,2,3],[5,4,3,2],[0,4,5,1],[0,3,4],[5,2,1]]
           );
}

module backTabs(short=false) {
    holeBore = 2.45;
    depth = 11;
    zOffset = -2.75;
    up = short ? 0.5 : 10;
    
    slotTolerance = 4.5;
    slotLength = 10 - slotTolerance;
    throughDepth = 5.5;

    translate([0, 0, zOffset])
        difference() {
            union() {
                hull() {
                    // lower slot, made of 2 balls cut to half height
                    intersection() {
                        hull() {
                            translate([0, up, -1+zOffset])
                                sphere(r=holeBore);
                            translate([0, -8.5, -1+zOffset])
                                sphere(r=holeBore);
                        }
                        hull() {
                            translate([0, up, -1-holeBore+zOffset])
                                cylinder(h=holeBore, r=holeBore);
                            translate([0, -8.5, -1-holeBore+zOffset])
                                cylinder(h=holeBore, r=holeBore);
                        }
                    }

                    // Top edge, two slim cylinders
                    translate([0, up, -0.1+zOffset])
                        cylinder(h=0.1, r=holeBore);
                    translate([0, -9, -0.1+zOffset])
                        cylinder(h=0.1, r=holeBore);
                }

                // Through-slot component
                hull() {
                    translate([0, (slotLength/2)-(slotTolerance/2), -throughDepth/2])
                        cylinder(h=throughDepth, r=holeBore);
                    translate([0, (-slotLength/2)-(slotTolerance/2), -throughDepth/2])
                        cylinder(h=throughDepth, r=holeBore);
                };
            }
        }
}

include  <common.scad>;

module frontHook(hook_angle=160, hook_radius=10) {
    radius=2.45;
    
    union() {
        translate([0,-7.5, 10.25+radius]) {
        translate([0,-7.5, 12.4-radius]) {
            translate([0,0,hook_radius-7.5]) {
                union() {
                    rotate([90,90+hook_angle,90])


@@ 93,129 39,8 @@ module frontHook(hook_angle=160, hook_radius=10) {
    }
}

module hook() {
    union() {
        backTabs();
        frontHook(hook_radius=15);
    }
}

module frontScrewDriverBracket() {
    bore = 2.45;
    screwHole = 3.5;
    plateThickness = 16.3;
    difference() {
        union() {
            hull() {
                translate([0, -5, 0])
                    cylinder(h=5, r=bore);
                translate([0, 40.5, 0])
                    cylinder(h=5, r=bore);
            }
            
            hull() {
                translate([0, -5, 0])
                    cylinder(h=5, r=bore);
                translate([-bore, -5, 5])
                    prism(bore*2, 20, 40);
            }
            
            hull() {
                translate([0, 40.5, 0])
                    cylinder(h=5, r=bore);
                translate([bore, 15+8+plateThickness, 5])
                    rotate([0, 0, 180])
                        prism(bore*2, 8, 5);
            }
        }
        // back screw hole
        union() {
            translate([0, 22.5, 0.5])
                cylinder(h=5, r=screwHole/2);
            translate([0, 22.5, 0.5])
                cylinder(h=2.5, r2=screwHole/2, r1=3.5);
            translate([0, 22.5, -9.5])
                cylinder(h=10, r=3.5);
        }
        
        
        // bottom screw hole
        translate([0, 11, 15])
            rotate([90, 0, 180]) {
                translate([0, 22.5, 0])
                    cylinder(h=10, r=screwHole/2);
                translate([0, 22.5, 0])
                    cylinder(h=2.5, r2=screwHole/2, r1=3.5);
                translate([0, 22.5, -10])
                    cylinder(h=10, r=3.5);
            }
    }
}

module screwDriverBracketMount() {
    union() {
        backTabs(short=true);
        translate([0, 40, 0])
            backTabs();
        frontScrewDriverBracket();
    }
}


module frontPowerDrillBracketCyl(bore, r, girth, h, minDist) {
    translate([0, bore, r+minDist]) {
        rotate([90, 0, 0]) {
            difference() {
                cylinder(r=r+girth, h=h);
                cylinder(r=r, h=h);
            }
        }
    }
}
module frontPowerDrillBracket() {
    bore = 2.45;
    h = 10;
    r = 21.5;
    girth = 3;
    minDist = 11;
    
    difference() {
        hull() {
            frontPowerDrillBracketCyl(bore, r, girth, h, minDist);
            // The four pegs
            translate([0, -25, 0])
                cylinder(h=1, r=bore);
            translate([0, -19.5, 0])
                cylinder(h=1, r=bore);
            translate([-20, 0.5, 0])
                cylinder(h=1, r=bore);
            translate([-20, -5, 0])
                cylinder(h=1, r=bore);
            translate([20, 0.5, 0])
                cylinder(h=1, r=bore);
            translate([20, -5, 0])
                cylinder(h=1, r=bore);
        }
        // Cut the hole
        translate([0, 10, r+minDist]) {
            rotate([90, 0, 0]) {
                cylinder(r=r, h=40);
            }
        }
    }
}

module powerDrillMount() {
    union() {
        translate([0, -20, 0])
            backTabs(short=true);
        translate([-20, 0, 0])
            backTabs();
        translate([20, 0, 0])
            backTabs();
        
        frontPowerDrillBracket();
    }
}

powerDrillMount();
\ No newline at end of file
union() {
    backTabs();
    frontHook(hook_radius=15);
}
\ No newline at end of file

A powerdrill-bracket.scad => powerdrill-bracket.scad +58 -0
@@ 0,0 1,58 @@
$fn = 100;

include  <common.scad>;

module frontPowerDrillBracketCyl(bore, r, girth, h, minDist) {
    translate([0, bore, r+minDist]) {
        rotate([90, 0, 0]) {
            difference() {
                cylinder(r=r+girth, h=h);
                cylinder(r=r, h=h);
            }
        }
    }
}

module frontPowerDrillBracket() {
    bore = 2.45;
    h = 10;
    r = 21.5;
    girth = 3;
    minDist = 11;
    
    difference() {
        hull() {
            frontPowerDrillBracketCyl(bore, r, girth, h, minDist);
            // The four pegs
            translate([0, -25, 0])
                cylinder(h=1, r=bore);
            translate([0, -19.5, 0])
                cylinder(h=1, r=bore);
            translate([-20, 0.5, 0])
                cylinder(h=1, r=bore);
            translate([-20, -5, 0])
                cylinder(h=1, r=bore);
            translate([20, 0.5, 0])
                cylinder(h=1, r=bore);
            translate([20, -5, 0])
                cylinder(h=1, r=bore);
        }
        // Cut the hole
        translate([0, 10, r+minDist]) {
            rotate([90, 0, 0]) {
                cylinder(r=r, h=40);
            }
        }
    }
}

union() {
    translate([0, -20, 0])
        backTabs(short=true);
    translate([-20, 0, 0])
        backTabs();
    translate([20, 0, 0])
        backTabs();
    
    frontPowerDrillBracket();
}
\ No newline at end of file

A screwdriver-bracket.scad => screwdriver-bracket.scad +69 -0
@@ 0,0 1,69 @@
$fn = 100;

include  <common.scad>;

module prism(l, w, h){
   polyhedron(
           points=[[0,0,0], [l,0,0], [l,w,0], [0,w,0], [0,w,h], [l,w,h]],
           faces=[[0,1,2,3],[5,4,3,2],[0,4,5,1],[0,3,4],[5,2,1]]
           );
}

module frontScrewDriverBracket() {
    bore = 2.45;
    screwHole = 3.5;
    plateThickness = 16.3;
    difference() {
        union() {
            hull() {
                translate([0, -5, 0])
                    cylinder(h=5, r=bore);
                translate([0, 40.5, 0])
                    cylinder(h=5, r=bore);
            }
            
            hull() {
                translate([0, -5, 0])
                    cylinder(h=5, r=bore);
                translate([-bore, -5, 5])
                    prism(bore*2, 20, 40);
            }
            
            hull() {
                translate([0, 40.5, 0])
                    cylinder(h=5, r=bore);
                translate([bore, 15+8+plateThickness, 5])
                    rotate([0, 0, 180])
                        prism(bore*2, 8, 5);
            }
        }
        // back screw hole
        union() {
            translate([0, 22.5, 0.5])
                cylinder(h=5, r=screwHole/2);
            translate([0, 22.5, 0.5])
                cylinder(h=2.5, r2=screwHole/2, r1=3.5);
            translate([0, 22.5, -9.5])
                cylinder(h=10, r=3.5);
        }
        
        
        // bottom screw hole
        translate([0, 11, 15])
            rotate([90, 0, 180]) {
                translate([0, 22.5, 0])
                    cylinder(h=10, r=screwHole/2);
                translate([0, 22.5, 0])
                    cylinder(h=2.5, r2=screwHole/2, r1=3.5);
                translate([0, 22.5, -10])
                    cylinder(h=10, r=3.5);
            }
    }
}

union() {
    backTabs(short=true);
    translate([0, 40, 0])
        backTabs();
    frontScrewDriverBracket();
}
\ No newline at end of file