$fn = $preview? 32 : 72; module stepper_103H5205(){ body_length = 33; body_width = 42; shaft_length = 24; shaft_diameter = 5; flange_thickness = 1.5; flange_diameter = 22; hole_seperation = 31; hole_bore = 3; hole_depth = 4; corner_radius = 5; connector_height = 7; connector_width = 27; connector_depth = 11; connector_offset = 20; // body; color("dimgray") difference(){ rotate([180,0,0]) body(length=body_length, width=body_width, corner_radius = corner_radius); // remove screws rotate([180,0,0]) translate([0,0,-1]) four_cylinder(hole_seperation/2,hole_depth+1,hole_bore/2); } // flange color("silver") translate([0,0,-1]) cylinder(h=flange_thickness+1,d=flange_diameter); // shaft color("lightcyan")cylinder(h=shaft_length,d=shaft_diameter); color("snow")translate([body_width/2-1,-connector_width/2,-connector_offset-connector_depth]) cube([connector_height+1,connector_width,connector_depth]); } module body(length, width, corner_radius){ distance = (width/2-corner_radius); hull(){ four_cylinder(distance,length,corner_radius); } } module four_cylinder(distance,height,radius){ for (i = [0:3]){ rotate([0,0,90*i]) translate([distance,distance,0]) cylinder(h=height,r=radius); } } stepper_103H5205(); translate([0,0,0.2]) stepper_103H5205_mount(); module stepper_103H5205_mount() { body_width = 42; flange_diameter = 22; hole_seperation = 31; hole_bore = 3; hole_depth = 4; corner_radius = 5; bracket_thickness = 4; difference(){ body(length=bracket_thickness, width=body_width, corner_radius = corner_radius); translate([0,0,-0.5]) four_cylinder(hole_seperation/2,bracket_thickness+1,hole_bore/2); translate([0,0,-0.5]) cylinder(h=bracket_thickness+1,d=flange_diameter+1); } }