/* [Knob Dimensions] */ outer_diameter = 30.0; // [15:1:60] knob_height = 14.0; // [8:1:40] top_fillet_radius = 2.0; // [0.5:0.5:5] /* [Knurling Details] */ knurl_ridges = 42; // [20:2:80] knurl_depth = 0.75; // [0.3:0.05:2.0] helix_turns = 0.35; // [0.1:0.05:1.0] /* [Hardware Pockets] */ through_hole_diameter = 6.5; // [3:0.1:12] hex_nut_af = 10.0; // [5:0.1:20] hex_nut_depth = 5.0; // [2:0.5:15] /* [Appearance] */ knob_color = "Charcoal"; // [Charcoal, DarkSlateGray, SteelBlue, FireBrick, DarkGreen, OrangeRed] /* [Quality] */ $fn = 96; // Derived values r_outer = outer_diameter / 2; r_inner = r_outer - knurl_depth; hex_radius = (hex_nut_af / 2) / cos(30); // Across-flats to across-corners radius twist_degrees = helix_turns * 360; module diamond_knurled_body(h, r_out, depth, ridges, twist_deg) { slices_count = max(30, ceil(h * 3)); // Smooth transition bevel profile for top edge difference() { // Knurled textured cylinder intersection() { // Clockwise twisted teeth linear_extrude(height = h, twist = twist_deg, slices = slices_count, convexity = 10) knurl_2d_profile(r_out, depth, ridges); // Counter-clockwise twisted teeth linear_extrude(height = h, twist = -twist_deg, slices = slices_count, convexity = 10) knurl_2d_profile(r_out, depth, ridges); } // Filleted/rounded top edge cutter if (top_fillet_radius > 0) { translate([0, 0, h - top_fillet_radius]) difference() { cylinder(r = r_out + 1, h = top_fillet_radius + 0.1); // Torus-like inner solid cylinder(r = r_out - top_fillet_radius, h = top_fillet_radius + 0.1); rotate_extrude(convexity = 4) translate([r_out - top_fillet_radius, 0, 0]) circle(r = top_fillet_radius, $fn = 48); } } // Chamfer on bottom edge to ensure smooth feel and easy print release translate([0, 0, -0.01]) difference() { cylinder(r = r_out + 1, h = 0.8); cylinder(r1 = r_out - 0.8, r2 = r_out, h = 0.8); } } } module knurl_2d_profile(r_out, depth, ridges) { r_in = r_out - depth; points = [ for (i = [0 : ridges * 2 - 1]) let(angle = i * 360 / (ridges * 2), r = (i % 2 == 0) ? r_out : r_in) [r * cos(angle), r * sin(angle)] ]; polygon(points); } module thumb_knob() { difference() { // Main knurled body diamond_knurled_body( h = knob_height, r_out = r_outer, depth = knurl_depth, ridges = knurl_ridges, twist_deg = twist_degrees ); // Through hole translate([0, 0, -1]) cylinder(d = through_hole_diameter, h = knob_height + 2, $fn = 64); // Hex nut pocket underneath translate([0, 0, -0.01]) cylinder(r = hex_radius, h = hex_nut_depth, $fn = 6); // Slight entry chamfer for hex nut translate([0, 0, -0.01]) cylinder(r1 = hex_radius + 0.5, r2 = hex_radius, h = 0.5, $fn = 6); // Top slight countersink/relief for clean look translate([0, 0, knob_height - 0.5]) cylinder(d1 = through_hole_diameter, d2 = through_hole_diameter + 1.0, h = 0.51, $fn = 48); } } color(knob_color) thumb_knob();