mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-06 06:47:46 +02:00
add floor_stand_text
This commit is contained in:
35
examples/floor_stand/floor_stand_text.scad
Normal file
35
examples/floor_stand/floor_stand_text.scad
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
include <util/sub_str.scad>;
|
||||||
|
include <util/split_str.scad>;
|
||||||
|
include <hollow_out.scad>;
|
||||||
|
include <floor_stand.scad>;
|
||||||
|
include <multi_line_text.scad>;
|
||||||
|
|
||||||
|
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);
|
Reference in New Issue
Block a user