wobblyhead hg > 3dprints > house_number
comparison main.scad @ 4:4836a7408849
more elaborate hole finding
| author | ark |
|---|---|
| date | 2026-11-03 15:51 +0100 |
| parents | f5ff6f1a5454 |
| children |
comparison
equal
deleted
inserted
replaced
| 3:f5ff6f1a5454 | 4:4836a7408849 |
|---|---|
| 394 } | 394 } |
| 395 | 395 |
| 396 main(); | 396 main(); |
| 397 | 397 |
| 398 // Export file name without extension, see the print settings for lw and lh. | 398 // Export file name without extension, see the print settings for lw and lh. |
| 399 // The most holes per glyph from glyphs.scad is given as h and the count, if not 2. | |
| 399 // prefix: project name with trailing underscore. suffix: appended as is. | 400 // prefix: project name with trailing underscore. suffix: appended as is. |
| 400 function paramstring(prefix = "", suffix = "") = str( | 401 function paramstring(prefix = "", suffix = "") = let ( |
| 402 holes_str = g_holes == 2 ? "" : str("h", g_holes, "_") | |
| 403 ) str( | |
| 401 prefix, | 404 prefix, |
| 402 part == "all" ? "" : str(part, "_"), | 405 part == "all" ? "" : str(part, "_"), |
| 403 part == "template" ? str(g_name, "_s", round(10 * final_size)) | 406 part == "template" ? str(g_name, "_", holes_str, "s", round(10 * final_size)) |
| 404 : part == "washer" | 407 : part == "washer" |
| 405 ? magnet | 408 ? magnet |
| 406 ? str(magnet_str, "_w", washer_wall_lines, "h", round(10 * washer_h)) | 409 ? str(magnet_str, "_w", washer_wall_lines, "h", round(10 * washer_h)) |
| 407 : str(countersink ? "cs_" : "", "d", round(10 * screw_d), "w", washer_wall_lines, | 410 : str(countersink ? "cs_" : "", "d", round(10 * screw_d), "w", washer_wall_lines, |
| 408 "h", round(10 * washer_h), countersink ? str("c", round(10 * cs_washer)) : "") | 411 "h", round(10 * washer_h), countersink ? str("c", round(10 * cs_washer)) : "") |
| 409 : str(g_name, "_", layout == "glyph" ? str("g", glyph_index, "_") : "", | 412 : str(g_name, "_", layout == "glyph" ? str("g", glyph_index, "_") : "", |
| 410 two_colour ? str("2cd", decal_n, "_") : "", backing ? "bk_" : "", | 413 two_colour ? str("2cd", decal_n, "_") : "", backing ? "bk_" : "", |
| 411 magnet ? (washers_on_body ? str(magnet_str, "_") : "mg_") | 414 magnet ? (washers_on_body ? str(magnet_str, "_") : "mg_") |
| 412 : countersink ? "cs_" : "", | 415 : countersink ? "cs_" : "", |
| 416 holes_str, | |
| 413 washers_on_body ? str("wh", round(10 * washer_h), "_") : "", | 417 washers_on_body ? str("wh", round(10 * washer_h), "_") : "", |
| 414 "s", round(10 * final_size), "a", round(print_angle), "t", glyph_layers), | 418 "s", round(10 * final_size), "a", round(print_angle), "t", glyph_layers), |
| 415 "_lw", round(100 * line_width), "lh", round(100 * layer_height), | 419 "_lw", round(100 * line_width), "lh", round(100 * layer_height), |
| 416 suffix); | 420 suffix); |
| 417 | 421 |
