Fixed screw hole position of inverted printed_pulley.

Unexploded assembly view shows round screw holes to represent the tapped state.
This commit is contained in:
Chris Palmer 2021-01-10 21:28:31 +00:00
parent 4cca9d5285
commit 6bd4638e7d
2 changed files with 13 additions and 9 deletions

View File

@ -116,7 +116,10 @@ module printed_pulley(type) { //! Draw a printable pulley
translate_z(screw_z) translate_z(screw_z)
for(i = [0 : pulley_screws(type) - 1]) for(i = [0 : pulley_screws(type) - 1])
rotate([-90, 180, i * -90]) rotate([-90, 180, i * -90])
if(show_supports())
teardrop(r = screw_pilot_hole(pulley_screw(type)), h = pulley_flange_dia(type) / 2 + 1, center = false); teardrop(r = screw_pilot_hole(pulley_screw(type)), h = pulley_flange_dia(type) / 2 + 1, center = false);
else
cylinder(r = screw_radius(pulley_screw(type)), h = pulley_flange_dia(type) / 2 + 1);
} }
module hub() module hub()
@ -131,7 +134,8 @@ module printed_pulley(type) { //! Draw a printable pulley
if(hl) if(hl)
translate_z(printed_pulley_inverted(type) ? hl + w + 2 * ft : 0) translate_z(printed_pulley_inverted(type) ? hl + w + 2 * ft : 0)
if(screw_z && screw_z < hl) if(screw_z && screw_z < hl)
render() difference() { render()
difference() {
hub(); hub();
screw_holes(); screw_holes();
@ -157,7 +161,7 @@ module printed_pulley(type) { //! Draw a printable pulley
} }
// outer part at 45 degrees for printing // outer part at 45 degrees for printing
rotate_extrude() rotate_extrude()
translate([or -eps , ft]) translate([or - eps, ft])
vflip() vflip()
right_triangle(ft, ft); right_triangle(ft, ft);
} }
@ -167,7 +171,7 @@ module printed_pulley(type) { //! Draw a printable pulley
difference() { // T5 pulleys have screws through the teeth difference() { // T5 pulleys have screws through the teeth
core(); core();
translate_z(printed_pulley_inverted(type) ? hl : 0) translate_z(printed_pulley_inverted(type) ? pulley_height(type) + hl - 2 * screw_z : 0)
screw_holes(); screw_holes();
} }
else else
@ -186,7 +190,7 @@ assembly(str("printed_pulley_", type[0])) {
else else
printed_pulley(type); printed_pulley(type);
if (pulley_screws(type)) if(pulley_screws(type))
translate_z(pulley_screw_z(type)) translate_z(pulley_screw_z(type))
for(i = [0 : pulley_screws(type) - 1]) for(i = [0 : pulley_screws(type) - 1])
rotate([-90, 0, i * -90]) rotate([-90, 0, i * -90])

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 116 KiB