CaseCorner_M3

Corner screw mount for a screw-mount lid with an M3 sized screw

Category: Case

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
  "CaseCorner_M3"
  (version 20240108)
  (generator turbocaseweb)
  (descr "Corner screw mount for a screw-mount lid with an M3 sized screw")
  (attr board_only exclude_from_pos_files exclude_from_bom allow_missing_courtyard)
  (zone_connect 0)
  (
    property
    "TurboCaseModule"
    "eJylkktuwyAQhvc+BUu7tRM726qrHKOKIgLjGgmDxGPRVrl7hsSkgNwqVUeWDGge3/wzs+ZeAtlTC3ttFJjaik9oyaQlHLmgMzgweAXKy+sE4n1yDfmqCJozVFlJHdRvfUvw60aptVm8Ds3ViYtxBAOKQR3jgnkltMpegrEPKRRHIqGQa0nUksC33cV/85LFJBTdrREkSeO3uwUlq+RPGBD8n5bEedChJQwUdv7qjIek5Lm6H1dpn4dCyQBePGC6agX/JuKKhtG+R3a0/mQxlLk/D++32lkj/aYfCgA2CclxmHXMcq5Qj7lcqH/Q/bRa/WZAmGRd1sVPxXtoDo9JkabtEtxSnsiUuKxRpO3fKYKUF3ygHxc="
    (at 0 0 0)
    (unlocked yes)
    (layer "F.SilkS")
    (hide yes)
    (uuid "38fd8eb6-0906-4c2a-b868-2fe35f789efd")
    (
      effects
      (
        font
        (size 1 1)
        (thickness 0.1)
      )
    )
  )
  (
    property
    "TurboCaseAdd"
    "CaseCorner(size=5.6, hole_diameter=3, head_diameter=5.6, head_height=1.65)"
    (at 0 0 0)
    (unlocked yes)
    (layer "F.SilkS")
    (hide yes)
    (uuid "7ada352d-2dc3-4dcd-ad52-c3273a0cfbd2")
    (
      effects
      (
        font
        (size 1 1)
        (thickness 0.1)
      )
    )
  )
  (
    property
    "TurboCaseSub"
    "CaseCorner_substract(size=5.6, hole_diameter=3, head_diameter=5.6, head_height=1.65)"
    (at 0 0 0)
    (unlocked yes)
    (layer "F.SilkS")
    (hide yes)
    (uuid "991c30ee-82b3-4ecb-8ce7-f2a2f9249f85")
    (
      effects
      (
        font
        (size 1 1)
        (thickness 0.1)
      )
    )
  )
  (
    property
    "TurboCaseConstrain"
    "yes"
    (at 0 0 0)
    (unlocked yes)
    (layer "F.SilkS")
    (hide yes)
    (uuid "9cd0adbc-a2d7-49ee-8411-bd06a043e808")
    (
      effects
      (
        font
        (size 1 1)
        (thickness 0.1)
      )
    )
  )
  (
    property
    "TurboCaseScrewSize"
    "3"
    (at 0 0 0)
    (unlocked yes)
    (layer "F.SilkS")
    (hide yes)
    (uuid "cbe10f35-3463-4c04-aa72-ec5cb4643c27")
    (
      effects
      (
        font
        (size 1 1)
        (thickness 0.1)
      )
    )
  )
  (
    fp_circle
    (center 0 0)
    (end 0 1.5)
    (
      stroke
      (width 0.2)
      (type default)
    )
    (fill none)
    (layer "User.6")
    (uuid "83c82dc3-288f-423e-90a3-989c120412a2")
  )
  (
    fp_circle
    (center 0 0)
    (end 0 2.8)
    (
      stroke
      (width 0.2)
      (type dot)
    )
    (fill none)
    (layer "User.6")
    (uuid "43b6d8fd-70d7-45aa-b7f7-a7be9793e853")
  )
  (
    fp_arc
    (start 0 2.8)
    (mid 0 2.8)
    (end 0 -2.8)
    (
      stroke
      (width 0.2)
      (type default)
    )
    (layer "User.6")
    (uuid "b48ecd9e-e404-4a6c-95c9-9691bda0013a")
  )
  (
    fp_line
    (start -5.6 2.8)
    (end 0 2.8)
    (
      stroke
      (width 0.2)
      (type default)
    )
    (layer "User.6")
    (uuid "2e79fa5f-bdd9-46a9-a856-b47ee85b4414")
  )
  (
    fp_line
    (start -5.6 -2.8)
    (end 0 -2.8)
    (
      stroke
      (width 0.2)
      (type default)
    )
    (layer "User.6")
    (uuid "230716fc-9111-471d-849a-699357567e93")
  )
)

The OpenSCAD code

This is the OpenSCAD code that will end up in your final case .scad file:

module CaseCorner(size, hole_diameter, head_diameter, head_height) {
    translate([0, 0, -floor_height])
    difference() {
        union() {
            cylinder(inner_height, size/2, size/2);
            translate([-size, 0, inner_height/2])
                cube([size*2, size, inner_height], center=true);
        }

        cylinder(inner_height+1, hole_diameter/2, hole_diameter/2);

        translate([0, 0, floor_height])
            CaseCorner_substract(size, hole_diameter, head_diameter, head_height);

        translate([0, 0, inner_height+0.01])
            children();

    }
}

module CaseCorner_substract(size, hole_diameter, head_diameter, head_height) {
    translate([0, 0, 0.11]) {
        cylinder(inner_height+floor_height, hole_diameter/2, hole_diameter/2);
        translate([0, 0, inner_height+floor_height-head_height])
            cylinder(head_height, hole_diameter/2, head_diameter/2);
    }
}