diff main.scad @ 4:4836a7408849

more elaborate hole finding
author ark
date 2026-11-03 15:51 +0100
parents f5ff6f1a5454
children
line wrap: on
line diff
--- a/main.scad	Tue Nov 03 13:54:57 2026 +0100
+++ b/main.scad	Tue Nov 03 15:51:23 2026 +0100
@@ -396,11 +396,14 @@
 main();
 
 // Export file name without extension, see the print settings for lw and lh.
+// The most holes per glyph from glyphs.scad is given as h and the count, if not 2.
 // prefix: project name with trailing underscore. suffix: appended as is.
-function paramstring(prefix = "", suffix = "") = str(
+function paramstring(prefix = "", suffix = "") = let (
+    holes_str = g_holes == 2 ? "" : str("h", g_holes, "_")
+) str(
     prefix,
     part == "all" ? "" : str(part, "_"),
-    part == "template" ? str(g_name, "_s", round(10 * final_size))
+    part == "template" ? str(g_name, "_", holes_str, "s", round(10 * final_size))
     : part == "washer"
         ? magnet
             ? str(magnet_str, "_w", washer_wall_lines, "h", round(10 * washer_h))
@@ -410,6 +413,7 @@
               two_colour ? str("2cd", decal_n, "_") : "", backing ? "bk_" : "",
               magnet ? (washers_on_body ? str(magnet_str, "_") : "mg_")
                      : countersink ? "cs_" : "",
+              holes_str,
               washers_on_body ? str("wh", round(10 * washer_h), "_") : "",
               "s", round(10 * final_size), "a", round(print_angle), "t", glyph_layers),
     "_lw", round(100 * line_width), "lh", round(100 * layer_height),