Skip to content

Commit c905706

Browse files
committed
Disable 'offset' when 'voronoi' is selected
1 parent 9386c30 commit c905706

File tree

3 files changed

+42
-41
lines changed

3 files changed

+42
-41
lines changed

mainwindow.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015 Nicola Corna (nicola@corna.info)
2+
* Copyright (c) 2015-2016 Nicola Corna (nicola@corna.info)
33
*
44
* This file is part of pcb2gcodeGUI.
55
*
@@ -132,7 +132,7 @@ MainWindow::MainWindow(QWidget *parent) :
132132
connect(ui->vectorialCheckBox, SIGNAL(toggled(bool)), this, SLOT(vectorialEnable(bool)));
133133
connect(ui->vectorialCheckBox, SIGNAL(toggled(bool)), this, SLOT(bridgesAvailable()));
134134
connect(ui->vectorialCheckBox, SIGNAL(toggled(bool)), ui->voronoiCheckBox, SLOT(setEnabled(bool)));
135-
connect(ui->voronoiCheckBox, SIGNAL(toggled(bool)), this, SLOT(extrapassesSetDisabled(bool)));
135+
connect(ui->voronoiCheckBox, SIGNAL(toggled(bool)), this, SLOT(voronoiEnable(bool)));
136136
connect(ui->filloutlineCheckBox, SIGNAL(toggled(bool)), ui->outlinewidthDoubleSpinBox, SLOT(setEnabled(bool)));
137137
connect(ui->svgCheckBox, SIGNAL(toggled(bool)), ui->svgLineEdit, SLOT(setEnabled(bool)));
138138
connect(ui->optimiseCheckBox, SIGNAL(toggled(bool)), this, SLOT(bridgesAvailable()));
@@ -171,9 +171,10 @@ void MainWindow::vectorialEnable(bool enable)
171171
ui->extrapassesSpinBox->setEnabled(true);
172172
}
173173

174-
void MainWindow::extrapassesSetDisabled(bool disable)
174+
void MainWindow::voronoiEnable(bool enable)
175175
{
176-
ui->extrapassesSpinBox->setEnabled(!disable);
176+
ui->extrapassesSpinBox->setEnabled(!enable);
177+
ui->offsetDoubleSpinBox->setEnabled(!enable);
177178
}
178179

179180
void MainWindow::bridgesAvailable()

mainwindow.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015 Nicola Corna (nicola@corna.info)
2+
* Copyright (c) 2015-2016 Nicola Corna (nicola@corna.info)
33
*
44
* This file is part of pcb2gcodeGUI.
55
*
@@ -48,7 +48,7 @@ class MainWindow : public QMainWindow
4848

4949
private slots:
5050
void vectorialEnable(bool enable);
51-
void extrapassesSetDisabled(bool disable);
51+
void voronoiEnable(bool disable);
5252
void bridgesAvailable();
5353
void changeMetricInputUnits(bool metric);
5454
void startPcb2gcode();

mainwindow.ui

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<enum>QTabWidget::Rounded</enum>
4646
</property>
4747
<property name="currentIndex">
48-
<number>3</number>
48+
<number>0</number>
4949
</property>
5050
<widget class="QWidget" name="commonTab">
5151
<attribute name="title">
@@ -453,6 +453,31 @@
453453
<property name="verticalSpacing">
454454
<number>6</number>
455455
</property>
456+
<item row="4" column="1">
457+
<widget class="QDoubleSpinBox" name="offsetDoubleSpinBox">
458+
<property name="toolTip">
459+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;distance by which the tool movement will be outset from the contours in the gerber file to be engraved. If you want to obtain a PCB as similar as possible to the original file, you should set this value to half of the tool diameter. If this distance can't be satisfied because copper areas are too close, a warning will be printed and the line will be drawn between the areas. This behavior can be used to get voronoi-style (flood-filling) areas; sim‐ply set the offset to a large value (like 1 inch). When the vectorial mode is in use, --voronoi is preferred.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
460+
</property>
461+
<property name="suffix">
462+
<string> mm</string>
463+
</property>
464+
<property name="decimals">
465+
<number>3</number>
466+
</property>
467+
<property name="minimum">
468+
<double>0.000000000000000</double>
469+
</property>
470+
<property name="maximum">
471+
<double>100.000000000000000</double>
472+
</property>
473+
<property name="singleStep">
474+
<double>0.050000000000000</double>
475+
</property>
476+
<property name="value">
477+
<double>0.100000000000000</double>
478+
</property>
479+
</widget>
480+
</item>
456481
<item row="0" column="1">
457482
<widget class="QDoubleSpinBox" name="zworkDoubleSpinBox">
458483
<property name="toolTip">
@@ -497,7 +522,7 @@
497522
</property>
498523
</widget>
499524
</item>
500-
<item row="3" column="0">
525+
<item row="4" column="0">
501526
<widget class="QLabel" name="offsetLabel">
502527
<property name="toolTip">
503528
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;distance by which the tool movement will be outset from the contours in the gerber file to be engraved. If you want to obtain a PCB as similar as possible to the original file, you should set this value to half of the tool diameter. If this distance can't be satisfied because copper areas are too close, a warning will be printed and the line will be drawn between the areas. This behavior can be used to get voronoi-style (flood-filling) areas; sim‐ply set the offset to a large value (like 1 inch). When the vectorial mode is in use, --voronoi is preferred.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@@ -507,31 +532,6 @@
507532
</property>
508533
</widget>
509534
</item>
510-
<item row="3" column="1">
511-
<widget class="QDoubleSpinBox" name="offsetDoubleSpinBox">
512-
<property name="toolTip">
513-
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;distance by which the tool movement will be outset from the contours in the gerber file to be engraved. If you want to obtain a PCB as similar as possible to the original file, you should set this value to half of the tool diameter. If this distance can't be satisfied because copper areas are too close, a warning will be printed and the line will be drawn between the areas. This behavior can be used to get voronoi-style (flood-filling) areas; sim‐ply set the offset to a large value (like 1 inch). When the vectorial mode is in use, --voronoi is preferred.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
514-
</property>
515-
<property name="suffix">
516-
<string> mm</string>
517-
</property>
518-
<property name="decimals">
519-
<number>3</number>
520-
</property>
521-
<property name="minimum">
522-
<double>0.000000000000000</double>
523-
</property>
524-
<property name="maximum">
525-
<double>100.000000000000000</double>
526-
</property>
527-
<property name="singleStep">
528-
<double>0.050000000000000</double>
529-
</property>
530-
<property name="value">
531-
<double>0.100000000000000</double>
532-
</property>
533-
</widget>
534-
</item>
535535
<item row="1" column="0">
536536
<widget class="QLabel" name="millfeedLabel">
537537
<property name="toolTip">
@@ -552,6 +552,13 @@
552552
</property>
553553
</widget>
554554
</item>
555+
<item row="5" column="1">
556+
<widget class="QSpinBox" name="extrapassesSpinBox">
557+
<property name="toolTip">
558+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;number of additional isolation passes For each extra pass, engraving is repeated with the offset width increased by half its original value, creating wider isolation areas. This option is ignored when --voronoi is in use.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
559+
</property>
560+
</widget>
561+
</item>
555562
<item row="2" column="0">
556563
<widget class="QLabel" name="millspeedLabel">
557564
<property name="toolTip">
@@ -572,13 +579,6 @@
572579
</property>
573580
</widget>
574581
</item>
575-
<item row="5" column="1">
576-
<widget class="QSpinBox" name="extrapassesSpinBox">
577-
<property name="toolTip">
578-
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;number of additional isolation passes For each extra pass, engraving is repeated with the offset width increased by half its original value, creating wider isolation areas. This option is ignored when --voronoi is in use.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
579-
</property>
580-
</widget>
581-
</item>
582582
<item row="2" column="1">
583583
<widget class="QSpinBox" name="millspeedSpinBox">
584584
<property name="toolTip">
@@ -598,7 +598,7 @@
598598
</property>
599599
</widget>
600600
</item>
601-
<item row="4" column="0">
601+
<item row="3" column="0">
602602
<widget class="QCheckBox" name="voronoiCheckBox">
603603
<property name="enabled">
604604
<bool>false</bool>

0 commit comments

Comments
 (0)