Created
May 6, 2024 13:53
-
-
Save b2ox/94032c2fbbdabcabb02796b82c254d84 to your computer and use it in GitHub Desktop.
カードサイズのコインケース
This file contains 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
CardX = 85.6; | |
CardY = 54; | |
CardZ = 10; | |
R = 2.5; | |
module Card(h) { | |
translate([0, 0, h / 2]) { | |
cube([CardX - 2 * R, CardY, h], center = true); | |
cube([CardX, CardY - 2 * R, h], center = true); | |
translate([CardX / 2 - R, CardY / 2 - R]) cylinder(h = h, r = R, center = true, $fn = 20); | |
translate([CardX / 2 - R, - CardY / 2 + R]) cylinder(h = h, r = R, center = true, $fn = 20); | |
translate([- CardX / 2 + R, CardY / 2 - R]) cylinder(h = h, r = R, center = true, $fn = 20); | |
translate([- CardX / 2 + R, - CardY / 2 + R]) cylinder(h = h, r = R, center = true, $fn = 20); | |
} | |
} | |
module CoinCase(hole) { | |
difference() { | |
Card(CardZ); | |
for (i = [0, 1, 2]) { | |
translate([-28 + 26 * i, 0, CardZ / 2 + 0.8]) { | |
translate([0, -13]) cylinder(h = CardZ, d = 24, center = true, $fn = 60); | |
translate([0, 13]) cylinder(h = CardZ, d = 24, center = true, $fn = 60); | |
cube([16, 16, CardZ], center = true); | |
} | |
} | |
translate([-28, -13, CardZ / 2 + 6]) cylinder(h = CardZ, d = 27, center = true, $fn = 60); | |
translate([CardX / 2 - 5, - CardY / 2 + 5, CardZ / 2]) cylinder(h = CardZ + 1, d = hole, center = true, $fn = 60); | |
} | |
} | |
module Lid(hole) { | |
difference() { | |
Card(2); | |
translate([CardX / 2 - 5, - CardY / 2 + 5, CardZ / 2]) cylinder(h = CardZ + 1, d = hole, center = true, $fn = 60); | |
} | |
} | |
CoinCase(5); | |
translate([0, 70]) Lid(3.5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment