Created
March 26, 2025 14:13
-
-
Save fadenb/6d6d1596f23f0d7fb986a18249ae3cd2 to your computer and use it in GitHub Desktop.
1/4" hex shank to 11/32" hex socket adapter SCAD file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Hex Bit Adapter: Converts a 1/4 inch (6.35 mm) male hex shank to an 11/32 inch (8.73 mm) female hex socket. | |
*/ | |
epsilon = 0.01; // Small value (0.01 mm) to ensure proper overlap or gap for boolean operations. | |
// --- Parameters --- | |
male_hex_size_nominal = 6.35; // Nominal size of the male hex shank: 1/4 inch (6.35 mm) | |
male_hex_fit_tolerance = -0.1; // Tolerance for the male hex shank, negative for undersize (-0.1 mm) to ensure easier fit. | |
male_hex_af = male_hex_size_nominal + male_hex_fit_tolerance; // Across Flats dimension of the male hex shank. | |
male_hex_length = 10; // Length of the male hex shank (10 mm). | |
female_hex_size_nominal = 8.73; // Nominal size of the female hex socket: 11/32 inch (approximately 8.73 mm) | |
female_hex_fit_tolerance = 0.2; // Tolerance for the female hex socket, positive for oversize (+0.2 mm) to allow the bit to fit. | |
female_hex_af = female_hex_size_nominal + female_hex_fit_tolerance; // Across Flats dimension of the female hex socket. | |
female_hex_depth = 12; // Depth of the female hex socket (12 mm). | |
body_diameter = 15; // Diameter of the main body of the adapter (15 mm). | |
body_transition_length = 3; // Length of the solid cylindrical part between the end of the male shank and the bottom of the female socket (3 mm). | |
total_length = male_hex_length + body_transition_length + female_hex_depth; // Total length of the hex bit adapter. | |
// --- Quality --- | |
$fn = 60; // Resolution for curved surfaces (number of facets for circles). Higher values result in smoother curves. | |
// --- Helper Calculations --- | |
male_hex_radius_vert = (male_hex_af / 2) / cos(30); // Calculated vertical radius (distance from center to a flat side) of the male hex. | |
female_hex_radius_vert = (female_hex_af / 2) / cos(30); // Calculated vertical radius (distance from center to a flat side) of the female hex. | |
// --- Geometry --- | |
difference() { // Creates the adapter by subtracting the female socket from the main body with the male shank. | |
// --- Main Positive Shape (Simple Union of Male Shank and Body) --- | |
union() { // Combines the male hex shank and the main body into a single solid shape. | |
// Male Hex Shank Prism | |
cylinder(h = male_hex_length, r = male_hex_radius_vert, $fn=6, center=false); // Creates the hexagonal prism of the male shank. | |
// Main Body Cylinder | |
translate([0, 0, male_hex_length]) // Moves the main body cylinder to start at the end of the male shank. | |
cylinder(h = body_transition_length + female_hex_depth, d = body_diameter, center=false, $fn=$fn); // Creates the cylindrical body of the adapter. | |
} // End Union | |
// --- Female Socket Cutout (Hexagonal Cylinder) --- | |
socket_bottom_z = male_hex_length + body_transition_length; // Z-coordinate for the bottom of the female socket. | |
translate([0, 0, socket_bottom_z]) // Moves the cutting cylinder to the correct starting position. | |
cylinder(h = female_hex_depth + epsilon, r = female_hex_radius_vert, $fn=6, center=false); // Creates the hexagonal hole for the female socket, extending slightly to ensure a full cut. | |
} // End Difference |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment