{"id":13816489,"url":"https://github.com/sameer/svg2gcode","last_synced_at":"2026-03-04T06:10:14.730Z","repository":{"id":41039781,"uuid":"183149070","full_name":"sameer/svg2gcode","owner":"sameer","description":"Convert vector graphics to g-code for pen plotters, laser engravers, and other CNC machines","archived":false,"fork":false,"pushed_at":"2026-02-22T21:09:56.000Z","size":16823,"stargazers_count":386,"open_issues_count":20,"forks_count":72,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-02-23T00:54:50.469Z","etag":null,"topics":["3d-printer","3d-printing","cnc","engraver","g-code","gcode","grbl","inkscape","laser-cutting","pen-plotter","plotter","printer","prusa-mini","rust","svg","svg2gcode","webassembly"],"latest_commit_sha":null,"homepage":"https://sameer.github.io/svg2gcode","language":"G-code","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/sameer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["sameer"]}},"created_at":"2019-04-24T04:38:12.000Z","updated_at":"2026-02-22T21:08:04.000Z","dependencies_parsed_at":"2024-03-08T20:14:29.886Z","dependency_job_id":"891d5195-d54b-4f03-96d2-0c4e4e2ac0ef","html_url":"https://github.com/sameer/svg2gcode","commit_stats":{"total_commits":166,"total_committers":8,"mean_commits":20.75,"dds":0.1506024096385542,"last_synced_commit":"2322bc14bc81aa66504c1f743d54494951ee28b9"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/sameer/svg2gcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer%2Fsvg2gcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer%2Fsvg2gcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer%2Fsvg2gcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer%2Fsvg2gcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sameer","download_url":"https://codeload.github.com/sameer/svg2gcode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer%2Fsvg2gcode/sbom","scorecard":{"id":797351,"data":{"date":"2025-08-11","repo":{"name":"github.com/sameer/svg2gcode","commit":"a422637462e7b651ffe1a28caa57e721217fe2c1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Code-Review","score":1,"reason":"Found 3/28 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":"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":3,"reason":"3 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/cli.yml:1","Warn: no topLevel permission defined: .github/workflows/lib.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/web-deploy.yml:1","Warn: no topLevel permission defined: .github/workflows/web.yml:1","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/cli.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/cli.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/cli.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/cli.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/cli.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/cli.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lib.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/lib.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lib.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/lib.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lib.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/lib.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lib.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/lib.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lib.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/lib.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lib.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/lib.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/web-deploy.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/web-deploy.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/web-deploy.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/web-deploy.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/web-deploy.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/web-deploy.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/web-deploy.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/web-deploy.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/web-deploy.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/web-deploy.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/web.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/web.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/web.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/web.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/web.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/sameer/svg2gcode/web.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  13 third-party GitHubAction dependencies pinned"],"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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact cli-v0.0.17 not signed: https://api.github.com/repos/sameer/svg2gcode/releases/174037761","Warn: release artifact cli-v0.0.14 not signed: https://api.github.com/repos/sameer/svg2gcode/releases/168822788","Warn: release artifact cli-v0.0.12 not signed: https://api.github.com/repos/sameer/svg2gcode/releases/150140648","Warn: release artifact cli-v0.0.11 not signed: https://api.github.com/repos/sameer/svg2gcode/releases/150138857","Warn: release artifact cli-v0.0.10 not signed: https://api.github.com/repos/sameer/svg2gcode/releases/150062219","Warn: release artifact cli-v0.0.17 does not have provenance: https://api.github.com/repos/sameer/svg2gcode/releases/174037761","Warn: release artifact cli-v0.0.14 does not have provenance: https://api.github.com/repos/sameer/svg2gcode/releases/168822788","Warn: release artifact cli-v0.0.12 does not have provenance: https://api.github.com/repos/sameer/svg2gcode/releases/150140648","Warn: release artifact cli-v0.0.11 does not have provenance: https://api.github.com/repos/sameer/svg2gcode/releases/150138857","Warn: release artifact cli-v0.0.10 does not have provenance: https://api.github.com/repos/sameer/svg2gcode/releases/150062219"],"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 'main'"],"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 5 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":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: RUSTSEC-2024-0436","Warn: Project is vulnerable to: RUSTSEC-2024-0370"],"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-23T09:23:39.964Z","repository_id":41039781,"created_at":"2025-08-23T09:23:39.964Z","updated_at":"2025-08-23T09:23:39.964Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30073840,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T05:31:57.858Z","status":"ssl_error","status_checked_at":"2026-03-04T05:31:38.462Z","response_time":59,"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-printer","3d-printing","cnc","engraver","g-code","gcode","grbl","inkscape","laser-cutting","pen-plotter","plotter","printer","prusa-mini","rust","svg","svg2gcode","webassembly"],"created_at":"2024-08-04T05:00:43.153Z","updated_at":"2026-03-04T06:10:14.721Z","avatar_url":"https://github.com/sameer.png","language":"G-code","readme":"# svg2gcode\n\n[![Build, test, and publish coverage for svg2gcode](https://github.com/sameer/svg2gcode/actions/workflows/lib.yml/badge.svg)](https://github.com/sameer/svg2gcode/actions/workflows/lib.yml)\n\n[![Build svg2gcode-cli](https://github.com/sameer/svg2gcode/actions/workflows/cli.yml/badge.svg)](https://github.com/sameer/svg2gcode/actions/workflows/cli.yml)\n\n[![Build svg2gcode-web](https://github.com/sameer/svg2gcode/actions/workflows/web.yml/badge.svg)](https://github.com/sameer/svg2gcode/actions/workflows/web.yml)\n[![Deploy svg2gcode-web](https://github.com/sameer/svg2gcode/actions/workflows/web-deploy.yml/badge.svg)](https://github.com/sameer/svg2gcode/actions/workflows/web-deploy.yml)\n\n[![codecov](https://codecov.io/gh/sameer/svg2gcode/branch/master/graph/badge.svg)](https://codecov.io/gh/sameer/svg2gcode)\n\nConvert vector graphics to g-code for pen plotters, laser engravers, and other CNC machines\n\n## Usage\n\n### Web interface\n\nCheck it out at https://sameer.github.io/svg2gcode. Just select an SVG and click generate!\n\n![SVG selected on web interface](https://user-images.githubusercontent.com/11097096/129305765-f78da85d-cf4f-4286-a97c-7124a716b5fa.png)\n\n### Command line interface (CLI)\n\n#### Install\n\n```sh\ncargo install svg2gcode-cli\n```\n\n#### Usage\n```\nArguments:\n  [FILE]\n          A file path to an SVG, else reads from stdin\n\nOptions:\n      --tolerance \u003cTOLERANCE\u003e\n          Curve interpolation tolerance (mm)\n\n      --feedrate \u003cFEEDRATE\u003e\n          Machine feed rate (mm/min)\n\n      --dpi \u003cDPI\u003e\n          Dots per Inch (DPI) Used for scaling visual units (pixels, points, picas, etc.)\n\n      --on \u003cTOOL_ON_SEQUENCE\u003e\n          G-Code for turning on the tool\n\n      --off \u003cTOOL_OFF_SEQUENCE\u003e\n          G-Code for turning off the tool\n\n      --begin \u003cBEGIN_SEQUENCE\u003e\n          G-Code for initializing the machine at the beginning of the program\n\n      --end \u003cEND_SEQUENCE\u003e\n          G-Code for stopping/idling the machine at the end of the program\n\n  -o, --out \u003cOUT\u003e\n          Output file path (overwrites old files), else writes to stdout\n\n      --settings \u003cSETTINGS\u003e\n          Provide settings from a JSON file. Overrides command-line arguments\n\n      --export \u003cEXPORT\u003e\n          Export current settings to a JSON file instead of converting.\n          \n          Use `-` to export to standard out.\n\n      --origin \u003cORIGIN\u003e\n          Coordinates for the bottom left corner of the machine\n\n      --dimensions \u003cDIMENSIONS\u003e\n          Override the width and height of the SVG (i.e. 210mm,297mm)\n          \n          Useful when the SVG does not specify these (see https://github.com/sameer/svg2gcode/pull/16)\n          \n          Passing \"210mm,\" or \",297mm\" calculates the missing dimension to conform to the viewBox aspect ratio.\n\n      --circular-interpolation \u003cCIRCULAR_INTERPOLATION\u003e\n          Whether to use circular arcs when generating g-code\n          \n          Please check if your machine supports G2/G3 commands before enabling this.\n          \n          [possible values: true, false]\n\n      --line-numbers \u003cLINE_NUMBERS\u003e\n          Include line numbers at the beginning of each line\n          \n          Useful for debugging/streaming g-code\n          \n          [possible values: true, false]\n\n      --checksums \u003cCHECKSUMS\u003e\n          Include checksums at the end of each line\n          \n          Useful for streaming g-code\n          \n          [possible values: true, false]\n\n      --newline-before-comment \u003cNEWLINE_BEFORE_COMMENT\u003e\n          Add a newline character before each comment\n          \n          Workaround for parsers that don't accept comments on the same line\n          \n          [possible values: true, false]\n\n  -h, --help\n          Print help (see a summary with '-h')\n\n  -V, --version\n          Print version\n```\n\n#### Example\n\n```sh\nsvg2gcode-cli examples/Vanderbilt_Commodores_logo.svg --off 'M4' --on 'M5' -o out.gcode\n```\n\n\nTo convert curves to G02/G03 Gcode commands, use flag `--circular-interpolation true`.\n\n![Vanderbilt Commodores Logo](examples/Vanderbilt_Commodores_logo.svg)\n\n#### Output, rendered at [https://ncviewer.com](https://ncviewer.com)\n\n```sh\ncat out.gcode\n```\n\n![Vanderbilt Commodores Logo Gcode](examples/Vanderbilt_Commodores_logo_gcode.png)\n\n### Library\n\nThe core functionality of this tool is available as the [svg2gcode crate](https://crates.io/crates/svg2gcode).\n\n## Blog Posts\n\nThese go into greater detail on the tool's origins, implementation details, and planned features.\n\n- https://purisa.me/blog/pen-plotter/\n- https://purisa.me/blog/svg2gcode-progress/\n\n## FAQ / Interesting details\n\n- Use a 3D printer for plotting: (thanks [@jeevank](https://github.com/jeevank) for sharing this) https://medium.com/@urish/how-to-turn-your-3d-printer-into-a-plotter-in-one-hour-d6fe14559f1a\n\n- Convert a PDF to GCode: follow [this guide using Inkscape to convert a PDF to an SVG](https://en.wikipedia.org/wiki/Wikipedia:Graphics_Lab/Resources/PDF_conversion_to_SVG#Conversion_with_Inkscape), then use it with svg2gcode\n\n- Are shapes, fill patterns supported? No, but you can convert them to paths in Inkscape with `Object to Path`. See [#15](https://github.com/sameer/svg2gcode/issues/15) for more discussion.\n- Are stroke patterns supported? No, but you can convert them into paths in Inkscape with `Stroke to Path`.\n\n## Reference Documents\n\n- [W3 SVG2 Specification](https://www.w3.org/TR/SVG/Overview.html)\n- [CSS absolute lengths](https://www.w3.org/TR/css-values/#absolute-lengths)\n- [CSS font-relative lengths](https://www.w3.org/TR/css-values/#font-relative-lengths)\n- [CSS compatible units](https://www.w3.org/TR/css-values/#compat)\n- [RepRap G-code](https://reprap.org/wiki/G-code)\n- [G-Code and M-Code Reference List for Milling](https://www.cnccookbook.com/g-code-m-code-reference-list-cnc-mills/)\n","funding_links":["https://github.com/sponsors/sameer"],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameer%2Fsvg2gcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsameer%2Fsvg2gcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameer%2Fsvg2gcode/lists"}