aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-06-10 00:25:28 +0200
committerjaseg <git@jaseg.de>2022-06-10 00:25:28 +0200
commit2e2a7e6a41c8825f6846b07e969bf25b8e437180 (patch)
tree3b0cdabce68c21a3210724c747268ad5ccaad87c /svg-flatten
parentb5b16535c938a0fb8a200127f900209a29940980 (diff)
downloadgerbolyze-2e2a7e6a41c8825f6846b07e969bf25b8e437180.tar.gz
gerbolyze-2e2a7e6a41c8825f6846b07e969bf25b8e437180.tar.bz2
gerbolyze-2e2a7e6a41c8825f6846b07e969bf25b8e437180.zip
Fix dilation script processing
Diffstat (limited to 'svg-flatten')
-rw-r--r--svg-flatten/src/out_gerber.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/svg-flatten/src/out_gerber.cpp b/svg-flatten/src/out_gerber.cpp
index f842e15..b1c5875 100644
--- a/svg-flatten/src/out_gerber.cpp
+++ b/svg-flatten/src/out_gerber.cpp
@@ -44,10 +44,10 @@ SimpleGerberOutput::SimpleGerberOutput(ostream &out, bool only_polys, int digits
}
void SimpleGerberOutput::header_impl(d2p origin, d2p size) {
- m_offset[0] += origin[0] * m_scale;
- m_offset[1] += origin[1] * m_scale;
- m_width = (size[0] - origin[0]) * m_scale;
- m_height = (size[1] - origin[1]) * m_scale;
+ m_offset[0] += 0;
+ m_offset[1] += 2*origin[1] * m_scale; /* FIXME why 2x ? */
+ m_width = size[0] * m_scale;
+ m_height = size[1] * m_scale;
if (pow(10, m_digits_int-1) < max(m_width, m_height)) {
cerr << "Warning: Input has bounding box too large for " << m_digits_int << "." << m_digits_frac << " gerber resolution!" << endl;