| Crates.io | gerber2svg |
| lib.rs | gerber2svg |
| version | 0.3.0 |
| created_at | 2023-07-14 16:46:09.118304+00 |
| updated_at | 2025-08-20 16:53:20.233882+00 |
| description | Gerber2Svg is a library and utility, used to convert a Gerber (x2 or x3) file into an SVG file. |
| homepage | https://github.com/jnthbdn/rs-gerber2svg |
| repository | https://github.com/jnthbdn/rs-gerber2svg |
| max_upload_size | |
| id | 916479 |
| size | 48,765 |
Badges
Gerber2Svg is a library and utility written in Rust, used to convert a Gerber (x2 or x3) file into an SVG file.
The generated SVG file is not a single compound path but rather a collection of independent elements such as paths, rectangles, circles, and other primitives. The SVG output preserves the units defined in the source Gerber file. However, certain SVG viewers and editors (including Inkscape) may not interpret these units consistently. This behavior is usually related to DPI or scaling settings applied during file opening or import.
âšī¸ Useful links
- SVG Viewer: online editor/viewer that lets you open SVG files while preserving correct dimensions and units.
- Gerber Viewer: official online viewer for Gerber files.
â ī¸ This work is in progress, so please be kind đ. If you discover any bug or mistake, feel free to open an issue or submit a PR! Even typo fixes are welcome đ
Command to display help:
gerber2svg --help
| Short option | Long option | Required | Description |
|---|---|---|---|
| -i | --input |
Yes | The Gerber file |
| -s | --scale |
No | Scale the path and apertures [default: 1.0] |
| -o | --output |
No | The SVG output file (otherwise SVG will be print on standard output) |
| -c | --crop | No | Crop the SVG to remove unnecessary space |
| -d | --debug | No | Be verbose and print debug info |
| -h | --help | No | Prints help information |
| -V | --version | No | Prints version information |
| -v | --verbose | No | Be more verbose and show gerber comments |
With any option other than --input or -i, the SVG will be printed to standard output.
| Task | Status |
|---|---|
Upgrade gerber_parser |
đĸ |
Test with new gerber_parser |
đ |
| Support Arc segment | đ |
| Test arc | đ´ |
| Test scale | đ´ |
| Support Region Mode | đ´ |
| Support Quadrant Mode | đ´ |
| Support Exetnded Code | â |
| Support Obround aperture | đ´ |
| Support Polygon aperture | đ´ |
| Support Macro aperture | đ´ |
| Finish this list... | đ´ |