{"id":24387417,"url":"https://github.com/idcrook/s3d-thumbnail-generator-macos","last_synced_at":"2025-10-09T18:04:38.589Z","repository":{"id":65616686,"uuid":"392507296","full_name":"idcrook/s3d-thumbnail-generator-macos","owner":"idcrook","description":"Creates gcode thumbnails from Simplify3D within macOS environment.","archived":false,"fork":false,"pushed_at":"2023-05-14T16:43:10.000Z","size":299,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T05:50:18.379Z","etag":null,"topics":["gcode","macos","octoprint-plugin","simplify3d"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/idcrook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-04T01:26:53.000Z","updated_at":"2024-04-13T19:26:12.000Z","dependencies_parsed_at":"2025-04-11T04:43:01.587Z","dependency_job_id":null,"html_url":"https://github.com/idcrook/s3d-thumbnail-generator-macos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/idcrook/s3d-thumbnail-generator-macos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idcrook%2Fs3d-thumbnail-generator-macos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idcrook%2Fs3d-thumbnail-generator-macos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idcrook%2Fs3d-thumbnail-generator-macos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idcrook%2Fs3d-thumbnail-generator-macos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idcrook","download_url":"https://codeload.github.com/idcrook/s3d-thumbnail-generator-macos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idcrook%2Fs3d-thumbnail-generator-macos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001911,"owners_count":26083225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gcode","macos","octoprint-plugin","simplify3d"],"created_at":"2025-01-19T12:54:34.266Z","updated_at":"2025-10-09T18:04:38.561Z","avatar_url":"https://github.com/idcrook.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Insert gcode preview thumbnails for Simplify3D on macOS\n\n**IMPORTANT NOTE**: **_Simplify3D_** **`v5.1`** adds native support for thumbnails in `.gcode`. See [Release Notes](S3D_version_5.1_notes.md).\n\n  - **Recommended**: Use the built-in support starting with version 5.1 instead of this post-processing technique.\n  - Earlier versions of _Simplify3D_ should continue to work with this post-precessing step, but it has now been deprecated by the native support.\n\n\nTested with [Slicer Thumbnails](https://plugins.octoprint.org/plugins/prusaslicerthumbnails/) plugin for OctoPrint.\n\nTested on **`Simplify3D.app`** `4.1.2` in macOS Big Sur on both Intel and Apple Silicon, and in  **`Simplify3D.app`** `5.0` in macOS Ventura.\n\n## Install\n\n1. Install dependencies. Use macOS [Homebrew](https://brew.sh/).\n\n    ```shell\n    brew install imagemagick\n    brew install smokris/getwindowid/getwindowid\n    ```\n\n1. Clone this repo somewhere in your macOS home directory.\n\n    ```shell\n    mkdir -p ~/projects/3dprint\n    cd ~/projects/3dprint\n    git clone https://github.com/idcrook/s3d-thumbnail-generator-macos.git s3d-thumbnails\n    ```\n\n1. Customize the included `generate_S3D_thumbnails.bash` script\n\n   - Customize any paths (most should be fine as-is)\n   - May need to iterate on the cropping image dimensions and proportions to match your window layout and preferences.\n\n1. Add script invocation in Simplify 3D gcode post-processing\n\n    ```shell\n    /Users/%%USERNAME%%/projects/3dprint/s3d-thumbnails/generate_S3D_thumbnails.bash \"[output_filepath]\"\n    ```\n\n     - `%%USERNAME%%` in the line above is meant to be replaced with your Mac account username.\n     - This is added in `Additional terminal commands for post processing` in the *Scripts* tab in *Process* settings, e.g.\n\n     ![Main window - Edit process settings](img/edit_process_settings.png)\n     ![FFF Settings - Show advanced](img/show_advanced.png)\n     ![Scripts - additional terminal commands for post processing](img/addl_term_cmds.png)\n\n1. Now when you save the `.gcode` file in **`Simplify3D.app`**, thumbnails get embedded directly.\n\n**IMPORTANT**: For recent macOS, in *System Preferences* in the *Security and Privacy* preferences, in the *Privacy* tab, you will have to enable **Screen Recording** (and possibly **Accessibility**) permissions for **`Simplify3D.app`**\n\n   - This is so the post-processing script can automatically screen capture the Simplify3D app window\n\n - The preview thumbnail is obtained directly from the Simplify3D application window.\n\n\nWith [Slicer Thumbnails](https://plugins.octoprint.org/plugins/prusaslicerthumbnails/) plugin for Octoprint enabled, the thumbnail can be viewed from web interface.\n\n![OctoPrint - View thumbnail](img/thumbnail_in_octoprint.png)\n\n## Additional Settings\n\n### Use Sliced preview or normal view\n\nThe thumbnail is captured from the Simplify3D application window when the sliced .gcode file **is saved**.\n\nIf you prefer the non-sliced preview version, in Application *Preferences* in the *Visualization* tab, uncheck\n\n- [ ] \"Automatically load preview after slicing\"\n\n![Visualization - load preview after slicing](img/load_preview_after_slicing.png)\n\n### Customize crop size and position\n\nThe image crop and dimension settings may be unique to the preview type and your macOS desktop setup.\n\nThese are adjustable in the script. Look for the in the bash script for the section starting at the line `# Position the crop bounding box`\n\n## Troubleshooting\n\n### Getting list of app windows\n\nThere is included an applescript that lists running application windows. It can be run as follows:\n\n```shell\n$ osascript window_list.scpt\n```\n\nThis is from example found at \u003chttps://stackoverflow.com/a/59293280\u003e\n\n### Manually run script\n\nWith **`Simplify3D.app`** open, the thumbnail embedding script can be run on a \"dummy\" gcode file to confirm that it has been set up correctly or for iterating on thumbnail crop area.\n\nFor example, on my Mac that has `zsh` as my terminal shell (long lines truncated in the `less` output):\n\n```console\n$ cd ~/projects/3dprint/s3d-thumbnails\n$ echo END \u003e! sample.gcode \u0026\u0026 ./generate_S3D_thumbnails.bash\n400x469 237992\n$ less sample.gcode\n;\n; thumbnail begin 32x32 3012\n; iVBORw0KGgoAAAANSUhEUgAAABsAAAAgCAMAAADUt/MJAAABNWlDQ1BpY2MAACiRY2Bg4kksKMhhYW\n; thumbnail end\n; thumbnail begin 400x469 237992\n; iVBORw0KGgoAAAANSUhEUgAAAZAAAAHVCAYAAADfKq0TAAABNWlDQ1BpY2MAACiRY2Bg4kksKMhhYW\n; thumbnail end\nEND\n$ open $TMPDIR/bigthumb.png\n```\n\n#### Does manual run error saying 'Could not find Simplify3D window'\n\nFirst, check that the application is open. 😄\n\nIf it is, then it is likely a macOS permissions problem.  Run the following command in a terminal with S3D app open:\n\n```\nGetWindowID Simplify3D --list\n```\n\nIt should look something like\n\n```\n\"(null)\" size=0x0 id=651\n\"Simplify3D (Licensed to xxxx xxxx)\" size=1200x828 id=650\n```\n\nIf all lines are instead like `\"(null)\"`, **DELETE** the entry in *Screen Recording* in `Privacy \u0026 Security` area in macOS *System Preferences/Settings* app.  Then try saving the .gcode file again. A dialog should pop up to prompt for setting the *Screen Recording* system permission for the app.\n\nOnce it is grant thusly, app name should now show up properly in the `GetWindowID` list again.\n\n\n### Enable script tracing\n\nTo turn on generic bash command tracing, change the first line of the bash script to include the `-x` option.\n\n```\n#!/bin/bash -x\n```\n\n## SEE ALSO\n\n  - https://plugins.octoprint.org/plugins/prusaslicerthumbnails/\n\n      - https://github.com/boweeble/s3d-thumbnail-generator\n      - https://github.com/NotExpectedYet/s3d-thumbnail-generator\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidcrook%2Fs3d-thumbnail-generator-macos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidcrook%2Fs3d-thumbnail-generator-macos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidcrook%2Fs3d-thumbnail-generator-macos/lists"}