tevo-tarantula-updates/lib/common.scad

26 lines
963 B
OpenSCAD
Raw Normal View History

2022-01-06 14:04:58 +00:00
module screw_mount(length, nut_size, screw_size, nut = "none", nut_height = 3) {
2021-08-21 19:00:36 +00:00
translate([screw_size / 2, screw_size / 2, 0]) {
cylinder(d = screw_size + 3, h = screw_size);
cylinder(d = screw_size, h = length);
2022-01-06 14:04:58 +00:00
2021-08-21 19:00:36 +00:00
if (nut == "hexagon") {
translate([0, 0, length - 3])
2022-01-06 14:04:58 +00:00
cylinder(d = nut_size, h = nut_height, $fn = 6);
2021-08-21 19:00:36 +00:00
} else if (nut == "square") {
translate([- nut_size / 2, - nut_size / 2, length - 3])
2022-01-06 14:04:58 +00:00
cube([nut_size, nut_size, nut_height]);
2021-08-23 13:17:52 +00:00
} if (nut == "square+") {
translate([- nut_size / 2, - nut_size / 2, length - 3])
2022-01-06 14:04:58 +00:00
cube([nut_size + 100, nut_size, nut_height]);
2021-08-21 19:00:36 +00:00
}
}
}
module block_with_fillet(width, depth, height, fillet) {
minkowski() {
cube([width - (fillet * 2), depth - (fillet * 2), height / 2]);
translate([fillet, fillet, 0])
cylinder(r = fillet, h = height / 2);
}
}