aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/include
diff options
context:
space:
mode:
authorjaseg <git-bigdata-wsl-arch@jaseg.de>2022-06-18 17:29:27 +0200
committerjaseg <git-bigdata-wsl-arch@jaseg.de>2022-06-18 17:29:27 +0200
commit14e9d7fbc2a935ec9c2e6eb9d68e8d250f9614d4 (patch)
tree9f86768b8ffc04a39db9b614aa4cc11956dda29b /svg-flatten/include
parent1622e9c9435d263c3c275718947b1030ad9b6b48 (diff)
downloadgerbolyze-14e9d7fbc2a935ec9c2e6eb9d68e8d250f9614d4.tar.gz
gerbolyze-14e9d7fbc2a935ec9c2e6eb9d68e8d250f9614d4.tar.bz2
gerbolyze-14e9d7fbc2a935ec9c2e6eb9d68e8d250f9614d4.zip
svg-flatten: add drill handling to outline mode
Diffstat (limited to 'svg-flatten/include')
-rw-r--r--svg-flatten/include/gerbolyze.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/svg-flatten/include/gerbolyze.hpp b/svg-flatten/include/gerbolyze.hpp
index 9311a98..cd837ba 100644
--- a/svg-flatten/include/gerbolyze.hpp
+++ b/svg-flatten/include/gerbolyze.hpp
@@ -50,6 +50,12 @@ namespace gerbolyze {
double m_size = 0.0;
};
+ class DrillToken {
+ public:
+ DrillToken(d2p center) : m_center(center) {}
+ d2p m_center;
+ };
+
class PolygonSink {
public:
virtual ~PolygonSink() {}
@@ -73,6 +79,7 @@ namespace gerbolyze {
virtual PolygonSink &operator<<(const LayerNameToken &) { return *this; };
virtual PolygonSink &operator<<(GerberPolarityToken pol) = 0;
virtual PolygonSink &operator<<(const ApertureToken &) { return *this; };
+ virtual PolygonSink &operator<<(const DrillToken &) { return *this; };
virtual void footer() {}
};
@@ -85,6 +92,8 @@ namespace gerbolyze {
virtual Flattener &operator<<(const Polygon &poly);
virtual Flattener &operator<<(const LayerNameToken &layer_name);
virtual Flattener &operator<<(GerberPolarityToken pol);
+ virtual Flattener &operator<<(const ApertureToken &tok);
+ virtual Flattener &operator<<(const DrillToken &tok);
virtual void footer();
private:
@@ -102,6 +111,7 @@ namespace gerbolyze {
virtual Dilater &operator<<(const Polygon &poly);
virtual Dilater &operator<<(const LayerNameToken &layer_name);
virtual Dilater &operator<<(GerberPolarityToken pol);
+ virtual Dilater &operator<<(const ApertureToken &ap);
virtual void footer();
private:
@@ -117,6 +127,8 @@ namespace gerbolyze {
virtual PolygonScaler &operator<<(const Polygon &poly);
virtual PolygonScaler &operator<<(const LayerNameToken &layer_name);
virtual PolygonScaler &operator<<(GerberPolarityToken pol);
+ virtual PolygonScaler &operator<<(const ApertureToken &tok);
+ virtual PolygonScaler &operator<<(const DrillToken &tok);
virtual void footer();
private:
@@ -181,6 +193,7 @@ namespace gerbolyze {
public:
double m_minimum_feature_size_mm = 0.1;
double curve_tolerance_mm;
+ double drill_test_polsby_popper_tolerance = 0.01;
VectorizerSelectorizer &m_vec_sel;
bool outline_mode = false;
bool flip_color_interpretation = false;
@@ -289,6 +302,7 @@ namespace gerbolyze {
virtual ~SimpleGerberOutput() {}
virtual SimpleGerberOutput &operator<<(const Polygon &poly);
virtual SimpleGerberOutput &operator<<(GerberPolarityToken pol);
+ virtual SimpleGerberOutput &operator<<(const DrillToken &tok);
virtual SimpleGerberOutput &operator<<(const ApertureToken &ap);
virtual void header_impl(d2p origin, d2p size);
virtual void footer_impl();
@@ -313,6 +327,7 @@ namespace gerbolyze {
virtual ~SimpleSVGOutput() {}
virtual SimpleSVGOutput &operator<<(const Polygon &poly);
virtual SimpleSVGOutput &operator<<(GerberPolarityToken pol);
+ virtual SimpleSVGOutput &operator<<(const DrillToken &tok);
virtual void header_impl(d2p origin, d2p size);
virtual void footer_impl();
@@ -330,6 +345,7 @@ namespace gerbolyze {
virtual ~KicadSexpOutput() {}
virtual KicadSexpOutput &operator<<(const Polygon &poly);
virtual KicadSexpOutput &operator<<(const LayerNameToken &layer_name);
+ virtual KicadSexpOutput &operator<<(const DrillToken &tok);
virtual KicadSexpOutput &operator<<(GerberPolarityToken pol);
virtual void header_impl(d2p origin, d2p size);
virtual void footer_impl();