Skip to content

Commit f66bc9a

Browse files
committed
Update examples/logo_and_text.scad and expected test results. (Fixes openscad#3566)
1 parent e94f5b4 commit f66bc9a

File tree

5 files changed

+18
-15
lines changed

5 files changed

+18
-15
lines changed

Diff for: examples/Basics/logo_and_text.scad

+12-9
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,32 @@ use <logo.scad> // Imports the Logo() module from logo.scad into this namespace
44

55
// Set the initial viewport parameters
66
$vpr = [90, 0, 0];
7-
$vpt = [250, 0, 80];
8-
$vpd = 500;
7+
$vpt = [300, 0, 80];
8+
$vpd = 1600;
99

1010
logosize = 120;
1111

12-
1312
translate([110, 0, 80]) {
1413
translate([0, 0, 30]) rotate([25, 25, -40]) Logo(logosize);
15-
translate([100, 0, 40]) green() t("Open", 42, ":style=Bold");
16-
translate([247, 0, 40]) black() t("SCAD", 42, ":style=Bold");
17-
translate([100, 0, 0]) black() t("The Programmers");
14+
translate([100, 0, 40]) green() t("Open", s = 42, spacing = 1.05);
15+
translate([247, 0, 40]) corn() t("SCAD" , s = 42, spacing = 0.9);
16+
translate([100, 0, 0]) black() t("The Programmers");
1817
translate([160, 0, -30]) black() t("Solid 3D CAD Modeller");
1918
}
2019

2120
// Helper to create 3D text with correct font and orientation
22-
module t(t, s = 18, style = "") {
21+
module t(t, s = 18, style = ":style=Bold", spacing = 1) {
2322
rotate([90, 0, 0])
2423
linear_extrude(height = 1)
25-
text(t, size = s, font = str("Liberation Sans", style), $fn = 16);
24+
text(t, size = s,
25+
spacing=spacing,
26+
font = str("Liberation Sans", style),
27+
$fn = 16);
2628
}
2729

2830
// Color helpers
29-
module green() color([81/255, 142/255, 4/255]) children();
31+
module green() color([157/255,203/255,81/255]) children();
32+
module corn() color([249/255,210/255,44/255]) children();
3033
module black() color([0, 0, 0]) children();
3134

3235
echo(version=version());
-345 Bytes
Loading

Diff for: tests/regression/dumptest-examples/logo_and_text-expected.csg

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ multmatrix([[1, 0, 0, 110], [0, 1, 0, 0], [0, 0, 1, 80], [0, 0, 0, 1]]) {
1717
}
1818
multmatrix([[1, 0, 0, 100], [0, 1, 0, 0], [0, 0, 1, 40], [0, 0, 0, 1]]) {
1919
group() {
20-
color([0.317647, 0.556863, 0.0156863, 1]) {
20+
color([0.615686, 0.796078, 0.317647, 1]) {
2121
group() {
2222
group() {
2323
multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
2424
linear_extrude(height = 1, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
25-
text(text = "Open", size = 42, spacing = 1, font = "Liberation Sans:style=Bold", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
25+
text(text = "Open", size = 42, spacing = 1.05, font = "Liberation Sans:style=Bold", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
2626
}
2727
}
2828
}
@@ -32,12 +32,12 @@ multmatrix([[1, 0, 0, 110], [0, 1, 0, 0], [0, 0, 1, 80], [0, 0, 0, 1]]) {
3232
}
3333
multmatrix([[1, 0, 0, 247], [0, 1, 0, 0], [0, 0, 1, 40], [0, 0, 0, 1]]) {
3434
group() {
35-
color([0, 0, 0, 1]) {
35+
color([0.976471, 0.823529, 0.172549, 1]) {
3636
group() {
3737
group() {
3838
multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
3939
linear_extrude(height = 1, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
40-
text(text = "SCAD", size = 42, spacing = 1, font = "Liberation Sans:style=Bold", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
40+
text(text = "SCAD", size = 42, spacing = 0.9, font = "Liberation Sans:style=Bold", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
4141
}
4242
}
4343
}
@@ -52,7 +52,7 @@ multmatrix([[1, 0, 0, 110], [0, 1, 0, 0], [0, 0, 1, 80], [0, 0, 0, 1]]) {
5252
group() {
5353
multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
5454
linear_extrude(height = 1, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
55-
text(text = "The Programmers", size = 18, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
55+
text(text = "The Programmers", size = 18, spacing = 1, font = "Liberation Sans:style=Bold", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
5656
}
5757
}
5858
}
@@ -67,7 +67,7 @@ multmatrix([[1, 0, 0, 110], [0, 1, 0, 0], [0, 0, 1, 80], [0, 0, 0, 1]]) {
6767
group() {
6868
multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
6969
linear_extrude(height = 1, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
70-
text(text = "Solid 3D CAD Modeller", size = 18, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
70+
text(text = "Solid 3D CAD Modeller", size = 18, spacing = 1, font = "Liberation Sans:style=Bold", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
7171
}
7272
}
7373
}
-3.95 KB
Loading
-2.7 KB
Loading

0 commit comments

Comments
 (0)