- more modifications for the Gerber UI layout; made 'follow' an advanced Gerber option
This commit is contained in:
parent
d43de2ea77
commit
11ef818f0d
|
@ -508,6 +508,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
|
||||||
self.ui.milling_type_radio.hide()
|
self.ui.milling_type_radio.hide()
|
||||||
self.ui.generate_ext_iso_button.hide()
|
self.ui.generate_ext_iso_button.hide()
|
||||||
self.ui.generate_int_iso_button.hide()
|
self.ui.generate_int_iso_button.hide()
|
||||||
|
self.ui.follow_cb.hide()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.ui.level.setText('<span style="color:red;"><b>Advanced</b></span>')
|
self.ui.level.setText('<span style="color:red;"><b>Advanced</b></span>')
|
||||||
|
|
26
ObjectUI.py
26
ObjectUI.py
|
@ -147,6 +147,14 @@ class GerberObjectUI(ObjectUI):
|
||||||
self.multicolored_cb.setFixedWidth(55)
|
self.multicolored_cb.setFixedWidth(55)
|
||||||
grid0.addWidget(self.multicolored_cb, 0, 2)
|
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
|
## Object name
|
||||||
self.name_hlay = QtWidgets.QHBoxLayout()
|
self.name_hlay = QtWidgets.QHBoxLayout()
|
||||||
self.custom_box.addLayout(self.name_hlay)
|
self.custom_box.addLayout(self.name_hlay)
|
||||||
|
@ -160,7 +168,7 @@ class GerberObjectUI(ObjectUI):
|
||||||
self.custom_box.addLayout(hlay_plot)
|
self.custom_box.addLayout(hlay_plot)
|
||||||
|
|
||||||
#### Gerber Apertures ####
|
#### 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(
|
self.apertures_table_label.setToolTip(
|
||||||
"Apertures Table containining this Gerber object apertures."
|
"Apertures Table containining this Gerber object apertures."
|
||||||
)
|
)
|
||||||
|
@ -168,18 +176,12 @@ class GerberObjectUI(ObjectUI):
|
||||||
|
|
||||||
hlay_plot.addWidget(self.apertures_table_label)
|
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.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.apertures_table = FCTable()
|
||||||
self.custom_box.addWidget(self.apertures_table)
|
self.custom_box.addWidget(self.apertures_table)
|
||||||
|
|
|
@ -13,13 +13,14 @@ CAD program, and create G-Code for Isolation routing.
|
||||||
|
|
||||||
- fixed the Gerber object UI layout
|
- fixed the Gerber object UI layout
|
||||||
- added ability to mark individual apertures in Gerber file using the Gerber Aperture Table
|
- 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
|
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.
|
- 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
|
- 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 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)
|
- 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.
|
- 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
|
- 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
|
- 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 that after changing the layout all the toolbar actions are no longer working
|
||||||
- fixed bug in Set Origin function
|
- fixed bug in Set Origin function
|
||||||
|
- fixed a typo in Toolchange_Probe_MACH3 postprocessor
|
||||||
|
|
||||||
23.02.2019
|
23.02.2019
|
||||||
|
|
||||||
|
|
39
camlib.py
39
camlib.py
|
@ -2483,10 +2483,10 @@ class Gerber (Geometry):
|
||||||
if not geo.is_empty:
|
if not geo.is_empty:
|
||||||
poly_buffer.append(geo)
|
poly_buffer.append(geo)
|
||||||
try:
|
try:
|
||||||
self.apertures[current_aperture]['solid_geometry'].append(geo)
|
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.apertures[current_aperture]['solid_geometry'] = []
|
self.apertures[last_path_aperture]['solid_geometry'] = []
|
||||||
self.apertures[current_aperture]['solid_geometry'].append(geo)
|
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
|
||||||
|
|
||||||
path = [path[-1]]
|
path = [path[-1]]
|
||||||
|
|
||||||
|
@ -2665,13 +2665,18 @@ class Gerber (Geometry):
|
||||||
if self.apertures[last_path_aperture]["type"] != 'R':
|
if self.apertures[last_path_aperture]["type"] != 'R':
|
||||||
if not geo.is_empty:
|
if not geo.is_empty:
|
||||||
poly_buffer.append(geo)
|
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:
|
except:
|
||||||
poly_buffer.append(geo)
|
poly_buffer.append(geo)
|
||||||
try:
|
try:
|
||||||
self.apertures[current_aperture]['solid_geometry'].append(geo)
|
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.apertures[current_aperture]['solid_geometry'] = []
|
self.apertures[last_path_aperture]['solid_geometry'] = []
|
||||||
self.apertures[current_aperture]['solid_geometry'].append(geo)
|
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
|
||||||
|
|
||||||
# if linear_x or linear_y are None, ignore those
|
# if linear_x or linear_y are None, ignore those
|
||||||
if linear_x is not None and linear_y is not None:
|
if linear_x is not None and linear_y is not None:
|
||||||
|
@ -2692,7 +2697,7 @@ class Gerber (Geometry):
|
||||||
geo = LineString(path)
|
geo = LineString(path)
|
||||||
if not geo.is_empty:
|
if not geo.is_empty:
|
||||||
try:
|
try:
|
||||||
if self.apertures[current_aperture]["type"] != 'R':
|
if self.apertures[last_path_aperture]["type"] != 'R':
|
||||||
follow_buffer.append(geo)
|
follow_buffer.append(geo)
|
||||||
except:
|
except:
|
||||||
follow_buffer.append(geo)
|
follow_buffer.append(geo)
|
||||||
|
@ -2702,20 +2707,20 @@ class Gerber (Geometry):
|
||||||
geo = LineString(path).buffer(width / 1.999, int(self.steps_per_circle / 4))
|
geo = LineString(path).buffer(width / 1.999, int(self.steps_per_circle / 4))
|
||||||
if not geo.is_empty:
|
if not geo.is_empty:
|
||||||
try:
|
try:
|
||||||
if self.apertures[current_aperture]["type"] != 'R':
|
if self.apertures[last_path_aperture]["type"] != 'R':
|
||||||
poly_buffer.append(geo)
|
poly_buffer.append(geo)
|
||||||
try:
|
try:
|
||||||
self.apertures[current_aperture]['solid_geometry'].append(geo)
|
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.apertures[current_aperture]['solid_geometry'] = []
|
self.apertures[last_path_aperture]['solid_geometry'] = []
|
||||||
self.apertures[current_aperture]['solid_geometry'].append(geo)
|
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
|
||||||
except:
|
except:
|
||||||
poly_buffer.append(geo)
|
poly_buffer.append(geo)
|
||||||
try:
|
try:
|
||||||
self.apertures[current_aperture]['solid_geometry'].append(geo)
|
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.apertures[current_aperture]['solid_geometry'] = []
|
self.apertures[last_path_aperture]['solid_geometry'] = []
|
||||||
self.apertures[current_aperture]['solid_geometry'].append(geo)
|
self.apertures[last_path_aperture]['solid_geometry'].append(geo)
|
||||||
|
|
||||||
# Reset path starting point
|
# Reset path starting point
|
||||||
path = [[linear_x, linear_y]]
|
path = [[linear_x, linear_y]]
|
||||||
|
@ -2828,10 +2833,10 @@ class Gerber (Geometry):
|
||||||
if not buffered.is_empty:
|
if not buffered.is_empty:
|
||||||
poly_buffer.append(buffered)
|
poly_buffer.append(buffered)
|
||||||
try:
|
try:
|
||||||
self.apertures[current_aperture]['solid_geometry'].append(buffered)
|
self.apertures[last_path_aperture]['solid_geometry'].append(buffered)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.apertures[current_aperture]['solid_geometry'] = []
|
self.apertures[last_path_aperture]['solid_geometry'] = []
|
||||||
self.apertures[current_aperture]['solid_geometry'].append(buffered)
|
self.apertures[last_path_aperture]['solid_geometry'].append(buffered)
|
||||||
|
|
||||||
current_x = circular_x
|
current_x = circular_x
|
||||||
current_y = circular_y
|
current_y = circular_y
|
||||||
|
|
|
@ -61,7 +61,7 @@ class Toolchange_Probe_MACH3(FlatCAMPostProc):
|
||||||
gcode += 'G17\n'
|
gcode += 'G17\n'
|
||||||
gcode += 'G94\n'
|
gcode += 'G94\n'
|
||||||
gcode += '(MSG, WARNING: Make sure you do zero on all axis. ' \
|
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'
|
gcode += 'M0'
|
||||||
|
|
||||||
return gcode
|
return gcode
|
||||||
|
|
Loading…
Reference in New Issue