Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function in2mm(inch) = inch*25.4;
- post_center_dist = in2mm(2.3645);
- main_body_thickness = in2mm(.375);
- main_body_width = in2mm(2);
- shaft_fit_length = in2mm(1.5);
- shaft_diameter = in2mm(1.125);
- keyway = in2mm(.25);
- // 1/4-20 50% threads in steel is tap drill of 0.2188inches
- // 5/16-18 50% threads in steel is tap drill of 0.2770inches (and these set screws have a cup diameter of 0.17inches)
- // 3/8-24 50% threads in steel is tap drill of 0.3480inches (and these set screws have a cup diameter of 0.21inches)
- setscrew_pretap_drill_size = in2mm(.3480);
- $fa = 1;
- $fs = 0.5;
- module motor_coupler()
- {
- module main_posts() {
- for (x = [-post_center_dist/2, post_center_dist/2]) {
- translate([x, 0, -main_body_thickness])
- cylinder(r=in2mm(.696/2),h=in2mm(1.077)+main_body_thickness,center=false);
- }
- }
- module semi_circ_base() {
- module endcy(x) {
- translate([x,0,-main_body_thickness]) cylinder(r=main_body_width/2,h=main_body_thickness,center=false);
- }
- union() {
- translate([-post_center_dist/2,-main_body_width/2,-main_body_thickness]) cube(size=[post_center_dist,main_body_width,main_body_thickness],center=false);
- endcy(post_center_dist/2);
- endcy(-post_center_dist/2);
- }
- }
- /*module full_base() {
- translate([0,0,-main_body_thickness])
- cylinder(r=main_body_width,h=main_body_thickness,center=false);
- }*/
- module shaft_holder() {
- translate([0,0,-main_body_thickness-shaft_fit_length]) difference() {
- cylinder(r=main_body_width/2,h=shaft_fit_length,center=false);
- cylinder(r=shaft_diameter/2,h=shaft_fit_length,center=false);
- //keyway:
- translate([-keyway/2+shaft_diameter/2,-keyway/2,0]) cube(size=[keyway,keyway,shaft_fit_length],center=false);
- //set screw:
- translate([0,0,shaft_fit_length/2]) rotate(90,[0,1,0]) cylinder( r=setscrew_pretap_drill_size/2, h=main_body_width/2, center=false );
- }
- }
- union() {
- semi_circ_base();
- shaft_holder();
- main_posts();
- cylinder(r=in2mm(.4425/2),h=in2mm(.64),center=false);
- }
- }
- module example001()
- {
- function r_from_dia(d) = d / 2;
- module rotcy(rot, r, h) {
- rotate(90, rot)
- cylinder(r = r, h = h, center = true);
- }
- difference() {
- sphere(r = r_from_dia(size));
- rotcy([0, 0, 0], cy_r, cy_h);
- rotcy([1, 0, 0], cy_r, cy_h);
- rotcy([0, 1, 0], cy_r, cy_h);
- }
- size = 50;
- hole = 25;
- cy_r = r_from_dia(hole);
- cy_h = r_from_dia(size * 2.5);
- }
- //example001();
- motor_coupler();
Advertisement
Add Comment
Please, Sign In to add comment