KeyHole_M3

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
(
  footprint
  "KeyHole_M3"
  (version 20240108)
  (generator turbocaseweb)
  (descr "Keyhole wall mounting point")
  (attr board_only exclude_from_pos_files exclude_from_bom allow_missing_courtyard)
  (zone_connect 0)
  (
    property
    "TurboCaseModule"
    "eJzFU8tugzAQvPMVPuLiEINEe0C5V8onVFHlwCZYMkYyRlFU5d+LaR5sSKAvKRYHloWd2ZmhrPJGAVnC/rVS8F4369oakVm/cGUuRQkWDCMFiPy6LEBuC0vJh0faUwqzlZosCA/jtHvSDtK1Ehb8N844m0V8RbuGO42WlfZPH59OtldS52D8KGEEc5jHNPjCuN+hqYfGIQZ4h3nMyEuY9BidOTTr9n2EEPjx0xFhIEWUrBjJQLfFwpoGfsCBEX4LH2uASfc1uN2h6XniwTt4JTL4P2zdCaW6+vm4aS43GzCgM0B+Tjl8f4XAQUy0/yTzA0i4vPGRvGEc2kucu+3AhtEbJO/i/LgLmGh7zXjIr8ldVApHdBpN4vctejCB39szdCWc8sX9l5/38ZTh"
    (at 0 0 0)
    (unlocked yes)
    (layer "F.SilkS")
    (hide yes)
    (uuid "dc73c15a-db89-4575-aa8c-d86821dfce6e")
    (
      effects
      (
        font
        (size 1 1)
        (thickness 0.1)
      )
    )
  )
  (
    property
    "TurboCaseAdd"
    "KeyHole(hole_diameter=3, head_diameter=5.6, head_height=1.65)"
    (at 0 0 0)
    (unlocked yes)
    (layer "F.SilkS")
    (hide yes)
    (uuid "80a0a504-e6d4-4fef-aeb8-591d92a55a5b")
    (
      effects
      (
        font
        (size 1 1)
        (thickness 0.1)
      )
    )
  )
  (
    property
    "TurboCaseSub"
    "KeyHole_substract(hole_diameter=3, head_diameter=5.6, head_height=1.65)"
    (at 0 0 0)
    (unlocked yes)
    (layer "F.SilkS")
    (hide yes)
    (uuid "c7d3f92b-393d-4a17-9ae0-c281e801a9e1")
    (
      effects
      (
        font
        (size 1 1)
        (thickness 0.1)
      )
    )
  )
  (
    fp_arc
    (start -3.4 0)
    (mid 0 -3.4)
    (end 3.4 0)
    (
      stroke
      (width 0.2)
      (type default)
    )
    (layer "User.6")
    (uuid "a7c76c90-441c-42ef-8025-a29e5b7ff1d5")
  )
  (
    fp_arc
    (start -3.4 5.6)
    (mid 0 9.0)
    (end 3.4 5.6)
    (
      stroke
      (width 0.2)
      (type default)
    )
    (layer "User.6")
    (uuid "fc9836f5-69aa-41a9-af36-4faba8306a8f")
  )
  (
    fp_line
    (start -3.4 0)
    (end -3.4 5.6)
    (
      stroke
      (width 0.2)
      (type default)
    )
    (layer "User.6")
    (uuid "252a3cd3-1327-4975-ae85-99dbea8c9975")
  )
  (
    fp_line
    (start 3.4 0)
    (end 3.4 5.6)
    (
      stroke
      (width 0.2)
      (type default)
    )
    (layer "User.6")
    (uuid "f6a77638-219b-4c0a-adc9-d16240364e28")
  )
  (
    fp_arc
    (start -1.5 0)
    (mid 0 -1.5)
    (end 1.5 0)
    (
      stroke
      (width 0.2)
      (type default)
    )
    (layer "User.6")
    (uuid "875c16f9-b0ca-42d6-b207-b11ef00d6901")
  )
  (
    fp_line
    (start -1.5 0)
    (end -1.5 5.8)
    (
      stroke
      (width 0.2)
      (type default)
    )
    (layer "User.6")
    (uuid "6e749331-649b-4d18-b0ee-277a514d163e")
  )
  (
    fp_line
    (start 1.5 0)
    (end 1.5 5.8)
    (
      stroke
      (width 0.2)
      (type default)
    )
    (layer "User.6")
    (uuid "d0665855-b2e9-493c-a0e3-9e66b8b1bfa3")
  )
  (
    fp_circle
    (center 0 5.6)
    (end 2.8 5.8)
    (
      stroke
      (width 0.2)
      (type default)
    )
    (fill none)
    (layer "User.6")
    (uuid "33353f30-8bd2-4e86-bde6-14eedc8a6fa0")
  )
)

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);
        }
    }
}