{"id":41187927,"url":"https://github.com/ljanyst/ghostscad","last_synced_at":"2026-01-22T20:19:26.819Z","repository":{"id":48026306,"uuid":"388236826","full_name":"ljanyst/ghostscad","owner":"ljanyst","description":"GhostSCAD enables you to programatically build complex 3D models in Go and render them in OpenSCAD","archived":false,"fork":false,"pushed_at":"2025-06-21T09:05:02.000Z","size":2227,"stargazers_count":183,"open_issues_count":0,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-01-15T07:10:18.185Z","etag":null,"topics":["3d-printing","cad","go","golang","modelling"],"latest_commit_sha":null,"homepage":"https://jany.st/post/2022-04-04-ghostscad-marrying-openscad-and-golang.html","language":"Go","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/ljanyst.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-07-21T20:23:01.000Z","updated_at":"2025-12-29T21:15:39.000Z","dependencies_parsed_at":"2024-06-18T21:18:07.469Z","dependency_job_id":"0b61f547-0f15-47c8-8634-0651e68a7ebd","html_url":"https://github.com/ljanyst/ghostscad","commit_stats":null,"previous_names":["ljanyst/gostscad"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ljanyst/ghostscad","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ljanyst%2Fghostscad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ljanyst%2Fghostscad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ljanyst%2Fghostscad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ljanyst%2Fghostscad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ljanyst","download_url":"https://codeload.github.com/ljanyst/ghostscad/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ljanyst%2Fghostscad/sbom","scorecard":{"id":594845,"data":{"date":"2025-08-11","repo":{"name":"github.com/ljanyst/ghostscad","commit":"04cb15dea9b4d8060c4f9acad2b22bf040aa8c7d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 4/26 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2023-1572 / GHSA-qgc7-mgm3-q253","Warn: Project is vulnerable to: GO-2023-1990 / GHSA-j3p8-6mrq-6g7h","Warn: Project is vulnerable to: GO-2023-1989 / GHSA-x92r-3vfx-4cv3","Warn: Project is vulnerable to: GO-2024-2937 / GHSA-9phm-fm57-rhg8","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T22:53:56.792Z","repository_id":48026306,"created_at":"2025-08-20T22:53:56.792Z","updated_at":"2025-08-20T22:53:56.792Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28670366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T19:36:09.361Z","status":"ssl_error","status_checked_at":"2026-01-22T19:36:05.567Z","response_time":144,"last_error":"SSL_read: 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","cad","go","golang","modelling"],"created_at":"2026-01-22T20:19:26.740Z","updated_at":"2026-01-22T20:19:26.798Z","avatar_url":"https://github.com/ljanyst.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nGhostSCAD\n=========\n\nGhostSCAD is a piece of software that makes it easy to create CAD models using\n[Go][golang] and compile them to the [OpenSCAD][openscad] language. It allows\nyou to use the full power of a real programming language and use the rendering\ncapabilities of OpenSCAD.\n\nIt requires GO 1.17.\n\n![Screenshot](screenshot.png)\n\nSee the blog post explaining the motivations [here][bp] and a real-life example\n[here][rack].\n\nExample\n-------\n\nGhostSCAD aims to minimize the boilerplate but, since it uses a general purpose\nprogramming language, there is still some. First, you need to create a Go module\nfor your project and add GhostSCAD to it:\n\n    mkdir design; cd design\n    go mod init example.com/design\n    go get github.com/ljanyst/ghostscad\n\nHere's an example rendering a sphere of radius 10 and producing the appropriate\nOpenSCAD model in the `main.scad` file:\n\n```golang\npackage main\n\nimport (\n\t. \"github.com/ljanyst/ghostscad/primitive\"\n\t\"github.com/ljanyst/ghostscad/sys\"\n)\n\nfunc main() {\n\tsys.Initialize()\n\tsys.RenderOne(NewSphere(10))\n}\n```\n\nYou can generate such a minimal program by running:\n\n    go run github.com/ljanyst/ghostscad/util/stub_generator -file-name blah.go\n\nHere's a slightly more elaborate example:\n\n```golang\npackage main\n\nimport (\n\t\"github.com/ljanyst/ghostscad/lib/shapes\"\n\t\"github.com/ljanyst/ghostscad/sys\"\n\n\t. \"github.com/ljanyst/ghostscad/primitive\"\n)\n\nfunc main() {\n\tsys.Initialize()\n\tsector := shapes.NewSector(20, 45, 135).SetFn(72).Build()\n\tarc := shapes.NewArc(25, 45, 290).SetWidth(2).SetFn(72).Build()\n\tsys.RenderMultiple([]sys.Shape{\n\t\t{\"sector\", sector, sys.None},\n\t\t{\"arc\", arc, sys.None},\n\t\t{\"sector-and-arc\", NewList(sector, arc), sys.Default},\n\t})\n}\n```\n\nIt imports the complex shape library provided with GhostSCAD and renders\nmultiple shapes. The parameter to `sys.RenderMultiple` is a slice of Shape\nobject. The default shape is the one being rendered to `sector-and-arc.scad`\nunless the program is instructed otherwise via commandline parameters. You can\nlist the available shapes:\n\n    ]==\u003e go build\n    ]==\u003e ./sector-and-arc -list-shapes\n    sector\n    arc\n    sector-and-arc (default)\n\nYou can render the one you like:\n\n    ]==\u003e ./sector-and-arc -shape arc\n    ]==\u003e ls arc.scad\n    arc.scad\n\nYou can also generate the STL file directly (if it were a 3D shape) by supplying\nthe `-stl` parameter. Use the familiar `-help` to see all the available\nparameters.\n\nThere's a whole bunch of other examples in this code repository. The author\nleaves it as an exercise to the reader to find them. :)\n\nRendering Automation\n--------------------\n\nOne of the cool features of OpenSCAD is automatic re-rendering triggered by\nchanges to the underlying SCAD files. Since GhostSCAD leverages the Go\nprogramming language, it also makes sense to use it in a fully-fledged code\neditor. Here's an Elisp function to compile and run the current go buffer in\n[Emacs][emacs]:\n\n```elisp\n(defun go-run-this-file ()\n  \"go run\"\n  (interactive)\n  (save-buffer)\n  (shell-command (format \"go run %s\" (buffer-file-name))))\n```\n\nYou can then bind it to a key combination in your `go-mode` hook like this:\n\n```elisp\n(local-set-key (kbd \"C-c C-r\") 'go-run-this-file)\n```\n\nAfter you set this up, hitting \"CTRL-C CTRL-R\" compbination runs the code in the\ncurrent go buffer and overwrites the `main.scad` file with the most recent\nversion of your model. If you have OpenSCAD rendering this file, it will redraw\nyour model automagically.\n\nHappy hacking!\n\n[golang]: https://golang.org/\n[openscad]: https://openscad.org/\n[emacs]: https://www.gnu.org/software/emacs/\n[bp]: https://jany.st/post/2022-04-04-ghostscad-marrying-openscad-and-golang.html\n[rack]: https://github.com/ljanyst/tv-table-rack\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fljanyst%2Fghostscad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fljanyst%2Fghostscad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fljanyst%2Fghostscad/lists"}