MCPcopy Create free account
hub / github.com/XRay3D/GERBER_X3 / closeStepRepeat

Method closeStepRepeat

file_plugins/gerber/gbrparser.cpp:779–799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

777}
778
779void Parser::closeStepRepeat()
780{
781 addPath();
782 for (int y = 0; y < m_stepRepeat.y; ++y) {
783 for (int x = 0; x < m_stepRepeat.x; ++x) {
784 const IntPoint pt(static_cast<cInt>(m_stepRepeat.i * x), static_cast<cInt>(m_stepRepeat.j * y));
785 for (GraphicObject& go : m_stepRepeat.storage) {
786 Paths paths(go.paths());
787 for (Path& path : paths)
788 TranslatePath(path, pt);
789 Path path(go.path());
790 TranslatePath(path, pt);
791 auto state = go.state();
792 state.setCurPos({ state.curPos().X + pt.X, state.curPos().Y + pt.Y });
793 file->m_graphicObjects.push_back(GraphicObject(m_goId++, state, paths, go.gFile(), path));
794 }
795 }
796 }
797 m_stepRepeat.reset();
798 m_abSrIdStack.pop();
799}
800
801ApBlock* Parser::apBlock(int id) { return static_cast<ApBlock*>(file->m_apertures[id].get()); }
802

Callers

nothing calls this directly

Calls 11

pathMethod · 0.80
gFileMethod · 0.80
popMethod · 0.80
GraphicObjectClass · 0.70
TranslatePathFunction · 0.50
pathsMethod · 0.45
stateMethod · 0.45
setCurPosMethod · 0.45
curPosMethod · 0.45
push_backMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected