Commit | Line | Data |
---|---|---|
cae0d928 CE |
1 | use <dotscad/rounded_square.scad> // https://github.com/JustinSDK/dotSCAD |
2 | ||
3 | $fs = 0.1; | |
4 | $fa = 0.1; | |
5 | ||
6 | ||
7 | buckle_height = 60; | |
8 | buckle_width = 120; | |
9 | buckle_thickness = 3; | |
10 | ||
11 | slot_width = 3.5; | |
12 | slot_height = buckle_height - 15; | |
13 | slot_edge_offset = 5.5 + slot_width; | |
14 | ||
15 | dragon_d = 90; | |
16 | ||
17 | buckle_corner_r = 1.5; | |
18 | slot_corner_r = 0.5; | |
19 | ||
20 | module buckle_piece () { | |
21 | difference () { | |
22 | rounded_square ([buckle_width/2, buckle_height], buckle_corner_r); | |
23 | ||
24 | translate ([buckle_width/2 - slot_edge_offset, (buckle_height - slot_height) / 2, 0]) { | |
25 | square ([slot_width, slot_height]); | |
26 | translate ([slot_width/2, slot_height, 0]) circle (d=slot_width); | |
27 | translate ([slot_width/2, 0, 0]) circle (d=slot_width); | |
28 | } | |
29 | } | |
30 | } | |
31 | ||
32 | module buckle_base (buckle_thickness=buckle_thickness) { | |
33 | linear_extrude (buckle_thickness) { | |
34 | translate ([-buckle_width/4, 0, 0]) square ([buckle_width/2, buckle_height]); | |
35 | buckle_piece (); | |
36 | mirror ([1, 0, 0]) buckle_piece (); | |
37 | } | |
38 | } | |
39 | ||
40 | ||
41 | module dragon (d=10) { | |
42 | /* translate ([-d/2, -d/2, 0]) { | |
43 | resize ([d, 0, 0], auto=true ) import ("./house-targaryen-game-of-thrones-2_fixed.stl"); | |
44 | } | |
45 | */ | |
46 | cylinder (d=d, h=buckle_thickness); | |
47 | } | |
48 | ||
49 | ||
50 | ||
51 | translate ([0, -buckle_height/2, 0]) buckle_base (); | |
52 | //translate ([0, 0, 0]) dragon (d=dragon_d); |