feat: add optional Inkscape-layer SVG export#279
Conversation
|
Hello @5shekel Thank you for you pull request. Seems like a useful thing. Tested the branch — builds clean, no regressions (89/100 pass, same 11 failures as A few things worth addressing: 1. Nested 2. Partial output on error 3. Silent background skip Final note |
| static void | ||
| exportimage_append_svg_background (GString *svgOut, gerbv_project_t *gerbvProject) { | ||
| GdkColor *bg = &gerbvProject->background; | ||
|
|
There was a problem hiding this comment.
Please elaborate on why this colors are changed. And also please use {} even if it is an one-liner on the if, for, while, etc.
| if (svgText == NULL) | ||
| return NULL; | ||
|
|
||
| svgOpen = strstr (svgText, "<svg"); |
There was a problem hiding this comment.
See comment on wrapping inner block <svg>...</svg>.
spe-ciellt
left a comment
There was a problem hiding this comment.
I tried to do a review. This is really the first time using the github interface, so please bear with me. Else I just let the comment I wrote speak for itself.
Add SVG export options for CLI and GUI to emit visible Gerber files as Inkscape layer groups, and align the output structure for broader SVG editor compatibility. Prevent partial layered SVG files on export failures and document legacy white/black background handling behavior.
f5ee365 to
8da9640
Compare
|
Re-checked after the two follow-up commits ( 1. Nested 2. Partial output file on error — Fixed 3. Undocumented background skip — Fixed One minor item still open: Tested the updated branch against
Otherwise looks good — backward-compatible, feature works correctly. |
note: this is generated code, prompt as follows
given the quality of this project, and lack of deep understanding from my side i cannot say this is valid PR.
it does work on my tests and is a feature i was craving for ages.
might be of interest to others.
Add a new SVG export option that preserves visible Gerber layers as Inkscape layers so exported artwork remains editable by layer. Wire the option into both CLI and GUI export flows and document usage in help/man text.