MIT License

项目介绍

sameer/svg2gcode 是一个托管在 GitHub 上的开源项目,主要使用 Rust 编写,采用 MIT License 许可证,目前获得 447 个 Star、81 次 Fork。

仓库全名
sameer/svg2gcode
开源许可证
MIT License
Star 数
447
Fork 数
81
未关闭 Issue
20

README 摘要

svg2gcode Convert vector graphics to g-code for pen plotters, laser engravers, and other CNC machines Usage Web interface Check it out at https://sameer.github.io/svg2gcode. Select an SVG and click generate. Command line interface (CLI) Install Usage CLI Help Example To convert curves to G02/G03 Gcode commands, use the flag --circular-interpolation true. Rendered using NC Viewer: Library The core functionality of…

完整内容见 GitHub 原始 README 或本页 。

常见问题

svg2gcode 用什么语言开发?

主要使用 Rust 编写,采用 MIT License 许可证,目前有 447 个 Star。

svg2gcode 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 svg2gcode 的源码?

可以直接克隆仓库:git clone https://github.com/sameer/svg2gcode.git,默认分支为 main;安装与运行步骤见仓库 README。

svg2gcode 最近还在维护吗?

仓库最近一次更新为 3 周前,当前有 20 个未关闭 Issue;Star 数为 447,可作为社区活跃度的参考。

关于

Convert vector graphics to g-code for pen plotters, laser engravers, and other CNC machines

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

G-code
HTML
Rust
SCSS

Release

README

svg2gcode

Workspace crate checks Check svg2gcode-web Deploy svg2gcode-web

codecov

Convert vector graphics to g-code for pen plotters, laser engravers, and other CNC machines

Usage

Web interface

Check it out at https://sameer.github.io/svg2gcode. Select an SVG and click generate.

image

Command line interface (CLI)

Install
cargo install svg2gcode-cli
Usage
CLI Help
Arguments:
  [FILE]
          A file path to an SVG, else reads from stdin

Options:
      --tolerance <TOLERANCE>
          Curve interpolation tolerance (mm)

      --feedrate <FEEDRATE>
          Machine feed rate (mm/min)

      --dpi <DPI>
          Dots per Inch (DPI) Used for scaling visual units (pixels, points, picas, etc.)

      --on <TOOL_ON_SEQUENCE>
          G-Code for turning on the tool

      --off <TOOL_OFF_SEQUENCE>
          G-Code for turning off the tool

      --begin <BEGIN_SEQUENCE>
          G-Code for initializing the machine at the beginning of the program

      --end <END_SEQUENCE>
          G-Code for stopping/idling the machine at the end of the program

  -o, --out <OUT>
          Output file path (overwrites old files), else writes to stdout

      --settings <SETTINGS>
          Provide settings from a JSON file. Overrides command-line arguments

      --export <EXPORT>
          Export current settings to a JSON file instead of converting.
          
          Use `-` to export to standard out.

      --origin <ORIGIN>
          Coordinates for the bottom left corner of the machine

      --dimensions <DIMENSIONS>
          Override the width and height of the SVG (i.e. 210mm,297mm)
          
          Useful when the SVG does not specify these (see https://github.com/sameer/svg2gcode/pull/16)
          
          Passing "210mm," or ",297mm" calculates the missing dimension to conform to the viewBox aspect ratio.

      --circular-interpolation <CIRCULAR_INTERPOLATION>
          Whether to use circular arcs when generating g-code
          
          Please check if your machine supports G2/G3 commands before enabling this.
          
          [possible values: true, false]

      --line-numbers <LINE_NUMBERS>
          Include line numbers at the beginning of each line
          
          Useful for debugging/streaming g-code
          
          [possible values: true, false]

      --checksums <CHECKSUMS>
          Include checksums at the end of each line
          
          Useful for streaming g-code
          
          [possible values: true, false]

      --newline-before-comment <NEWLINE_BEFORE_COMMENT>
          Add a newline character before each comment
          
          Workaround for parsers that don't accept comments on the same line
          
          [possible values: true, false]

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version
Example
svg2gcode-cli examples/island.svg --off 'M4' --on 'M5' -o out.gcode

To convert curves to G02/G03 Gcode commands, use the flag --circular-interpolation true.

cat out.gcode

Rendered using NC Viewer: image

Library

The core functionality of this tool is available as the svg2gcode crate.

Blog Posts

These go into greater detail on the tool’s origins, implementation details, and planned features.

FAQ / Interesting details

Reference Documents

评论

暂无评论