aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/include/gerbolyze.hpp
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-04-25 14:41:06 +0200
committerjaseg <git@jaseg.de>2021-04-25 14:41:06 +0200
commit1d6d4e4f14b395b7a16802ac909687dfa2b447e4 (patch)
tree3c20d6feb569d1011ba9ba4164f1d5d04e9fa5fa /svg-flatten/include/gerbolyze.hpp
parent046e827be1bec795ab5baf064744be3dc011f0e9 (diff)
downloadgerbolyze-1d6d4e4f14b395b7a16802ac909687dfa2b447e4.tar.gz
gerbolyze-1d6d4e4f14b395b7a16802ac909687dfa2b447e4.tar.bz2
gerbolyze-1d6d4e4f14b395b7a16802ac909687dfa2b447e4.zip
svg-flatten: Add support for line thickness to board outline exporter
Diffstat (limited to 'svg-flatten/include/gerbolyze.hpp')
-rw-r--r--svg-flatten/include/gerbolyze.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/svg-flatten/include/gerbolyze.hpp b/svg-flatten/include/gerbolyze.hpp
index 0b4f03e..a30d7eb 100644
--- a/svg-flatten/include/gerbolyze.hpp
+++ b/svg-flatten/include/gerbolyze.hpp
@@ -44,6 +44,12 @@ namespace gerbolyze {
std::string m_name;
};
+ class ApertureToken {
+ public:
+ ApertureToken(double size=0.0) : m_size(size) {}
+ double m_size = 0.0;
+ };
+
class PolygonSink {
public:
virtual ~PolygonSink() {}
@@ -66,6 +72,7 @@ namespace gerbolyze {
};
virtual PolygonSink &operator<<(const LayerNameToken &) { return *this; };
virtual PolygonSink &operator<<(GerberPolarityToken pol) = 0;
+ virtual PolygonSink &operator<<(const ApertureToken &) { return *this; };
virtual void footer() {}
};
@@ -229,6 +236,7 @@ namespace gerbolyze {
virtual ~SimpleGerberOutput() {}
virtual SimpleGerberOutput &operator<<(const Polygon &poly);
virtual SimpleGerberOutput &operator<<(GerberPolarityToken pol);
+ virtual SimpleGerberOutput &operator<<(const ApertureToken &ap);
virtual void header_impl(d2p origin, d2p size);
virtual void footer_impl();
@@ -242,6 +250,8 @@ namespace gerbolyze {
double m_scale;
bool m_flip_pol;
bool m_outline_mode;
+ double m_current_aperture;
+ unsigned int m_aperture_num;
};
class SimpleSVGOutput : public StreamPolygonSink {