- made the output of Panelization Tool a choice out of Gerber and Geometry type of objects. Useful for those who want to engrave multiple copies of the same design.

This commit is contained in:
Marius Stanciu 2019-02-18 23:47:59 +02:00 committed by Marius S
parent 7c2d8ff28e
commit 783604f2aa
4 changed files with 38 additions and 3 deletions

View File

@ -458,6 +458,7 @@ class App(QtCore.QObject):
"tools_panelize_constrain": self.tools_defaults_form.tools_panelize_group.pconstrain_cb,
"tools_panelize_constrainx": self.tools_defaults_form.tools_panelize_group.px_width_entry,
"tools_panelize_constrainy": self.tools_defaults_form.tools_panelize_group.py_height_entry,
"tools_panelize_panel_type": self.tools_defaults_form.tools_panelize_group.panel_type_radio,
"tools_calc_vshape_tip_dia": self.tools_defaults_form.tools_calculators_group.tip_dia_entry,
"tools_calc_vshape_tip_angle": self.tools_defaults_form.tools_calculators_group.tip_angle_entry,
@ -681,6 +682,7 @@ class App(QtCore.QObject):
"tools_panelize_constrain": False,
"tools_panelize_constrainx": 0.0,
"tools_panelize_constrainy": 0.0,
"tools_panelize_panel_type": 'gerber',
"tools_calc_vshape_tip_dia": 0.007874,
"tools_calc_vshape_tip_angle": 30,

View File

@ -3833,8 +3833,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
# Plot options
self.export_options_label = QtWidgets.QLabel("<b>Export Options:</b>")
self.export_options_label.setToolTip(
"The parameters set here are used in the file exported<cr>"
"when using the <b>File -> Export -> Export Excellon</b> menu entry."
"The parameters set here are used in the file exported\n"
"when using the File -> Export -> Export Excellon menu entry."
)
self.layout.addWidget(self.export_options_label)
@ -4879,6 +4879,19 @@ class ToolsPanelizePrefGroupUI(OptionsGroupUI):
grid0.addWidget(self.y_height_lbl, 6, 0)
grid0.addWidget(self.py_height_entry, 6, 1)
## Type of resulting Panel object
self.panel_type_radio = RadioSet([{'label': 'Gerber', 'value': 'gerber'},
{'label': 'Geometry', 'value': 'geometry'}])
self.panel_type_label = QtWidgets.QLabel("Panel Type:")
self.panel_type_label.setToolTip(
"Choose the type of object for the panel object:\n"
"- Geometry\n"
"- Gerber"
)
grid0.addWidget(self.panel_type_label, 7, 0)
grid0.addWidget(self.panel_type_radio, 7, 1)
self.layout.addStretch()

View File

@ -27,6 +27,7 @@ CAD program, and create G-Code for Isolation routing.
- adjusted the plotcanvas.zomm_fit() function so the objects are better fit into view (with a border around)
- modified the GUI in Objects Selected Tab to accommodate 2 different modes: basic and Advanced. In Basic mode, some of the functionality's are hidden from the user.
- added Tool Transform preferences in Edit -> Preferences and used them through out the app
- made the output of Panelization Tool a choice out of Gerber and Geometry type of objects. Useful for those who want to engrave multiple copies of the same design.
17.02.2019

View File

@ -156,6 +156,17 @@ class Panelize(FlatCAMTool):
self.constrain_sel = OptionalInputSection(
self.constrain_cb, [self.x_width_lbl, self.x_width_entry, self.y_height_lbl, self.y_height_entry])
## Type of resulting Panel object
self.panel_type_radio = RadioSet([{'label': 'Gerber', 'value': 'gerber'},
{'label': 'Geo', 'value': 'geometry'}])
self.panel_type_label = QtWidgets.QLabel("Panel Type:")
self.panel_type_label.setToolTip(
"Choose the type of object for the panel object:\n"
"- Geometry\n"
"- Gerber"
)
form_layout.addRow(self.panel_type_label)
form_layout.addRow(self.panel_type_radio)
## Buttons
hlay_2 = QtWidgets.QHBoxLayout()
@ -232,6 +243,10 @@ class Panelize(FlatCAMTool):
self.app.defaults["tools_panelize_constrainy"] else 0.0
self.y_height_entry.set_value(float(y_w))
panel_type = self.app.defaults["tools_panelize_panel_type"] if \
self.app.defaults["tools_panelize_panel_type"] else 'gerber'
self.panel_type_radio.set_value(panel_type)
def on_type_obj_index_changed(self):
obj_type = self.type_obj_combo.currentIndex()
self.object_combo.setRootModelIndex(self.app.collection.index(obj_type, 0, QtCore.QModelIndex()))
@ -344,6 +359,9 @@ class Panelize(FlatCAMTool):
"use a number.")
return
panel_type = str(self.panel_type_radio.get_value())
if 0 in {columns, rows}:
self.app.inform.emit("[ERROR_NOTCL]Columns or Rows are zero value. Change them to a positive integer.")
return "Columns or Rows are zero value. Change them to a positive integer."
@ -548,7 +566,8 @@ class Panelize(FlatCAMTool):
self.app.new_object("excellon", self.outname, job_init_excellon, plot=True, autoselected=True)
else:
self.app.progress.emit(50)
self.app.new_object("geometry", self.outname, job_init_geometry, plot=True, autoselected=True)
self.app.new_object(panel_type, self.outname, job_init_geometry,
plot=True, autoselected=True)
if self.constrain_flag is False:
self.app.inform.emit("[success]Panel done...")