diff options
author | XANTRONIX Development | 2023-11-20 12:54:09 -0500 |
---|---|---|
committer | XANTRONIX Development | 2023-11-20 12:57:18 -0500 |
commit | 09bd3720714da839624a8ee154a7a5fa01e0bbd1 (patch) | |
tree | cb5860800bf8698a38d6166854b5856892846ebf /case | |
parent | ba7a24b16b18d4438fc92b6cc73d03a030de9dce (diff) | |
download | xantronix-z32-09bd3720714da839624a8ee154a7a5fa01e0bbd1.tar.gz xantronix-z32-09bd3720714da839624a8ee154a7a5fa01e0bbd1.tar.bz2 xantronix-z32-09bd3720714da839624a8ee154a7a5fa01e0bbd1.zip |
Move badge rendering to case/logo.scad
Diffstat (limited to 'case')
-rw-r--r-- | case/logo.scad | 19 | ||||
-rw-r--r-- | case/top.scad | 41 |
2 files changed, 28 insertions, 32 deletions
diff --git a/case/logo.scad b/case/logo.scad new file mode 100644 index 0000000..3153ca1 --- /dev/null +++ b/case/logo.scad @@ -0,0 +1,19 @@ +module logotype(size) { + font = "Proxima Nova Semibold"; + font_size_ratio = 1/5; + + text("XANTRONIX", font=font, size=size*font_size_ratio); + + translate([16, 0, 0]) + text("Z32", font=font, size=size); +} + +module sextile(width) { + ratio = 33 / 197; + margin = 0.5; + + for (angle = [0, -55, 55]) { + rotate([0, 0, angle]) + square([width + margin, ratio * width + 2*margin], true); + } +} diff --git a/case/top.scad b/case/top.scad index 8288862..1b85f38 100644 --- a/case/top.scad +++ b/case/top.scad @@ -3,6 +3,7 @@ $fn = 72; include <dimensions.scad> include <support.scad> include <keyboard.scad> +include <logo.scad> module top_case(with_keyboard=false) { keyboard_deck_z_offset = wall_height - keyboard_switch_height; @@ -158,43 +159,20 @@ module top_case(with_keyboard=false) { } } - module logotype() { - module logotype_text(size) { - size_ratio = 1/5; - - text("XANTRONIX", font="Proxima Nova Semibold", size=size*size_ratio); - - translate([16, 0, 0]) - text("Z32", font="Proxima Nova Semibold", size=size); - } - - size = 10; - + module badges() { translate([keyboard_x_offset, keyboard_y_offset + keyboard_pcb_length + keyboard_switch_length + accent_width, wall_height - accent_depth]) linear_extrude(accent_depth + eps) - logotype_text(size); - } - - module sextile() { - module shape(width) { - ratio = 33 / 197; - margin = 0.5; - - for (angle = [0, -55, 55]) { - rotate([0, 0, angle]) - square([width + margin, ratio * width + 2*margin], true); - } - } + logotype(size=10); - width = 16.0; - offset_y = keyboard_y_offset + (keyboard_switch_width + accent_width) / 2; - offset_x = case_width_bottom - width; + sextile_width = 16.0; + sextile_y = keyboard_y_offset + (keyboard_switch_width + accent_width) / 2; + sextile_x = case_width_bottom - sextile_width; - translate([offset_x, offset_y, wall_height - accent_depth]) + translate([sextile_x, sextile_y, wall_height - accent_depth]) linear_extrude(accent_depth + eps) - shape(width); + sextile(width=sextile_width); } module body() { @@ -221,10 +199,9 @@ module top_case(with_keyboard=false) { difference() { body(); - logotype(); - sextile(); accents(); vents(); + badges(); } screw_posts(); |