APC-Power-Bar-Bracket/powerbar_mount.scad

64 lines
1.4 KiB
OpenSCAD
Raw Normal View History

2024-06-12 16:18:41 +00:00
$fn=180;
use <Lib/mirrorcopy.scad>;
use <Lib/metric_screws.scad>;
2024-06-13 02:23:58 +00:00
powerbarDims = [58,200,45] + [-2,0,-1];
barRadius = 1;
2024-06-12 16:18:41 +00:00
module plastic(){
hull(){
2024-06-13 02:23:58 +00:00
mirrorCopy([1,0,0]){
2024-06-12 16:18:41 +00:00
translate([60,20,10]){
cylinder(h=20, d=10, center=true);
}
2024-06-13 02:23:58 +00:00
translate([60,-20,10]){
cube([10,10,20],center=true);
}
2024-06-12 16:18:41 +00:00
}
}
hull(){
mirrorCopy([1,0,0]){
translate([35+5,0,17])
rotate([90,0,0])
cylinder(d=15, h=50, center=true);
2024-06-13 02:23:58 +00:00
translate([35-2,-5,45])
2024-06-12 16:18:41 +00:00
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);
}
}
2024-06-13 02:23:58 +00:00
2024-06-12 16:18:41 +00:00
module powerbar(){
2024-06-13 02:23:58 +00:00
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);
}
2024-06-12 16:18:41 +00:00
}
2024-06-13 02:23:58 +00:00
module bracket(){
difference(){
plastic();
powerbar();
screws();
}
}
2024-06-12 16:18:41 +00:00
2024-06-13 02:23:58 +00:00
if($preview){
bracket();
}else{
mirrorCopy([0,1,0])
translate([0,-5,0])
rotate([90,0,0])bracket();
2024-06-12 16:18:41 +00:00
}