APC-Power-Bar-Bracket/powerbar_mount.scad

64 lines
No EOL
1.4 KiB
OpenSCAD

$fn=180;
use <Lib/mirrorcopy.scad>;
use <Lib/metric_screws.scad>;
powerbarDims = [58,200,45] + [-2,0,-1];
barRadius = 1;
module plastic(){
hull(){
mirrorCopy([1,0,0]){
translate([60,20,10]){
cylinder(h=20, d=10, center=true);
}
translate([60,-20,10]){
cube([10,10,20],center=true);
}
}
}
hull(){
mirrorCopy([1,0,0]){
translate([35+5,0,17])
rotate([90,0,0])
cylinder(d=15, h=50, center=true);
translate([35-2,-5,45])
rotate([90,0,0])
cylinder(d=15, h=40, center=true);
}
}
}
module screws(){
mirrorCopy([1,0,0],[0,1,0]){
translate([55,15,10-1])selfTappingScrew(mSize=5, length=22);
}
}
module powerbar(){
hull(){
mirrorCopy([1,0,0])
translate([powerbarDims.x/2,0,powerbarDims.z] + [-barRadius,0,-barRadius] + [0,0,0.01])
rotate([90,0,0])
cylinder(r=barRadius,h=200,center=true);
translate([0,0,0.5])
cube([powerbarDims.x,powerbarDims.y,1] + [0,0,0.01], center=true);
}
}
module bracket(){
difference(){
plastic();
powerbar();
screws();
}
}
if($preview){
bracket();
}else{
mirrorCopy([0,1,0])
translate([0,-5,0])
rotate([90,0,0])bracket();
}