{"id":40842454,"url":"https://github.com/xypwn/scadqr","last_synced_at":"2026-01-21T23:07:18.295Z","repository":{"id":190732462,"uuid":"683239688","full_name":"xypwn/scadqr","owner":"xypwn","description":"Effortlessly generate QR codes directly in OpenSCAD! No extra dependencies!","archived":false,"fork":false,"pushed_at":"2024-11-29T11:11:44.000Z","size":1386,"stargazers_count":96,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-29T11:35:30.125Z","etag":null,"topics":["3d-printing","openscad","qrcode","qrcode-generator"],"latest_commit_sha":null,"homepage":"","language":"OpenSCAD","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/xypwn.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}},"created_at":"2023-08-26T00:23:53.000Z","updated_at":"2024-11-29T11:11:47.000Z","dependencies_parsed_at":"2024-08-12T22:54:16.950Z","dependency_job_id":null,"html_url":"https://github.com/xypwn/scadqr","commit_stats":null,"previous_names":["xypwn/scadqr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xypwn/scadqr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xypwn%2Fscadqr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xypwn%2Fscadqr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xypwn%2Fscadqr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xypwn%2Fscadqr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xypwn","download_url":"https://codeload.github.com/xypwn/scadqr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xypwn%2Fscadqr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28646722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["3d-printing","openscad","qrcode","qrcode-generator"],"created_at":"2026-01-21T23:07:17.729Z","updated_at":"2026-01-21T23:07:18.289Z","avatar_url":"https://github.com/xypwn.png","language":"OpenSCAD","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scadqr\nEffortlessly generate QR codes directly in OpenSCAD! No extra dependencies!\n\n### Basic Example\nThis code...\n```scad\ninclude \u003cqr.scad\u003e // omit this if you pasted the library's source code at the end of the file\n\ncolor(\"black\") qr(\"https://github.com/xypwn/scadqr\", center=true);\n```\n...gives us this model\n\n![demo QR code for https://github.com/xypwn/scadqr](demo.png)\n\n### Custom Components Example\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\nYou can specify custom models for each module (\"pixel\"), position pattern and alignment pattern.\nTo do this, you can use the [`qr_custom()`](API.md#qr_custom---generates-a-qr-code-using-custom-elements) function. \nSee the [API docs](API.md#qr_custom---generates-a-qr-code-using-custom-elements) for all the details.\n\nThe following shows an example using round components.\n\n```scad\ninclude \u003cqr.scad\u003e // omit this if you pasted the library's source code at the end of the file\n\ncolor(\"black\") qr_custom(\"https://github.com/xypwn/scadqr\") {\n    // Module\n    translate([0.5, 0.5])\n        scale([0.9, 0.9])\n        offset(r = 0.3, $fn=16)\n            square(0.4, center=true);\n    // Position pattern\n    translate([3.5, 3.5]) union() {\n        difference() {\n            offset(r = 0.75, $fn=32)\n                square(5.5, center=true);\n            offset(r = 0.75, $fn=32)\n                square(3.5, center=true);\n        }\n        offset(r = 0.75, $fn=32)\n            square(1.4, center=true);\n    }\n    // Alignment pattern\n    translate([2.5, 2.5]) union() {\n        difference() {\n            offset(r = 0.6, $fn=32)\n                square(3.5, center=true);\n            offset(r = 0.5, $fn=32)\n                square(2, center=true);\n        }\n        offset(r = 0.4, $fn=32)\n            square(0.2, center=true);\n    }\n}\n```\n\n![demo QR code for https://github.com/xypwn/scadqr with round components](demo-custom.png)\n\u003c/details\u003e\n\n### Wi-Fi Example\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand\u003c/summary\u003e\n\nYou can generate special \"messages\" using the `qr_wifi`, `qr_phone_call`, `qr_vcard` etc. functions. The resulting message can be passed into the `qr` or `qr_custom` module as seen in the example below.\n\nFor more details, see [API.md](API.md#qr_wifi---generates-a-connect-to-wifi-message-which-can-be-input-into-qr).\n\n```scad\ninclude \u003cqr.scad\u003e // omit this if you pasted the library's source code at the end of the file\n\ncolor(\"black\") qr(qr_wifi(\"MyNetworkName\", \"supersecretpassword1337\"), center=true);\n```\n\n\u003c/details\u003e\n\n### API documentation\n[API.md](API.md)\n\n### Using the library in your OpenSCAD project\n#### Simple method (pasting code at end of file) [recommended]\nOpen [qr.scad](qr.scad) and click the \"copy raw file\" button...\n![\"copy\" button on the top right of the source code viewer for qr.scad](instruction-copy-from-github.png)\n...then paste the copied source code at the end of your project file.\n\nDo **NOT** add the `include \u003cqr.scad\u003e` line if you are using this method!\n\nThis method is the only one that works with Thingiverse's Customizer.\n\nIf you're working with multiple source code files, I recommend using one of the other methods.\n\n#### Including as local library\n[download](#raw-download) the library file directly into your project folder and add an `include \u003cqr.scad\u003e` to the beginning of your file\n\n#### Installing as global library\nFollow [these](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries) instructions.\n\nYou will also have to add an `include \u003cqr.scad\u003e` to the beginning of your file\n\n### Raw download\n[qr.scad](https://raw.githubusercontent.com/xypwn/scadqr/main/qr.scad) (Right-Click -\u003e Save target as)\n\n### Notes on using with Thingiverse's Customizer\nThis library fully supports Thingiverse's Customizer, but you will need to directly append the library code to your SCAD file, as Customizer only supports a single file.\n\nI also noticed Customizer has some weird quirks regarding which SCAD code it will accept and which not. Here are some things you will need to pay attention to:\n- NEVER use non-ASCII characters, or it will just say *\"We're sorry, but something went wrong.\"*\n- avoid functional asserts (e.g.: `function f(x) = assert(x \u003e 0) x;`)\n- some functions like `ord()` aren't available\n\n### Development\nAll scripts ending with `.py` require a recent version of [Python](https://www.python.org/downloads/).\n\nYou will also need to run them from inside the cloned repo's directory.\n\n#### Generating the library files\nThe source code is located in `src/` and run through the `generate.py` script in order to generate the all-in-one library files intented to be used.\n\nThe generator script mainly does two things:\n- Prefix private functions/modules with `_qr_` to prevent naming collisions\n- Generate documentation for public functions/modules and output it to `API.md`\n\nRun generator (Linux/MacOS): `./generate.py`\n\nRun generator (Windows): `py generate.py`\n\n#### Running the tests\nTo confirm that QR codes are generating correctly, you can run the automatic tests **after** having run `generate.py`.\n\nInstall OpenSCAD and ZBar\n- Debian-based (e.g. Ubuntu, PopOS etc.):  `sudo apt-get update \u0026\u0026 sudo apt-get -y install openscad zbar-tools`\n- Arch-based (e.g. Manjaro):  `sudo pacman -Sy openscad zbar --noconfirm`\n- Windows: Download and run the respective installers for [OpenSCAD](https://openscad.org/downloads.html) and [ZBar](https://zbar.sourceforge.net/download.html)\n\nRun tests (Linux/MacOS): `./run_tests.py`\n\nRun tests (Windows): `py run_tests.py`\n\nIf it can't find your OpenSCAD or ZBar executable, you can use the `-s` and `-z` options respectively to specify a custom path.\n\n---\nCopyright (c) 2024 Darwin Schuppan and contributors. All rights reserved.\n\nThis work is licensed under the terms of the MIT license.  \nFor a copy, see \u003chttps://opensource.org/licenses/MIT\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxypwn%2Fscadqr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxypwn%2Fscadqr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxypwn%2Fscadqr/lists"}