DIY_3D_Printer/angle_bracket.scad

60 lines
1.3 KiB
OpenSCAD
Raw Normal View History

$fn = 33;
2020-12-30 18:44:58 +00:00
height = 40;
width = 60;
b = 3;
triagleheight = 5;
2021-01-01 16:18:29 +00:00
M4HoleDiam = 4.4;
2020-12-30 18:44:58 +00:00
holedistance = 10;
2020-12-30 18:44:58 +00:00
// main call
angle_bracket();
2020-12-30 18:44:58 +00:00
module angle_bracket() {
render() difference() {
frame();
holes();
}
2020-12-30 18:44:58 +00:00
}
module frame() {
// x plate
cube([width, b, height]);
2020-12-30 18:44:58 +00:00
// y plate
translate([b, 0, 0]) rotate([0, 0, 90]) cube([width, b, height]);
2020-12-30 18:44:58 +00:00
//bottom triangle
translate([b, b, 0]) stabilizetriangle();
// upper triangle
translate([b, b, height - triagleheight]) stabilizetriangle();
2020-12-30 18:44:58 +00:00
}
module holes() {
// y holes
translate([0, holedistance, height - holedistance]) YM3Hole();
translate([0, width - holedistance, height - holedistance]) YM3Hole();
translate([0, holedistance, holedistance]) YM3Hole();
translate([0, width - holedistance, holedistance]) YM3Hole();
translate([holedistance, 0, height - holedistance]) XM3Hole();
translate([width - holedistance, 0, height - holedistance]) XM3Hole();
translate([holedistance, 0, holedistance]) XM3Hole();
translate([width - holedistance, 0, holedistance]) XM3Hole();
2020-12-30 18:44:58 +00:00
}
module stabilizetriangle() {
linear_extrude(triagleheight) polygon([[0, 0], [0, width - b], [width - b, 0]]);
2020-12-30 18:44:58 +00:00
}
module YM3Hole() {
rotate([0, 90, 0])cylinder(h = b, d = M4HoleDiam);
2020-12-30 18:44:58 +00:00
}
module XM3Hole() {
rotate([270, 0, 0])cylinder(h = b, d = M4HoleDiam);
2020-12-30 18:44:58 +00:00
}