aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svg-flatten/src/out_gerber.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/svg-flatten/src/out_gerber.cpp b/svg-flatten/src/out_gerber.cpp
index 30518b1..4293d82 100644
--- a/svg-flatten/src/out_gerber.cpp
+++ b/svg-flatten/src/out_gerber.cpp
@@ -34,7 +34,7 @@ SimpleGerberOutput::SimpleGerberOutput(ostream &out, bool only_polys, int digits
m_offset(offset),
m_scale(scale),
m_flip_pol(flip_polarity),
- m_current_aperture(0.0),
+ m_current_aperture(0.05),
m_aperture_set(false),
m_macro_aperture(false),
m_aperture_num(10) /* See gerber standard */
@@ -63,11 +63,13 @@ void SimpleGerberOutput::header_impl(d2p origin, d2p size) {
}
SimpleGerberOutput& SimpleGerberOutput::operator<<(const ApertureToken &ap) {
- if (m_aperture_set && !m_macro_aperture && ap.m_size == m_current_aperture) {
+ cerr << ap.m_size << " / " << m_current_aperture << endl;
+ m_aperture_set = ap.m_has_aperture;
+
+ if (!m_macro_aperture && ap.m_size == m_current_aperture) {
return *this;
}
- m_aperture_set = ap.m_has_aperture;
m_macro_aperture = false;
if (m_aperture_set) {
@@ -78,6 +80,7 @@ SimpleGerberOutput& SimpleGerberOutput::operator<<(const ApertureToken &ap) {
m_out << "%ADD" << m_aperture_num << "C," << size << "*%" << endl;
m_out << "D" << m_aperture_num << "*" << endl;
}
+
return *this;
}