Skip to content

Instantly share code, notes, and snippets.

@auxiliary-character
Created February 15, 2022 07:00
Show Gist options
  • Save auxiliary-character/5c3c1254da7f4bc9965f56ccb7ea2120 to your computer and use it in GitHub Desktop.
Save auxiliary-character/5c3c1254da7f4bc9965f56ccb7ea2120 to your computer and use it in GitHub Desktop.
function inches(x) = x * 25.4;
z_fight_epsilon = 0.0001;
total_height = inches(0.5040);
inner_diameter = inches(0.6225);
outside_diameter = inches(1.3219);
rear_spigot_outer_diameter = inches(0.7467);
rear_groove_inside_diameter = inches(0.9700);
front_spigot_outer_diameter = inches(1.0245);
front_spigot_inner_diameter = inches(0.7327);
keyways_inner_diameter = inches(0.7031);
front_shoulder_height = inches(0.1449);
front_spigot_inside_shoulder_depth = inches(0.0620);
rear_shoulder_height = inches(0.3080);
rear_groove_depth = inches(0.1102);
keyway_width = inches(0.1341);
outside_tennon_width = inches(0.3070);
outside_tennon_depth = inches(0.1449);
tennon_cut_size = outside_diameter/2;
points = [
[front_spigot_inner_diameter/2, 0],
[front_spigot_outer_diameter/2, 0],
[front_spigot_outer_diameter/2, front_shoulder_height],
[outside_diameter/2, front_shoulder_height],
[outside_diameter/2, total_height-rear_shoulder_height],
[rear_groove_inside_diameter/2, total_height-rear_shoulder_height],
[rear_groove_inside_diameter/2, total_height-(rear_shoulder_height+rear_groove_depth)],
[rear_spigot_outer_diameter/2, total_height-(rear_shoulder_height+rear_groove_depth)],
[rear_spigot_outer_diameter/2, total_height],
[inner_diameter/2, total_height],
[inner_diameter/2, front_spigot_inside_shoulder_depth],
[front_spigot_inner_diameter/2, front_spigot_inside_shoulder_depth],
[front_spigot_inner_diameter/2, 0],
];
difference(){
rotate_extrude(){
polygon(points=points);
}
translate([0,0,-z_fight_epsilon])
linear_extrude(total_height+2*z_fight_epsilon){
rotate(45)
intersection(){
circle(r=keyways_inner_diameter/2);
square([keyways_inner_diameter, keyway_width], center=true);
}
for(i=[-1,1]){
translate([i*(tennon_cut_size/2+outside_tennon_width/2), outside_diameter/2+tennon_cut_size/2-outside_tennon_depth])
square([tennon_cut_size, tennon_cut_size], center=true);
}
}
}


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment