aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/src/out_sexp.cpp
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-08-18 17:29:57 +0200
committerjaseg <git@jaseg.de>2021-08-18 17:29:57 +0200
commitaaade1b168b3780a9c2ed1387165086ede33bc54 (patch)
treef379dc1568a6c08e4ccfa68c2572773183dfe5d1 /svg-flatten/src/out_sexp.cpp
parentaad0ae0215719faaf74445d5833921cb07982012 (diff)
downloadgerbolyze-aaade1b168b3780a9c2ed1387165086ede33bc54.tar.gz
gerbolyze-aaade1b168b3780a9c2ed1387165086ede33bc54.tar.bz2
gerbolyze-aaade1b168b3780a9c2ed1387165086ede33bc54.zip
Collect various rendering params into new RenderContext object
Diffstat (limited to 'svg-flatten/src/out_sexp.cpp')
-rw-r--r--svg-flatten/src/out_sexp.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/svg-flatten/src/out_sexp.cpp b/svg-flatten/src/out_sexp.cpp
index 9a04416..1a7f1d0 100644
--- a/svg-flatten/src/out_sexp.cpp
+++ b/svg-flatten/src/out_sexp.cpp
@@ -29,6 +29,40 @@ using namespace gerbolyze;
using namespace std;
+/* Note: These values come from KiCAD's common/lset.cpp. KiCAD uses *multiple different names* for the same layer in
+ * different places, and not all of them are stable. Sometimes, these names change without notice. If this list isn't
+ * up-to-date, it's not my fault. Still, please file an issue. */
+const std::vector<std::string> gerbolyze::kicad_default_layers ({
+ /* Copper */
+ "F.Cu",
+ "In1.Cu", "In2.Cu", "In3.Cu", "In4.Cu", "In5.Cu", "In6.Cu", "In7.Cu", "In8.Cu",
+ "In9.Cu", "In10.Cu", "In11.Cu", "In12.Cu", "In13.Cu", "In14.Cu", "In15.Cu", "In16.Cu",
+ "In17.Cu", "In18.Cu", "In19.Cu", "In20.Cu", "In21.Cu", "In22.Cu", "In23.Cu",
+ "In24.Cu", "In25.Cu", "In26.Cu", "In27.Cu", "In28.Cu", "In29.Cu", "In30.Cu",
+ "B.Cu",
+
+ /* Technical layers */
+ "B.Adhes", "F.Adhes",
+ "B.Paste", "F.Paste",
+ "B.SilkS", "F.SilkS",
+ "B.Mask", "F.Mask",
+
+ /* User layers */
+ "Dwgs.User",
+ "Cmts.User",
+ "Eco1.User", "Eco2.User",
+ "Edge.Cuts",
+ "Margin",
+
+ /* Footprint layers */
+ "F.CrtYd", "B.CrtYd",
+ "F.Fab", "B.Fab",
+
+ /* Layers for user scripting etc. */
+ "User.1", "User.2", "User.3", "User.4", "User.5", "User.6", "User.7", "User.8", "User.9",
+ });
+
+
KicadSexpOutput::KicadSexpOutput(ostream &out, string mod_name, string layer, bool only_polys, string ref_text, string val_text, d2p ref_pos, d2p val_pos)
: StreamPolygonSink(out, only_polys),
m_mod_name(mod_name),
@@ -105,4 +139,3 @@ void KicadSexpOutput::footer_impl() {
m_out << ")" << endl;
}
-