Move badge rendering to case/logo.scad
This commit is contained in:
parent
ba7a24b16b
commit
09bd372071
2 changed files with 28 additions and 32 deletions
19
case/logo.scad
Normal file
19
case/logo.scad
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ $fn = 72;
|
||||||
include <dimensions.scad>
|
include <dimensions.scad>
|
||||||
include <support.scad>
|
include <support.scad>
|
||||||
include <keyboard.scad>
|
include <keyboard.scad>
|
||||||
|
include <logo.scad>
|
||||||
|
|
||||||
module top_case(with_keyboard=false) {
|
module top_case(with_keyboard=false) {
|
||||||
keyboard_deck_z_offset = wall_height - keyboard_switch_height;
|
keyboard_deck_z_offset = wall_height - keyboard_switch_height;
|
||||||
|
@ -158,43 +159,20 @@ module top_case(with_keyboard=false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module logotype() {
|
module badges() {
|
||||||
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;
|
|
||||||
|
|
||||||
translate([keyboard_x_offset,
|
translate([keyboard_x_offset,
|
||||||
keyboard_y_offset + keyboard_pcb_length + keyboard_switch_length + accent_width,
|
keyboard_y_offset + keyboard_pcb_length + keyboard_switch_length + accent_width,
|
||||||
wall_height - accent_depth])
|
wall_height - accent_depth])
|
||||||
linear_extrude(accent_depth + eps)
|
linear_extrude(accent_depth + eps)
|
||||||
logotype_text(size);
|
logotype(size=10);
|
||||||
}
|
|
||||||
|
|
||||||
module sextile() {
|
sextile_width = 16.0;
|
||||||
module shape(width) {
|
sextile_y = keyboard_y_offset + (keyboard_switch_width + accent_width) / 2;
|
||||||
ratio = 33 / 197;
|
sextile_x = case_width_bottom - sextile_width;
|
||||||
margin = 0.5;
|
|
||||||
|
|
||||||
for (angle = [0, -55, 55]) {
|
translate([sextile_x, sextile_y, wall_height - accent_depth])
|
||||||
rotate([0, 0, angle])
|
|
||||||
square([width + margin, ratio * width + 2*margin], true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
width = 16.0;
|
|
||||||
offset_y = keyboard_y_offset + (keyboard_switch_width + accent_width) / 2;
|
|
||||||
offset_x = case_width_bottom - width;
|
|
||||||
|
|
||||||
translate([offset_x, offset_y, wall_height - accent_depth])
|
|
||||||
linear_extrude(accent_depth + eps)
|
linear_extrude(accent_depth + eps)
|
||||||
shape(width);
|
sextile(width=sextile_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
module body() {
|
module body() {
|
||||||
|
@ -221,10 +199,9 @@ module top_case(with_keyboard=false) {
|
||||||
|
|
||||||
difference() {
|
difference() {
|
||||||
body();
|
body();
|
||||||
logotype();
|
|
||||||
sextile();
|
|
||||||
accents();
|
accents();
|
||||||
vents();
|
vents();
|
||||||
|
badges();
|
||||||
}
|
}
|
||||||
|
|
||||||
screw_posts();
|
screw_posts();
|
||||||
|
|
Loading…
Add table
Reference in a new issue