mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-12 01:34:12 +02:00
accept diff font and font_size
This commit is contained in:
@@ -8,8 +8,8 @@ use <ptf/ptf_rotate.scad>;
|
|||||||
use <util/sub_str.scad>;
|
use <util/sub_str.scad>;
|
||||||
|
|
||||||
emoticon = "ToT";
|
emoticon = "ToT";
|
||||||
font = "Arial Black";
|
font = ["Arial Black", "Arial Black", "Arial Back"];
|
||||||
font_size = 8;
|
font_size = [8, 8, 8];
|
||||||
|
|
||||||
h = 50;
|
h = 50;
|
||||||
face = 18;
|
face = 18;
|
||||||
@@ -165,22 +165,22 @@ module moai(emoticon, font, font_size, h, face = 18, face_step = 2, nose = 4, no
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
translate([0, -h / 2.975, h / 7])
|
|
||||||
rotate([0, 0, nose * 5])
|
|
||||||
translate([0, -h / 2.5, h / 1.45])
|
|
||||||
rotate([60, 0, -(face + nose) / 2])
|
|
||||||
linear_extrude(h / 25, center = true, scale = .9)
|
|
||||||
text(emoticon[len(emoticon) - 1], font = font, size = font_size, valign = "center", halign = "center");
|
|
||||||
|
|
||||||
translate([0, -h / 2.975, h / 7])
|
translate([0, -h / 2.975, h / 7])
|
||||||
rotate([0, 0, -nose * 5])
|
rotate([0, 0, -nose * 5])
|
||||||
translate([0, -h / 2.5, h / 1.45])
|
translate([0, -h / 2.5, h / 1.45])
|
||||||
rotate([60, 0, (face + nose) / 2])
|
rotate([60, 0, (face + nose) / 2])
|
||||||
linear_extrude(h / 25, center = true, scale = .9)
|
linear_extrude(h / 25, center = true, scale = .9)
|
||||||
text(emoticon[0], font = font, size = font_size, valign = "center", halign = "center");
|
text(emoticon[0], font = font[0], size = font_size[0], valign = "center", halign = "center");
|
||||||
|
|
||||||
translate([0, -h / 1.115, h / 1.85])
|
translate([0, -h / 1.115, h / 1.85])
|
||||||
rotate([55, 0, 0])
|
rotate([55, 0, 0])
|
||||||
linear_extrude(h / 25, center = true, scale = .9)
|
linear_extrude(h / 25, center = true, scale = .9)
|
||||||
text(sub_str(emoticon, 1, len(emoticon) - 1), font = font, size = font_size, valign = "center", halign = "center");
|
text(sub_str(emoticon, 1, len(emoticon) - 1), font = font[1], size = font_size[1], valign = "center", halign = "center");
|
||||||
|
|
||||||
|
translate([0, -h / 2.975, h / 7])
|
||||||
|
rotate([0, 0, nose * 5])
|
||||||
|
translate([0, -h / 2.5, h / 1.45])
|
||||||
|
rotate([60, 0, -(face + nose) / 2])
|
||||||
|
linear_extrude(h / 25, center = true, scale = .9)
|
||||||
|
text(emoticon[len(emoticon) - 1], font = font[2], size = font_size[2], valign = "center", halign = "center");
|
||||||
}
|
}
|
Reference in New Issue
Block a user