// all units are in inches function mm_to_in(mm) = 0.03937 * mm; bar_dims = [1.228, 0.228, 0.22]; bar_gap = 0.793; bump_thickness = 0.009; $fn = $preview ? 32 : 64; // hole/peg dimensions peg_od = 0.130; // snug fit against the footprint. hole_id = 0.107; peg_id = 0.100; // 0.005 larger than #2-56 nominal diameter peg_height = mm_to_in(1.6); peg_fullheight = 0.245 - bar_dims[2]; // height of the full circle wrap around. insert_diameter = mm_to_in(3.5); // 3.2mm (d3 for #2-56 inserts) insert_length = mm_to_in(6.1); notch_height = 0.108; // height from top of bar to bottom of notch notch_thickness = 0.0380 - 0.022; // how far the notch goes from the outer edge. module nutbar_peg() { difference() { union() { // cube translate([0,0, bump_thickness/2]) cube([bar_dims[1], bar_dims[1], bar_dims[2] + bump_thickness], center = true); // peg portion translate([0,0,bump_thickness + bar_dims[2]/2]) difference() { cylinder(h = peg_height, d = peg_od); union() { translate([0,0,-0.01]) cylinder(h = peg_height+0.02, d = peg_id); translate([0,0,peg_fullheight]) cube([1,1,1]); }; }; // }; union() { // threaded insert hole translate([0,0,-1 * bar_dims[2]]) cylinder(h = insert_length + 0.01, d = insert_diameter); cylinder(h = bar_dims[2] + 1, d = peg_id, center = true); }; }; } // create the cross bar bit cube([bar_gap, bar_dims[1], bar_dims[2]], center=true); translate([bar_gap/2 + bar_dims[1]/2, 0, 0]) rotate([0,0,90]) nutbar_peg(); translate([-1 * (bar_gap/2 + bar_dims[1]/2), 0, 0]) rotate([0,0,-90]) nutbar_peg();