svg-flatten: Fix pattern aperture macro export

wip
jaseg 2022-06-24 13:04:25 +02:00
rodzic e76d257220
commit e845888580
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -156,7 +156,10 @@ SimpleGerberOutput &SimpleGerberOutput::operator<<(const PatternToken &tok) {
for (auto &pt : pair.first) {
m_out << "," << pt[0] << "," << pt[1];
}
m_out << "," << pair.first.back()[0] << "," << pair.first.back()[1] << "*" << endl;
/* We internally represent closed polys as (a - b - c - d), while Gerber aperture macros require the first and
* last vertex to be the same as in (a - b - c - d - a).
*/
m_out << "," << pair.first[0][0] << "," << pair.first[0][1] << "*" << endl;
}
m_out << "%" << endl;

Wyświetl plik

@ -622,7 +622,7 @@ gerbolyze::RenderContext::RenderContext(RenderContext &parent, PolygonSink &sink
m_settings(parent.settings()),
m_mat(parent.mat()),
m_root(false),
m_included(false),
m_included(true),
m_sel(parent.sel()),
m_clip(clip)
{