Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added more resolution to exported gerber #3071

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
added more resolution to exported gerber
  • Loading branch information
nraynaud committed Apr 1, 2015
commit 4035d2364f6d3b31adb57ec7bca29879299feb8c
6 changes: 3 additions & 3 deletions src/svg/svg2gerber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int SVG2gerber::renderGerber(bool doubleSided, const QString & mainLayerName, Fo

// NOTE: this currently forces a 1 mil grid
// format coordinates to drop leading zeros with 2,3 digits
m_gerber_header += "%FSLAX23Y23*%\n";
m_gerber_header += "%FSLAX26Y26*%\n";

// set units to inches
m_gerber_header += "%MOIN*%\n";
Expand Down Expand Up @@ -843,12 +843,12 @@ void SVG2gerber::path2gerbCommandSlot(QChar command, bool relative, QList<double

int SVG2gerber::flipx(double x)
{
return qRound(x);
return qRound(x * 1000);
}

int SVG2gerber::flipy(double y)
{
return qRound(m_boardSize.height() - y);
return qRound((m_boardSize.height() - y) * 1000);
}

double SVG2gerber::flipxNoRound(double x)
Expand Down