include <./common.scad>; LinearBearingOuterDiameter = 15; LinearBearingHeight = 24; LinearBearingBoreDiameter = 8; ThreadDiameter = 8; LinearMotionDiameter = 8; TNutDiameter1 = 22; TNutDiameter2 = 10.2; TNutInnerDiameter = 8; TNutHeight1 = 3.5; TNutHeight2 = 15; TNutOffset = 1.5; module linear_bearing (padD = 0, padH = 0) { difference () { cylinder(r = R(LinearBearingOuterDiameter + padD), h = LinearBearingHeight + padH, center = true, $fn = 100); cylinder(r = R(LinearBearingBoreDiameter), h = LinearBearingHeight + padH + 1, center = true, $fn = 60); } } module threaded_rod (H = 40, pad = 0) { color("green") cylinder(r = R(ThreadDiameter + pad), h = H, center = true, $fn = 60); } module linear_motion_rod (H = 40, pad = 0) { color("blue") cylinder(r = R(LinearMotionDiameter + pad), h = H, center = true, $fn = 60); } module T_nut (padD = 0, padH = 0) { color("red") difference () { union () { translate([0, 0, -(TNutHeight2 / 2) + (TNutHeight1 / 2) + TNutOffset]) cylinder(r = R(TNutDiameter1 + padD), h = TNutHeight1, center = true, $fn = 100); cylinder(r = R(TNutDiameter2), h = TNutHeight2 + padH, center = true, $fn = 80); } cylinder(r = R(TNutInnerDiameter), h = TNutHeight2 + 1, center = true, $fn = 60); } }