Keyhole wall mounting point
Category: Keyhole
Using this part
This TurboCase prefab can be directly pasted into your KiCad PCB editor by using the copy button below. The
code of the footprint is also shown here for reference. The footprint file can also be downloaded to be
added to your own local footprint libraries.
Download footprint
The OpenSCAD code
This is the OpenSCAD code that will end up in your final case .scad file:
module KeyHole_substract(hole_diameter, head_diameter, head_height) {
margin = 0.2;
translate([0,0,-10])
union() {
cylinder(15, (hole_diameter/2)+margin, (hole_diameter/2)+margin);
translate([0, head_diameter/2, 7.5])
cube([hole_diameter+(2*margin), head_diameter, 15], center=true);
translate([0, head_diameter, 0])
cylinder(15, (head_diameter/2)+margin, (head_diameter/2)+margin);
}
}
module KeyHole(hole_diameter, head_diameter, head_height) {
margin = 0.2;
wall = 0.6;
difference() {
union() {
cylinder(1, (head_diameter/2)+margin+wall, (head_diameter/2)+margin+wall);
translate([0, head_diameter, 0])
cylinder(1, (head_diameter/2)+margin+wall, (head_diameter/2)+margin+wall);
translate([0, head_diameter/2, 0.5])
cube([(head_diameter)+(2*margin)+(2*wall), head_diameter, 1], center=true);
}
union() {
translate([0, 0, -0.05])
cylinder(1.1, (head_diameter/2)+margin, (head_diameter/2)+margin);
translate([0, head_diameter, -0.05])
cylinder(1.1, (head_diameter/2)+margin, (head_diameter/2)+margin);
translate([0, head_diameter/2, 0.5])
cube([(head_diameter)+(2*margin), head_diameter, 1.1], center=true);
}
}
}