Skip to content

Commit d3f5ee2

Browse files
committed
Added "Plunge Rate" option
1 parent 9825d03 commit d3f5ee2

5 files changed

Lines changed: 33 additions & 5 deletions

File tree

src/aboutdialog.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ AboutDialog::AboutDialog(QWidget* parent)
3636
setAttribute(Qt::WA_DeleteOnClose);
3737

3838
setWindowTitle(tr("About ") + QApplication::applicationName());
39+
40+
_labelVersion->setText(tr("Version ") + QApplication::applicationVersion());
3941
}

src/aboutdialog.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
<item>
7272
<widget class="QLabel" name="_labelVersion">
7373
<property name="text">
74-
<string>Version 2.0</string>
74+
<string notr="true">VERSION PLACEHOLDER</string>
7575
</property>
7676
<property name="alignment">
7777
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
2929
QApplication application(argc, argv);
3030

3131
application.setApplicationName("StepCAM");
32-
application.setApplicationVersion("2.0");
32+
application.setApplicationVersion("2.1");
3333
application.setOrganizationName("Dmitry Lavygin");
3434

3535
QCommandLineParser parser;

src/mainwindow.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ void MainWindow::loadSettings()
204204
settings.beginGroup("Milling");
205205
_editMillingSpindleSpeed->setValue(settings.value("SpindleSpeed", 10000).toInt());
206206
_editMillingFeedRate->setValue(settings.value("Feed", 1).toInt());
207+
_editMillingPlungeRate->setValue(settings.value("Plunge", 1).toInt());
207208
_editMillingSafeZ->setValue(settings.value("SafeZ", 1.0).toDouble());
208209
_editMillingDepth->setValue(settings.value("Depth", 0.0).toDouble());
209210

@@ -254,6 +255,7 @@ void MainWindow::saveSettings()
254255
settings.beginGroup("Milling");
255256
settings.setValue("SpindleSpeed", _editMillingSpindleSpeed->value());
256257
settings.setValue("Feed", _editMillingFeedRate->value());
258+
settings.setValue("Plunge", _editMillingPlungeRate->value());
257259
settings.setValue("SafeZ", _editMillingSafeZ->value());
258260
settings.setValue("Depth", _editMillingDepth->value());
259261
settings.setValue("Prologue", _editSettingsMillingPrologue->toPlainText());
@@ -695,13 +697,13 @@ void MainWindow::generateMilling()
695697
_editProgram->append(_editSettingsMillingPrologue->toPlainText());
696698

697699
QString feedRate = QString::number(_editMillingFeedRate->value());
700+
QString plungeRate = QString::number(_editMillingPlungeRate->value());
698701
QString spindleSpeed = QString::number(_editMillingSpindleSpeed->value());
699702

700703
QString safeZ = Utilities::doubleToString(_editMillingSafeZ->value());
701704
QString depth = Utilities::doubleToString(_editMillingDepth->value());
702705

703706
_editProgram->append(QString("G0 Z").append(safeZ));
704-
_editProgram->append(QString("G1 F").append(feedRate));
705707
_editProgram->append(QString("M3 S").append(spindleSpeed));
706708

707709
foreach (AbstractCurve curve, _parser->curves())
@@ -717,7 +719,8 @@ void MainWindow::generateMilling()
717719
if (i == 0)
718720
{
719721
_editProgram->append(QString("G0 X%1 Y%2").arg(x, y));
720-
_editProgram->append(QString("G1 Z").append(depth));
722+
_editProgram->append(QString("G1 Z%1 F%2").arg(depth, plungeRate));
723+
_editProgram->append(QString("G1 F").append(feedRate));
721724
}
722725
else
723726
{

src/mainwindow.ui

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ M30
381381
<x>0</x>
382382
<y>0</y>
383383
<width>183</width>
384-
<height>198</height>
384+
<height>243</height>
385385
</rect>
386386
</property>
387387
<layout class="QVBoxLayout" name="verticalLayout_7">
@@ -431,6 +431,29 @@ M30
431431
</property>
432432
</widget>
433433
</item>
434+
<item>
435+
<widget class="QLabel" name="_labelMillingPlungeRate">
436+
<property name="text">
437+
<string>Plunge Rate:</string>
438+
</property>
439+
</widget>
440+
</item>
441+
<item>
442+
<widget class="QSpinBox" name="_editMillingPlungeRate">
443+
<property name="focusPolicy">
444+
<enum>Qt::StrongFocus</enum>
445+
</property>
446+
<property name="suffix">
447+
<string> mm/min</string>
448+
</property>
449+
<property name="minimum">
450+
<number>0</number>
451+
</property>
452+
<property name="maximum">
453+
<number>1000000</number>
454+
</property>
455+
</widget>
456+
</item>
434457
<item>
435458
<widget class="QLabel" name="_labelMillingSafeZ">
436459
<property name="text">

0 commit comments

Comments
 (0)