From 8f85ac73dc4d759d13067c869eb5632d3f169da8 Mon Sep 17 00:00:00 2001 From: Martin Budden Date: Sun, 16 Feb 2020 21:15:44 +0000 Subject: [PATCH] Added space before screw length when length < 10 to ensure correct ordering. This means 5mm, 6mm etc comes before 10mm in BOM. --- vitamins/screw.scad | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vitamins/screw.scad b/vitamins/screw.scad index 1ddc206..c4ffe79 100644 --- a/vitamins/screw.scad +++ b/vitamins/screw.scad @@ -58,7 +58,7 @@ function screw_shorter_than(x) = x >= 20 ? floor(x / 5) * 5 : //! Returns longes function screw_smaller_than(d) = d >= 2.5 && d < 3 ? 2.5 : floor(d); // Largest diameter screw less than or equal to specified diameter module screw(type, length, hob_point = 0, nylon = false) { //! Draw specified screw, optionally hobbed or nylon - description = str("Screw ", nylon ? "Nylon " : "", type[1], " x ", length, "mm", hob_point ? str(", hobbed at ", hob_point) : ""); + description = str("Screw ", nylon ? "Nylon " : "", type[1], length < 10 ? " x " : " x ", length, "mm", hob_point ? str(", hobbed at ", hob_point) : ""); vitamin(str("screw(", type[0], "_screw, ", length, arg(hob_point, 0, "hob_point"), arg(nylon, false, "nylon"), "): ", description)); head_type = screw_head_type(type);