Trailer Hitch

Carless now for a decade, I've always missed my Burley bike trailer that I sold or gave away when my two boys outgrew it. I offer to buy a colleague's trailer so long as the hitch fits. We checked clearances but didn't actually try to install the hitch until the gear was in my possession. Bike shops were no help. So I design and print my own.

The seat stay to which I will attach is angled with respect to the tow arm, elliptical in cross-section and tapered in diameter. I have to make lots of measurements and define variables that will capture interactions.

$fn = 32; // sleeve t = 1.73; id = 25.8; od = id + 2*t; h = 21; // clip cd = 6.8; co = 7.5; // grip gd1 = 21.59; gd2 = 20.75; gf = 0.79; // 0.79295970356 to 0.78843373494 gh = 50; gt = 6; gtf = (gd2+gt)/gd2; module sleeve () { difference () { cylinder (h=h, d=od); translate([0,0,-1]) cylinder (h=h+1+1, d=id); rotate([0,0,55])translate([0,od/2+1,h-co]) rotate([90,0,0]) cylinder (h=od+1+1, d=cd); } } module extension () { mirror([0,0,1]) cylinder (h=h-8, d=od); } module grip () { difference () { translate([0,0,0.01]) scale([gtf,gtf,50/52]) scale([gf,1,1]) cylinder (h=gh, d1=gd1, d2=gd1); scale([gf,1,1]) cylinder (h=gh, d1=gd1, d2=gd1); translate([5,-15,0]) cube([10,30,gh]); } } rotate([0,-110,0]) difference () { union () { sleeve(); extension(); translate([-25,0,-6-2]) rotate([0,110,0]) grip(); } translate([-25,0,-6-2]) rotate([0,110,0]) scale([gf,1,1]) cylinder (h=gh, d1=gd1, d2=gd1); }

The final assembly of modules has the sleeve extension protruding into the region I'd already negatively modeled in the grip module. What to do? The openscad software has some abstraction capability but not enough to abstract both positive and negative space. So I copy and paste the cylinder, compose up the accumulated transformations, and subtract it from the model again.