From 15af50d92361017e1c9c044302b7bf104cc1b479 Mon Sep 17 00:00:00 2001 From: Filip Sykala - NTB T15p Date: Wed, 17 May 2023 12:57:06 +0200 Subject: [PATCH] Fix left side offset from center of base line. --- src/libslic3r/Emboss.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/Emboss.cpp b/src/libslic3r/Emboss.cpp index d8ef2071b7..68a6f87e65 100644 --- a/src/libslic3r/Emboss.cpp +++ b/src/libslic3r/Emboss.cpp @@ -1908,8 +1908,14 @@ PolygonPoints Emboss::sample_slice(const TextLine &slice, const BoundingBoxes &b samples[index] = create_sample(bbs[index], is_reverse); // calc transformation for letters on the Left side from center - shapes_x_cursor = 0; - cursor = slice.start; // copy + if (first_right_index < bbs.size()) { + shapes_x_cursor = bbs[first_right_index].center().x(); + cursor = samples[first_right_index]; + }else{ + // only left side exists + shapes_x_cursor = 0; + cursor = slice.start; // copy + } is_reverse = false; for (size_t index_plus_one = first_right_index; index_plus_one > 0; --index_plus_one) { size_t index = index_plus_one - 1;