From 2e2a7e6a41c8825f6846b07e969bf25b8e437180 Mon Sep 17 00:00:00 2001 From: jaseg Date: Fri, 10 Jun 2022 00:25:28 +0200 Subject: Fix dilation script processing --- svg-flatten/src/out_gerber.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'svg-flatten/src') 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; -- cgit