From a308bc74223f083f40c27e92e10be045e86322ee Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Wed, 11 Sep 2019 09:48:05 +0800 Subject: [PATCH] add floor_stand_text --- examples/floor_stand/floor_stand_text.scad | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 examples/floor_stand/floor_stand_text.scad diff --git a/examples/floor_stand/floor_stand_text.scad b/examples/floor_stand/floor_stand_text.scad new file mode 100644 index 00000000..5235ae90 --- /dev/null +++ b/examples/floor_stand/floor_stand_text.scad @@ -0,0 +1,35 @@ +include ; +include ; +include ; +include ; +include ; + +text = "Coder at Work"; +font = "Arial Black"; +font_size = 6; +line_spacing = 10; + +stand_width = 40; +stand_height = 80; +stand_thickness = 4; +joint_spacing = 1; + +module words(text, font, font_size, height, thickness, line_spacing) { + half_th = thickness / 2; + + color("black") + translate([0, -height / 1.8, thickness]) + linear_extrude(half_th / 2) { + multi_line_text( + split_str(text, " "), + font = font, + size = font_size, + line_spacing = line_spacing, + valign = "center", + halign = "center" + ); + } +} + +floor_stand(stand_width, stand_height, stand_thickness, joint_spacing, line_spacing) + words(text, font, font_size, stand_height, stand_thickness, line_spacing); \ No newline at end of file