diff --git a/FlatCAMObj.py b/FlatCAMObj.py index fc181eaf..75e9a19f 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -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('Advanced') diff --git a/ObjectUI.py b/ObjectUI.py index 760b0551..ad365a29 100644 --- a/ObjectUI.py +++ b/ObjectUI.py @@ -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('Apertures') + self.apertures_table_label = QtWidgets.QLabel('Apertures:') 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) diff --git a/README.md b/README.md index c8e92c4b..242d6618 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/camlib.py b/camlib.py index 842fc405..b8b78737 100644 --- a/camlib.py +++ b/camlib.py @@ -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 diff --git a/postprocessors/Toolchange_Probe_MACH3.py b/postprocessors/Toolchange_Probe_MACH3.py index 6c0520be..a4e70cb5 100644 --- a/postprocessors/Toolchange_Probe_MACH3.py +++ b/postprocessors/Toolchange_Probe_MACH3.py @@ -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