chiark / gitweb /
discpick-tensioner.scad: Improved tensioning component with longer prongs.
[scad] / discpick-collar.scad
1 /* -*-c-*-
2  *
3  * A spacer for the Sparrows disc-detainer picking tool
4  *
5  * (c) 2022 Mark Wooding
6  */
7
8 /*----- Licensing notice --------------------------------------------------*
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 3 of the License, or (at
13  * your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful, but
16  * WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
22  */
23
24 /*----- Configuration -----------------------------------------------------*/
25
26 /* Overall scaling. */
27 MM = 1;
28
29 /* Curvature quality. */
30 $fa = 0.1;
31 $fs = 0.2*MM;
32
33 /* A `large enough' length; effectively infinite. */
34 BIG = 20*MM;
35
36 /* Dimensions. */
37 CUT_WD = 10*MM;                         /* width of the cut in the top */
38 BORE_DIAM = 6*MM;                       /* diameter of hole down the mid */
39 SPACER_HT = 7.25*MM;                    /* height of the offset */
40 HEIGHT = SPACER_HT + 3*MM;              /* overall ht, including shelves */
41 THICK = 16*MM;                          /* thickness */
42 WIDTH = 18*MM;                          /* width */
43
44 /*----- The main object ---------------------------------------------------*/
45
46 difference() {
47   intersection() {
48
49     /* Start with a bounding parallelepiped.  We're going to shave pieces of
50      * this to make the actual object.
51      */
52     translate([-WIDTH/2, -THICK/2, 0])
53       cube([WIDTH, THICK, HEIGHT]);
54
55     /* Round off the vertical edges. */
56     cylinder(h = HEIGHT, r = norm([CUT_WD/2, WIDTH/2]));
57
58     /* Round off the shelves that sit around the pick body. */
59     rotate([0, 90, 0])
60       translate([0, 0, -BIG/2])
61       cylinder(h = BIG, r = norm([HEIGHT, CUT_WD/2]));
62   }
63
64   union() {
65
66     /* Cut out the channel in which the pick body sits, leaving the shelves
67      * on either side.
68      */
69     translate([-BIG/2, -CUT_WD/2, SPACER_HT])
70       cube([BIG, CUT_WD, BIG]);
71
72     /* Bore the hole down the middle through which the tensioning prongs and
73      * pick fit.
74      */
75     translate([0, 0, -BIG/3])
76       cylinder(h = BIG, r = BORE_DIAM/2);
77   }
78 }
79
80 /*----- That's all, folks -------------------------------------------------*/