aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/src/main.cpp
diff options
context:
space:
mode:
authorjaseg <git-bigdata-wsl-arch@jaseg.de>2021-03-19 20:32:13 +0100
committerjaseg <code@jaseg.net>2021-04-05 13:57:40 +0200
commit3288fb8345c07b4ca0deff82805d330f7d80bee7 (patch)
treeae8aed57df1457797ae4b31cce555191ee7d0fbc /svg-flatten/src/main.cpp
parent0be9f4b3bae743fe3ed9359daf54b54aa5f31f88 (diff)
downloadgerbolyze-3288fb8345c07b4ca0deff82805d330f7d80bee7.tar.gz
gerbolyze-3288fb8345c07b4ca0deff82805d330f7d80bee7.tar.bz2
gerbolyze-3288fb8345c07b4ca0deff82805d330f7d80bee7.zip
Add -f/--flip-gerber-polarity option
Diffstat (limited to 'svg-flatten/src/main.cpp')
-rw-r--r--svg-flatten/src/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/svg-flatten/src/main.cpp b/svg-flatten/src/main.cpp
index 0abe3d1..722b356 100644
--- a/svg-flatten/src/main.cpp
+++ b/svg-flatten/src/main.cpp
@@ -39,6 +39,9 @@ int main(int argc, char **argv) {
{"svg_dark_color", {"--dark-color"},
"SVG color to use for \"dark\" areas (default: black)",
1},
+ {"flip_gerber_polarity", {"-f", "--flip-gerber-polarity"},
+ "Flip polarity of all output gerber primitives for --format gerber.",
+ 0},
{"min_feature_size", {"-d", "--trace-space"},
"Minimum feature size of elements in vectorized graphics (trace/space) in mm. Default: 0.1mm.",
1},
@@ -189,7 +192,7 @@ int main(int argc, char **argv) {
} else if (fmt == "gbr" || fmt == "grb" || fmt == "gerber") {
double scale = args["scale"].as<double>(1.0);
cerr << "loading @scale=" << scale << endl;
- sink = new SimpleGerberOutput(*out_f, only_polys, 4, precision, scale);
+ sink = new SimpleGerberOutput(*out_f, only_polys, 4, precision, scale, {0,0}, args["flip_gerber_polarity"]);
} else if (fmt == "s-exp" || fmt == "sexp" || fmt == "kicad") {
if (!args["sexp_mod_name"]) {