--- /dev/null
+### -*-makefile-gmake-*-
+###
+### Build OpenSCAD models
+###
+### (c) 2022 Mark Wooding
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This program is free software: you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 3 of the License, or (at
+### your option) any later version.
+###
+### This program is distributed in the hope that it will be useful, but
+### WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+### General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+all:
+
+## `Silent-rules' machinery.
+V = 0
+V_AT = $(V_AT).$V
+V_AT.0 = @
+v-tag = $(call v-tag.$V,$1)
+v-tag.0 = @printf " %-8s %s\n" "$1" "$@";
+
+## Other configuration.
+OPENSCAD = openscad
+
+## Main list of models.
+MODELS += discpick-collar.scad
+
+## Building models.
+CLEANFILES += *.stl
+%.stl: %.scad
+ $(call v-tag,SCAD)$(OPENSCAD) -o$@ -d$*.dep $<
+STLS = $(MODELS:.scad=.stl)
+all: $(STLS)
+
+## Dependency file management.
+CLEANFILES += *.dep
+DEPS += $(MODELS:.scad=.dep)
+-include $(DEPS)
+
+## Cleaning up.
+clean:; rm -f $(CLEANFILES)
+
+###----- That's all, folks --------------------------------------------------
-MM = 1;
+/* -*-c-*-
+ *
+ * A spacer for the Sparrows disc-detainer picking tool
+ *
+ * (c) 2022 Mark Wooding
+ */
-CUT_WD = 10*MM;
-BORE_DIAM = 6*MM;
-SPACER_HT = 7.25*MM;
-HEIGHT = SPACER_HT + 3*MM;
-THICK = 16*MM;
-WIDTH = 18*MM;
+/*----- Licensing notice --------------------------------------------------*
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
-BIG = 20*MM;
+/*----- Configuration -----------------------------------------------------*/
+
+/* Overall scaling. */
+MM = 1;
+/* Curvature quality. */
$fa = 0.1;
$fs = 0.2*MM;
+/* A `large enough' length; effectively infinite. */
+BIG = 20*MM;
+
+/* Dimensions. */
+CUT_WD = 10*MM; /* width of the cut in the top */
+BORE_DIAM = 6*MM; /* diameter of hole down the mid */
+SPACER_HT = 7.25*MM; /* height of the offset */
+HEIGHT = SPACER_HT + 3*MM; /* overall ht, including shelves */
+THICK = 16*MM; /* thickness */
+WIDTH = 18*MM; /* width */
+
+/*----- The main object ---------------------------------------------------*/
difference() {
intersection() {
+
+ /* Start with a bounding parallelepiped. We're going to shave pieces of
+ * this to make the actual object.
+ */
translate([-WIDTH/2, -THICK/2, 0])
cube([WIDTH, THICK, HEIGHT]);
+
+ /* Round off the vertical edges. */
cylinder(h = HEIGHT, r = norm([CUT_WD/2, WIDTH/2]));
+
+ /* Round off the shelves that sit around the pick body. */
rotate([0, 90, 0])
translate([0, 0, -BIG/2])
cylinder(h = BIG, r = norm([HEIGHT, CUT_WD/2]));
}
+
union() {
+
+ /* Cut out the channel in which the pick body sits, leaving the shelves
+ * on either side.
+ */
translate([-BIG/2, -CUT_WD/2, SPACER_HT])
cube([BIG, CUT_WD, BIG]);
+
+ /* Bore the hole down the middle through which the tensioning prongs and
+ * pick fit.
+ */
translate([0, 0, -BIG/3])
cylinder(h = BIG, r = BORE_DIAM/2);
}
}
+
+/*----- That's all, folks -------------------------------------------------*/