Skip to content

Commit 88bb14a

Browse files
committed
Add tile-x, tile-y and replace cut-front/drill-front with cut-side/drill-side
1 parent 2bf1e1c commit 88bb14a

File tree

2 files changed

+150
-32
lines changed

2 files changed

+150
-32
lines changed

mainwindow.cpp

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ MainWindow::MainWindow(QWidget *parent) :
6363
args[ COMMONARGS ].insert("mirror-absolute", ui->mirrorabsoluteCheckBox);
6464
args[ COMMONARGS ].insert("svg", ui->svgLineEdit);
6565
args[ COMMONARGS ].insert("dpi", ui->dpiSpinBox);
66+
args[ COMMONARGS ].insert("tile-x", ui->tilexSpinBox);
67+
args[ COMMONARGS ].insert("tile-y", ui->tileySpinBox);
6668

6769
args[ MILLARGS ].insert("zwork", ui->zworkDoubleSpinBox);
6870
args[ MILLARGS ].insert("mill-feed", ui->millfeedSpinBox);
@@ -74,7 +76,7 @@ MainWindow::MainWindow(QWidget *parent) :
7476
args[ DRILLARGS ].insert("drill-feed", ui->drillfeedSpinBox);
7577
args[ DRILLARGS ].insert("drill-speed", ui->drillspeedSpinBox);
7678
args[ DRILLARGS ].insert("milldrill", ui->milldrillCheckBox);
77-
args[ DRILLARGS ].insert("drill-front", ui->drillfrontCheckBox);
79+
args[ DRILLARGS ].insert("drill-side", ui->drillsideComboBox);
7880
args[ DRILLARGS ].insert("onedrill", ui->onedrillCheckBox);
7981
args[ DRILLARGS ].insert("nog81", ui->nog81CheckBox);
8082

@@ -87,7 +89,7 @@ MainWindow::MainWindow(QWidget *parent) :
8789
args[ OUTLINEARGS ].insert("bridges", ui->bridgesDoubleSpinBox);
8890
args[ OUTLINEARGS ].insert("zbridges", ui->zbridgesDoubleSpinBox);
8991
args[ OUTLINEARGS ].insert("bridgesnum", ui->bridgesnumSpinBox);
90-
args[ OUTLINEARGS ].insert("cut-front", ui->cutfrontCheckBox);
92+
args[ OUTLINEARGS ].insert("cut-side", ui->cutsideComboBox);
9193
args[ OUTLINEARGS ].insert("fill-outline", ui->filloutlineCheckBox);
9294

9395
args[ AUTOLEVELLERARGS ].insert("al-front", ui->alfrontCheckBox);
@@ -519,6 +521,24 @@ bool MainWindow::loadConfFile(const QString filename)
519521
value = currentLine.right( currentLine.size() - equalPosition - 1 );
520522
value.chop(1); //Chop the last character ('/n')
521523

524+
if (key == "drill-front")
525+
{
526+
key = "drill-side";
527+
if(value == "1" || value.compare("true", Qt::CaseInsensitive) == 0)
528+
value = "front";
529+
else
530+
value = "back";
531+
}
532+
533+
if (key == "cut-front")
534+
{
535+
key = "cut-side";
536+
if(value == "1" || value.compare("true", Qt::CaseInsensitive) == 0)
537+
value = "front";
538+
else
539+
value = "back";
540+
}
541+
522542
result = false;
523543
for(int i = COMMONARGS; i <= AUTOLEVELLERARGS && !result; i++)
524544
{

mainwindow.ui

Lines changed: 128 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,66 @@
360360
</property>
361361
</widget>
362362
</item>
363+
<item row="12" column="1">
364+
<layout class="QHBoxLayout" name="tileHorizontalLayout">
365+
<item>
366+
<widget class="QLabel" name="tilexLabel">
367+
<property name="toolTip">
368+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;number of tiling columns&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
369+
</property>
370+
<property name="text">
371+
<string>x</string>
372+
</property>
373+
<property name="alignment">
374+
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
375+
</property>
376+
</widget>
377+
</item>
378+
<item>
379+
<widget class="QSpinBox" name="tilexSpinBox">
380+
<property name="toolTip">
381+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;number of tiling columns&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
382+
</property>
383+
<property name="minimum">
384+
<number>1</number>
385+
</property>
386+
</widget>
387+
</item>
388+
<item>
389+
<widget class="QLabel" name="tileyLabel">
390+
<property name="toolTip">
391+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;number of tiling rows&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
392+
</property>
393+
<property name="text">
394+
<string>y</string>
395+
</property>
396+
<property name="alignment">
397+
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
398+
</property>
399+
</widget>
400+
</item>
401+
<item>
402+
<widget class="QSpinBox" name="tileySpinBox">
403+
<property name="toolTip">
404+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;number of tiling rows&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
405+
</property>
406+
<property name="minimum">
407+
<number>1</number>
408+
</property>
409+
</widget>
410+
</item>
411+
</layout>
412+
</item>
413+
<item row="12" column="0">
414+
<widget class="QLabel" name="tileLabel">
415+
<property name="toolTip">
416+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;number of tiling rows/columns&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
417+
</property>
418+
<property name="text">
419+
<string>tile</string>
420+
</property>
421+
</widget>
422+
</item>
363423
</layout>
364424
</widget>
365425
</widget>
@@ -551,30 +611,27 @@
551611
<property name="verticalSpacing">
552612
<number>6</number>
553613
</property>
554-
<item row="0" column="0">
555-
<widget class="QLabel" name="zdrillLabel">
614+
<item row="6" column="0">
615+
<widget class="QCheckBox" name="nog81CheckBox">
556616
<property name="toolTip">
557-
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Z value down to which will be drilled&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
617+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;replace G81 with G0+G1. This option makes the gcode compatible with low-end cnc controllers (like grbl), but also makes it bigger and less clean&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
558618
</property>
559619
<property name="text">
560-
<string>zdrill</string>
620+
<string>nog81</string>
561621
</property>
562622
</widget>
563623
</item>
564-
<item row="4" column="0">
565-
<widget class="QCheckBox" name="drillfrontCheckBox">
624+
<item row="0" column="0">
625+
<widget class="QLabel" name="zdrillLabel">
566626
<property name="toolTip">
567-
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Use the coordinates of the front side for drilling instead of the coordinates of the back side&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
627+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Z value down to which will be drilled&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
568628
</property>
569629
<property name="text">
570-
<string>drill-front</string>
571-
</property>
572-
<property name="checked">
573-
<bool>true</bool>
630+
<string>zdrill</string>
574631
</property>
575632
</widget>
576633
</item>
577-
<item row="3" column="0">
634+
<item row="4" column="0">
578635
<widget class="QCheckBox" name="milldrillCheckBox">
579636
<property name="toolTip">
580637
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If milldrill is given, the milling head will be used to drill the holes in the PCB. Holes up to the size of the milling head will be drilled regularly (possibly creating a bigger hole than intended), the other holes are created by moving the head in circles using the feed and infeed parameters used in cutting&lt;/p&gt;&lt;p&gt;Remember that you have to set also &amp;quot;outline&amp;quot; parameters if you set this option&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@@ -686,13 +743,35 @@
686743
</property>
687744
</widget>
688745
</item>
689-
<item row="6" column="0">
690-
<widget class="QCheckBox" name="nog81CheckBox">
746+
<item row="3" column="1">
747+
<widget class="QComboBox" name="drillsideComboBox">
691748
<property name="toolTip">
692-
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;replace G81 with G0+G1. This option makes the gcode compatible with low-end cnc controllers (like grbl), but also makes it bigger and less clean&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
749+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;choose the drill side. Valid choices are front, back or auto (default). In auto mode the drill side is automatically chosen (always front unless only the back side is specified)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
750+
</property>
751+
<item>
752+
<property name="text">
753+
<string>auto</string>
754+
</property>
755+
</item>
756+
<item>
757+
<property name="text">
758+
<string>front</string>
759+
</property>
760+
</item>
761+
<item>
762+
<property name="text">
763+
<string>back</string>
764+
</property>
765+
</item>
766+
</widget>
767+
</item>
768+
<item row="3" column="0">
769+
<widget class="QLabel" name="drillsideLabel">
770+
<property name="toolTip">
771+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;choose the drill side. Valid choices are front, back or auto (default). In auto mode the drill side is automatically chosen (always front unless only the back side is specified)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
693772
</property>
694773
<property name="text">
695-
<string>nog81</string>
774+
<string>drill-side</string>
696775
</property>
697776
</widget>
698777
</item>
@@ -719,19 +798,6 @@
719798
<property name="verticalSpacing">
720799
<number>6</number>
721800
</property>
722-
<item row="9" column="0">
723-
<widget class="QCheckBox" name="cutfrontCheckBox">
724-
<property name="toolTip">
725-
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Cut from the front side. Default is from the back side&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
726-
</property>
727-
<property name="text">
728-
<string>cut-front</string>
729-
</property>
730-
<property name="checked">
731-
<bool>true</bool>
732-
</property>
733-
</widget>
734-
</item>
735801
<item row="6" column="1">
736802
<widget class="QDoubleSpinBox" name="bridgesDoubleSpinBox">
737803
<property name="toolTip">
@@ -1027,6 +1093,38 @@
10271093
</property>
10281094
</widget>
10291095
</item>
1096+
<item row="9" column="1">
1097+
<widget class="QComboBox" name="cutsideComboBox">
1098+
<property name="toolTip">
1099+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;choose the cut side. Valid choices are front, back or auto (default). In auto mode the cut side is automatically chosen (always front unless only the back side is specified)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
1100+
</property>
1101+
<item>
1102+
<property name="text">
1103+
<string>auto</string>
1104+
</property>
1105+
</item>
1106+
<item>
1107+
<property name="text">
1108+
<string>front</string>
1109+
</property>
1110+
</item>
1111+
<item>
1112+
<property name="text">
1113+
<string>back</string>
1114+
</property>
1115+
</item>
1116+
</widget>
1117+
</item>
1118+
<item row="9" column="0">
1119+
<widget class="QLabel" name="cutsideLabel">
1120+
<property name="toolTip">
1121+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;choose the cut side. Valid choices are front, back or auto (default). In auto mode the cut side is automatically chosen (always front unless only the back side is specified)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
1122+
</property>
1123+
<property name="text">
1124+
<string>cut-side</string>
1125+
</property>
1126+
</widget>
1127+
</item>
10301128
</layout>
10311129
</widget>
10321130
</widget>
@@ -1653,7 +1751,7 @@
16531751
<x>0</x>
16541752
<y>0</y>
16551753
<width>795</width>
1656-
<height>24</height>
1754+
<height>19</height>
16571755
</rect>
16581756
</property>
16591757
<widget class="QMenu" name="menuFile">

0 commit comments

Comments
 (0)