From da055beece14db7a93ba68153a945288ce5350e8 Mon Sep 17 00:00:00 2001 From: Joeydelarago Date: Sun, 6 Feb 2022 16:07:50 +0000 Subject: [PATCH 1/2] Add option to export only the inverse of inset text, this can be used to print the legend in a seperate color on a dual extruder. Add offset_x and offset_y so that exported 3mf files can be centered on slicer buildplates. --- customizer.scad | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/customizer.scad b/customizer.scad index ad30bbb..7047da4 100644 --- a/customizer.scad +++ b/customizer.scad @@ -144,6 +144,15 @@ $rounded_key = false; //minkowski radius. radius of sphere used in minkowski sum for minkowski_key function. 1.75 for G20 $minkowski_radius = .33; +//Outputs only inverse of inset text, used to print inset filled with different color on dual extruder printers +$output_text_inset_only = false; + +//3D printers use the bottom left as the origin, inputting your buildplate width/2 will center 3mf files when slicing. +$offset_x = 50; + +//3D printers use the bottom left as the origin, inputting your buildplate height/2 will center 3mf files when slicing. +$offset_y = 50; + /* [Features] */ //insert locating bump @@ -4264,6 +4273,13 @@ module hollow_key() { } } +module inset_text() { + translate([0, 0, .001]) color("black") intersection() { + if (inset && $children > 0) artisan($inset_legend_depth) children(); + if(!$outset_legends) legends($inset_legend_depth); + hollow_key(); + } +} // The final, penultimate key generation function. // takes all the bits and glues them together. requires configuration with special variables. @@ -4521,5 +4537,11 @@ if (!$using_customizer) { } key_profile(key_profile, row) legend(legend) { - key(); + translate([$offset_x, $offset_y, 0]) + + if ($output_text_inset_only) { + inset_text(); + } else { + key(); + } } From 7a3de22e8a61aadc38b1f2b49f196d709b9cc51d Mon Sep 17 00:00:00 2001 From: Joeydelarago Date: Sun, 6 Feb 2022 17:55:37 +0000 Subject: [PATCH 2/2] Change default offset to 0 --- customizer.scad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/customizer.scad b/customizer.scad index 7047da4..8a2247f 100644 --- a/customizer.scad +++ b/customizer.scad @@ -148,10 +148,10 @@ $minkowski_radius = .33; $output_text_inset_only = false; //3D printers use the bottom left as the origin, inputting your buildplate width/2 will center 3mf files when slicing. -$offset_x = 50; +$offset_x = 0; //3D printers use the bottom left as the origin, inputting your buildplate height/2 will center 3mf files when slicing. -$offset_y = 50; +$offset_y = 0; /* [Features] */