- more modifications for the Gerber UI layout; made 'follow' an advanced Gerber option

This commit is contained in:
Marius Stanciu 2019-02-25 19:42:56 +02:00 committed by Marius S
parent d43de2ea77
commit 11ef818f0d
5 changed files with 41 additions and 31 deletions

View File

@ -508,6 +508,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
self.ui.milling_type_radio.hide()
self.ui.generate_ext_iso_button.hide()
self.ui.generate_int_iso_button.hide()
self.ui.follow_cb.hide()
else:
self.ui.level.setText('<span style="color:red;"><b>Advanced</b></span>')

View File

@ -147,6 +147,14 @@ class GerberObjectUI(ObjectUI):
self.multicolored_cb.setFixedWidth(55)
grid0.addWidget(self.multicolored_cb, 0, 2)
# Plot CB
self.plot_cb = FCCheckBox('Plot')
self.plot_cb.setToolTip(
"Plot (show) this object."
)
self.plot_cb.setFixedWidth(55)
grid0.addWidget(self.plot_cb, 0, 3)
## Object name
self.name_hlay = QtWidgets.QHBoxLayout()
self.custom_box.addLayout(self.name_hlay)
@ -160,7 +168,7 @@ class GerberObjectUI(ObjectUI):
self.custom_box.addLayout(hlay_plot)
#### Gerber Apertures ####
self.apertures_table_label = QtWidgets.QLabel('<b>Apertures</b>')
self.apertures_table_label = QtWidgets.QLabel('<b>Apertures:</b>')
self.apertures_table_label.setToolTip(
"Apertures Table containining this Gerber object apertures."
)
@ -168,18 +176,12 @@ class GerberObjectUI(ObjectUI):
hlay_plot.addWidget(self.apertures_table_label)
# Aperture Table Visibility CB
self.aperture_table_visibility_cb = FCCheckBox()
hlay_plot.addWidget(self.aperture_table_visibility_cb)
# Plot CB
self.plot_cb = FCCheckBox('Plot Object')
self.plot_cb.setToolTip(
"Plot (show) this object."
)
self.plot_cb.setLayoutDirection(QtCore.Qt.RightToLeft)
hlay_plot.addStretch()
hlay_plot.addWidget(self.plot_cb)
# Aperture Table Visibility CB
self.aperture_table_visibility_cb = FCCheckBox('Show/Hide')
self.aperture_table_visibility_cb.setLayoutDirection(QtCore.Qt.RightToLeft)
hlay_plot.addWidget(self.aperture_table_visibility_cb)
self.apertures_table = FCTable()
self.custom_box.addWidget(self.apertures_table)

View File

@ -13,13 +13,14 @@ CAD program, and create G-Code for Isolation routing.
- fixed the Gerber object UI layout
- added ability to mark individual apertures in Gerber file using the Gerber Aperture Table
- more modifications for the Gerber UI layout; made 'follow' an advanced Gerber option
24.02.2019
- fixed a small bug in the Tool Solder Paste: the App don't take into consideration pads already filled with solder paste.
- prettified the defaults files and the recent file. Now they are ordered and human readable
- added a Toggle Code Editor Menu and key shortcut
- added the ability to open FlatConfig configuration files in COde Editor, Modify them and then save them.
- added the ability to open FlatConfig configuration files in Code Editor, Modify them and then save them.
- added ability to double click the FlatConfig files and open them in the FlatCAM Code Editor (to be verified)
- when saving a file from Code Editor and there is no object active then the OpenFileDialog filters are reset to FlatConfig files.
- reverted a change in GCode that might affect Gerber polarity change in Gerber parser
@ -28,6 +29,7 @@ CAD program, and create G-Code for Isolation routing.
- added all the Tools in a new ToolBar
- fixed bug that after changing the layout all the toolbar actions are no longer working
- fixed bug in Set Origin function
- fixed a typo in Toolchange_Probe_MACH3 postprocessor
23.02.2019

View File

@ -2483,10 +2483,10 @@ class Gerber (Geometry):
if not geo.is_empty:
poly_buffer.append(geo)
try:
self.apertures[current_aperture]['solid_geometry'].append(geo)
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
except KeyError:
self.apertures[current_aperture]['solid_geometry'] = []
self.apertures[current_aperture]['solid_geometry'].append(geo)
self.apertures[last_path_aperture]['solid_geometry'] = []
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
path = [path[-1]]
@ -2665,13 +2665,18 @@ class Gerber (Geometry):
if self.apertures[last_path_aperture]["type"] != 'R':
if not geo.is_empty:
poly_buffer.append(geo)
try:
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
except KeyError:
self.apertures[last_path_aperture]['solid_geometry'] = []
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
except:
poly_buffer.append(geo)
try:
self.apertures[current_aperture]['solid_geometry'].append(geo)
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
except KeyError:
self.apertures[current_aperture]['solid_geometry'] = []
self.apertures[current_aperture]['solid_geometry'].append(geo)
self.apertures[last_path_aperture]['solid_geometry'] = []
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
# if linear_x or linear_y are None, ignore those
if linear_x is not None and linear_y is not None:
@ -2692,7 +2697,7 @@ class Gerber (Geometry):
geo = LineString(path)
if not geo.is_empty:
try:
if self.apertures[current_aperture]["type"] != 'R':
if self.apertures[last_path_aperture]["type"] != 'R':
follow_buffer.append(geo)
except:
follow_buffer.append(geo)
@ -2702,20 +2707,20 @@ class Gerber (Geometry):
geo = LineString(path).buffer(width / 1.999, int(self.steps_per_circle / 4))
if not geo.is_empty:
try:
if self.apertures[current_aperture]["type"] != 'R':
if self.apertures[last_path_aperture]["type"] != 'R':
poly_buffer.append(geo)
try:
self.apertures[current_aperture]['solid_geometry'].append(geo)
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
except KeyError:
self.apertures[current_aperture]['solid_geometry'] = []
self.apertures[current_aperture]['solid_geometry'].append(geo)
self.apertures[last_path_aperture]['solid_geometry'] = []
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
except:
poly_buffer.append(geo)
try:
self.apertures[current_aperture]['solid_geometry'].append(geo)
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
except KeyError:
self.apertures[current_aperture]['solid_geometry'] = []
self.apertures[current_aperture]['solid_geometry'].append(geo)
self.apertures[last_path_aperture]['solid_geometry'] = []
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
# Reset path starting point
path = [[linear_x, linear_y]]
@ -2828,10 +2833,10 @@ class Gerber (Geometry):
if not buffered.is_empty:
poly_buffer.append(buffered)
try:
self.apertures[current_aperture]['solid_geometry'].append(buffered)
self.apertures[last_path_aperture]['solid_geometry'].append(buffered)
except KeyError:
self.apertures[current_aperture]['solid_geometry'] = []
self.apertures[current_aperture]['solid_geometry'].append(buffered)
self.apertures[last_path_aperture]['solid_geometry'] = []
self.apertures[last_path_aperture]['solid_geometry'].append(buffered)
current_x = circular_x
current_y = circular_y

View File

@ -61,7 +61,7 @@ class Toolchange_Probe_MACH3(FlatCAMPostProc):
gcode += 'G17\n'
gcode += 'G94\n'
gcode += '(MSG, WARNING: Make sure you do zero on all axis. ' \
'For Z axis, since it will be probed, make a rough estimate and do a zero.)'
'For Z axis, since it will be probed, make a rough estimate and do a zero.)\n'
gcode += 'M0'
return gcode