Created
April 13, 2022 11:25
-
-
Save patmandenver/1fe7113bfd3b7324181178fabef8bcb5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Patrick Bailey iQless.com | |
// | |
//////////////////////////////////////// | |
$fn=200; | |
size = 85; | |
corner_radius = 7.5; | |
sign_height = 2; | |
svg_height = 0.45; | |
svg_adjust = [0, -4]; | |
svg_scale = .25; | |
svg_image_file = "dino_01.svg"; | |
sign_font = "Arial:style=Black"; | |
screw_holes=false; | |
rotate([0,0,45]){ | |
union(){ | |
back_sign(size, corner_radius, sign_height, screw_holes); | |
black_border(size, corner_radius, sign_height, svg_height); | |
svg(svg_image_file, sign_height, svg_height, | |
svg_scale, svg_adjust); | |
color("black"){ | |
translate([0,0,sign_height-.1]){ | |
linear_extrude(svg_height+.1){ | |
words("DINOSAUR",sign_font, 7, [0,34]); | |
words("XING",sign_font, 9, [0,-44]); | |
} | |
} | |
} | |
} | |
} | |
module back_sign(size, corner_radius, height, screw_holes){ | |
color("#e3dac9"){ | |
difference(){ | |
linear_extrude(sign_height){ | |
sign_2d(size, corner_radius); | |
} | |
//screw holes | |
if(screw_holes){ | |
mirror_copy([0,1,0]){ | |
translate([0,sin(45)*size - corner_radius/2,-.1]){ | |
cylinder(height+2, 2.5, 2.5, $fn=6); | |
translate([0,0, height/2]){ | |
cylinder(height/2+1, 5, 5, $fn=6); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
module black_border(size, corner_radius, sign_height, corgi_height){ | |
color("black"){ | |
translate([0,0,sign_height-.1]){ | |
linear_extrude(corgi_height+.1){ | |
difference(){ | |
sign_2d(size-corner_radius/2, corner_radius); | |
sign_2d(size-corner_radius, corner_radius); | |
} | |
} | |
} | |
} | |
} | |
module sign_2d(size, corner_radius){ | |
d = sin(45)*size; | |
hull(){ | |
translate([d, 0, 0]){ | |
circle(corner_radius); | |
} | |
translate([0, d, 0]){ | |
circle(corner_radius); | |
} | |
translate([-d, 0, 0]){ | |
circle(corner_radius); | |
} | |
translate([0, -d, 0]){ | |
circle(corner_radius); | |
} | |
} | |
} | |
module svg(svg_image_file, sign_height, svg_height, | |
svg_scale, svg_adjust){ | |
color("black"){ | |
translate([svg_adjust[0],svg_adjust[1],sign_height-.1]){ | |
linear_extrude(svg_height + .1){ | |
scale([svg_scale,svg_scale,1]){ | |
import(svg_image_file, center=true); | |
} | |
} | |
} | |
} | |
} | |
module words(word,sign_font, font_size, position){ | |
translate([position[0], position[1]]){ | |
text(word, size=font_size, | |
valign= "center", | |
halign="center", font=sign_font); | |
} | |
} | |
module mirror_copy(v = [1, 0, 0]) { | |
children(); | |
mirror(v) children(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment