2012-03-12 01:13:07 +00:00
|
|
|
//
|
|
|
|
// Mendel90
|
|
|
|
//
|
|
|
|
// GNU GPL v2
|
|
|
|
// nop.head@gmail.com
|
|
|
|
// hydraraptor.blogspot.com
|
|
|
|
//
|
|
|
|
include <conf/config.scad>
|
|
|
|
|
|
|
|
module pulley_stl() {
|
|
|
|
stl("pulley");
|
2012-11-17 10:33:00 +00:00
|
|
|
import(pulley_type(pulley_type));
|
2012-03-12 01:13:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module pulley_assembly() {
|
2012-11-17 10:33:00 +00:00
|
|
|
type = pulley_type;
|
|
|
|
|
|
|
|
translate(pulley_offset(type))
|
|
|
|
if(pulley_od(type))
|
|
|
|
metal_pulley(type);
|
|
|
|
else
|
|
|
|
color(pulley_color) render() pulley_stl();
|
|
|
|
|
2015-06-14 22:28:01 +01:00
|
|
|
translate([0, 0, pulley_screw_z(type) + pulley_offset(type)[2]])
|
|
|
|
for(i = [0 : pulley_screws(type) - 1])
|
|
|
|
rotate([-90, 0, i * -90])
|
|
|
|
translate([0, 0, pulley_bore(type) / 2 + pulley_screw_length(type)])
|
|
|
|
screw(pulley_screw(type), pulley_screw_length(type));
|
2012-11-17 10:33:00 +00:00
|
|
|
|
|
|
|
if(pulley_nut_y(type))
|
|
|
|
translate([0, pulley_nut_y(type), pulley_screw_z(type) + pulley_offset(type)[2]])
|
|
|
|
rotate([90, 0, 0])
|
2012-12-24 13:15:00 +00:00
|
|
|
nut(screw_nut(pulley_screw(type)));
|
2012-11-17 10:33:00 +00:00
|
|
|
|
2012-03-12 01:13:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if(1)
|
|
|
|
pulley_assembly();
|
|
|
|
else
|
|
|
|
pulley_stl();
|