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

Method initSave

GGEasy/gcode/gcfile.cpp:446–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444}
445
446void File::initSave()
447{
448 m_lines.clear();
449
450 for (bool& fl : formatFlags)
451 fl = false;
452
453 const QString format(m_gcp.getTool().type() == Tool::Laser ? Settings::formatLaser() : Settings::formatMilling());
454 for (size_t i = 0; i < cmdList.size(); ++i) {
455 const int index = format.indexOf(cmdList[i], 0, Qt::CaseInsensitive);
456 if (index != -1) {
457 formatFlags[i + AlwaysG] = format[index + 1] == '+';
458 if ((index + 2) < format.size())
459 formatFlags[i + SpaceG] = format[index + 2] == ' ';
460 }
461 }
462
463 for (QString& str : lastValues)
464 str.clear();
465
466 setFeedRate(m_gcp.getTool().feedRate());
467 setPlungeRate(m_gcp.getTool().plungeRate());
468 setSpindleSpeed(m_gcp.getTool().spindleSpeed());
469 setToolType(m_gcp.getTool().type());
470}
471
472void File::genGcodeAndTile()
473{

Callers 1

Calls 8

getToolMethod · 0.80
sizeMethod · 0.80
indexOfMethod · 0.80
clearMethod · 0.45
typeMethod · 0.45
feedRateMethod · 0.45
plungeRateMethod · 0.45
spindleSpeedMethod · 0.45

Tested by

no test coverage detected