diff --git a/badge_test.json b/badge_test.json new file mode 100644 index 0000000..572a6d5 --- /dev/null +++ b/badge_test.json @@ -0,0 +1,4 @@ +{ + "parameterSets": "", + "fileFormatVersion": "1" +} diff --git a/badge_test.scad b/badge_test.scad new file mode 100644 index 0000000..f9c74ea --- /dev/null +++ b/badge_test.scad @@ -0,0 +1,68 @@ +$fn=32; +LAYER_HEIGHT=1; +NAME="c6hex"; +COLOR_BASE="#ffffff"; +COLOR_LOGO="#7f7f7f"; +COLOR_NAME="#7f7fff"; + +module name() { + translate([18, 4, 0]) text(NAME, font="Roboto:bold"); +} + +module logo() { + translate([10, 10]) + scale([16, 16]) + circle(d=1, $fn=6); +} + +module name_outline() { + minkowski() { + name(); + circle(r=2.5); + } +} + +module logo_outline() { + minkowski() { + logo(); + circle(r=2); + } +} + +module outline() { + union() { + name_outline(); + logo_outline(); + } +} + +module name_cutout() { + difference() { + outline(); + name(); + } +} + +module logo_cutout() { + difference() { + name_cutout(); + logo(); + } +} + +module name_cutout_plate() { + linear_extrude(height=LAYER_HEIGHT) name_cutout(); +} + +module logo_cutout_plate() { + linear_extrude(height=LAYER_HEIGHT) logo_cutout(); +} + +module name_base_plate() { + linear_extrude(height=LAYER_HEIGHT) outline(); +} + +color(COLOR_BASE) translate([0, 0, 3*LAYER_HEIGHT]) logo_cutout_plate(); +color(COLOR_LOGO) translate([0, 0, 2*LAYER_HEIGHT]) name_cutout_plate(); +color(COLOR_NAME) translate([0, 0, 1*LAYER_HEIGHT]) name_base_plate(); +color(COLOR_BASE) translate([0, 0, 0*LAYER_HEIGHT]) name_base_plate();