pacman-ghost: initial upstream version
[clinton/3d-models.git] / etc / belt-clip.scad
1 // basic belt piece, intended for game of thrones costume originally
2
3 use <dotscad/rounded_square.scad> // https://github.com/JustinSDK/dotSCAD
4
5 $fs = 0.1;
6 $fa = 0.1;
7
8
9 buckle_height = 60;
10 buckle_width = 120;
11 buckle_thickness = 3;
12
13 slot_width = 3.5;
14 slot_height = buckle_height - 15;
15 slot_edge_offset = 5.5 + slot_width;
16
17 dragon_d = 90;
18
19 buckle_corner_r = 1.5;
20 slot_corner_r = 0.5;
21
22 module buckle_piece () {
23 difference () {
24 rounded_square ([buckle_width/2, buckle_height], buckle_corner_r);
25
26 translate ([buckle_width/2 - slot_edge_offset, (buckle_height - slot_height) / 2, 0]) {
27 square ([slot_width, slot_height]);
28 translate ([slot_width/2, slot_height, 0]) circle (d=slot_width);
29 translate ([slot_width/2, 0, 0]) circle (d=slot_width);
30 }
31 }
32 }
33
34 module buckle_base (buckle_thickness=buckle_thickness) {
35 linear_extrude (buckle_thickness) {
36 translate ([-buckle_width/4, 0, 0]) square ([buckle_width/2, buckle_height]);
37 buckle_piece ();
38 mirror ([1, 0, 0]) buckle_piece ();
39 }
40 }
41
42
43 // non-free dep: https://www.myminifactory.com/object/3d-print-game-of-thrones-house-targaryen-1285
44 module dragon (d=10) {
45 translate ([-d/2, -d/2, 0]) {
46 resize ([d, 0, 0], auto=true ) import ("./house-targaryen-game-of-thrones-2_fixed.stl");
47 }
48
49 cylinder (d=d, h=buckle_thickness);
50 }
51
52
53 translate ([0, -buckle_height/2, 0]) buckle_base ();
54 //translate ([0, 0, 0]) dragon (d=dragon_d); // or whatever other geometry you want to integrate with belt