Title: PS3 Lua plugin API: api.emboss_text() ignores the depth option and always produces a 1mm-deep mesh · Issue #15793 · prusa3d/PrusaSlicer · GitHub
Open Graph Title: PS3 Lua plugin API: api.emboss_text() ignores the depth option and always produces a 1mm-deep mesh · Issue #15793 · prusa3d/PrusaSlicer
X Title: PS3 Lua plugin API: api.emboss_text() ignores the depth option and always produces a 1mm-deep mesh · Issue #15793 · prusa3d/PrusaSlicer
Description: Description of the bug api.emboss_text() ignores any depth value passed in its options table. The emboss or deboss depth is always 1.0mm. EmbossTextOpts declares double depth{1.0} (ProjectApi.cpp:520-526). parse_emboss_text_opts() reads ...
Open Graph Description: Description of the bug api.emboss_text() ignores any depth value passed in its options table. The emboss or deboss depth is always 1.0mm. EmbossTextOpts declares double depth{1.0} (ProjectApi.cpp:5...
X Description: Description of the bug api.emboss_text() ignores any depth value passed in its options table. The emboss or deboss depth is always 1.0mm. EmbossTextOpts declares double depth{1.0} (ProjectApi.cpp:5...
Opengraph URL: https://github.com/prusa3d/PrusaSlicer/issues/15793
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PS3 Lua plugin API: api.emboss_text() ignores the depth option and always produces a 1mm-deep mesh","articleBody":"### Description of the bug\n\n`api.emboss_text()` ignores any `depth` value passed in its options table. The emboss or deboss depth is always 1.0mm.\n\n`EmbossTextOpts` declares `double depth{1.0}` ([`ProjectApi.cpp:520-526`](https://github.com/prusa3d/PrusaSlicer/blob/version_3.0.0-alpha11/src/slic3r-shared/src/Slic3r/App/Lua/ProjectApi.cpp#L520-L526)). `parse_emboss_text_opts()` reads only `font`, `text`, `line_height`, and `per_glyph` from the Lua table ([`ProjectApi.cpp:536-547`](https://github.com/prusa3d/PrusaSlicer/blob/version_3.0.0-alpha11/src/slic3r-shared/src/Slic3r/App/Lua/ProjectApi.cpp#L536-L547)); it never reads `depth`. The struct's default therefore reaches `emboss_text()` unchanged regardless of what the caller passes.\n\n`api.emboss_svg(path, depth)` shows this is a real bug, not a documented limitation: its `depth` parameter is read directly and applied ([`ProjectApi.cpp:496-500`](https://github.com/prusa3d/PrusaSlicer/blob/version_3.0.0-alpha11/src/slic3r-shared/src/Slic3r/App/Lua/ProjectApi.cpp#L496-L500)). `emboss_text()` accepts the same key in its options table; it simply never forwards it to `EmbossTextOpts`.\n\n### Zipped project file & How to reproduce\n\nNo project file is needed; the bug does not depend on any model or 3mf. Steps:\n\n1. Install a Lua plugin with this `execute()`:\n ```lua\n function execute(opts)\n local mesh = api.emboss_text{font = api.get_default_font(), text = \"X\", depth = 5}\n local bb = mesh:bounds()\n print(\"requested depth 5, got depth \" .. (bb.max_z - bb.min_z))\n end\n ```\n2. Launch PrusaSlicer from a terminal so `print()` output is visible.\n3. Run the plugin from the Plugins menu.\n\n**Expected:** `requested depth 5, got depth 5`\n**Actual:** `requested depth 5, got depth 1`\n\n### Suggested fix\n\nAdd a line to `parse_emboss_text_opts()` reading `depth` from the options table, matching the existing `line_height`/`per_glyph` pattern:\n```cpp\n.depth = def.get_or(\"depth\", 1.0),\n```\n\n### Version of PrusaSlicer\n\n3.0.0-alpha11\n\n### Operating system\n\nmacOS\n\n### Operating system version\n\n26.6.2\n\n### Printer model\n\nPrusa Signature Oak\n","author":{"url":"https://github.com/mjonuschat","@type":"Person","name":"mjonuschat"},"datePublished":"2026-09-07T20:54:56Z","url":"https://github.com/prusa3d/PrusaSlicer/issues/15793"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:539c669a-c36f-38ae-33f6-56f053d8ab65 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B72C:1268E7:21854:2C538:6AEBC2A1 |
| html-safe-nonce | 2b904971bd5fee1432f172ceff518ca0fca95034e2ea44f5f7158cfdd8c5cb9d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzJDOjEyNjhFNzoyMTg1NDoyQzUzODo2QUVCQzJBMSIsInZpc2l0b3JfaWQiOiI3MTIxMjE4NzUxMDk1ODgyNDAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 713c2890459c83e163e93ac2de08d8d4050b47a2874cf5c562f85a188aaac8be |
| hovercard-subject-tag | issue:5378941312 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/prusa3d/PrusaSlicer/15793/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0704cfaee98cadb9feb0fd92f0273724d81956b8a8328cb4b6905d3282580b34/prusa3d/PrusaSlicer/issues/15793 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0704cfaee98cadb9feb0fd92f0273724d81956b8a8328cb4b6905d3282580b34/prusa3d/PrusaSlicer/issues/15793 |
| og:image:alt | Description of the bug api.emboss_text() ignores any depth value passed in its options table. The emboss or deboss depth is always 1.0mm. EmbossTextOpts declares double depth{1.0} (ProjectApi.cpp:5... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mjonuschat |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4c39b5a5177867789999269ddf5ae2221b00c4ac9fe1487d3a72e97b69db173e |
| turbo-cache-control | no-preview |
| go-import | github.com/prusa3d/PrusaSlicer git https://github.com/prusa3d/PrusaSlicer.git |
| octolytics-dimension-user_id | 14859759 |
| octolytics-dimension-user_login | prusa3d |
| octolytics-dimension-repository_id | 52882701 |
| octolytics-dimension-repository_nwo | prusa3d/PrusaSlicer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 52882701 |
| octolytics-dimension-repository_network_root_nwo | prusa3d/PrusaSlicer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c520692f02ba50d045716bcd724a71f0fc5f7d96 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width