Explorar o código

- fixed bug in Gerber parser that made the Gerber files generated by Altium Designer 18 not to be loaded

Marius Stanciu %!s(int64=6) %!d(string=hai) anos
pai
achega
1b0cf14ef7
Modificáronse 4 ficheiros con 12 adicións e 9 borrados
  1. 2 2
      FlatCAMApp.py
  2. 4 0
      README.md
  3. 1 2
      camlib.py
  4. 5 5
      flatcamGUI/GUIElements.py

+ 2 - 2
FlatCAMApp.py

@@ -94,8 +94,8 @@ class App(QtCore.QObject):
     log.addHandler(handler)
     log.addHandler(handler)
 
 
     # Version
     # Version
-    version = 8.918
-    version_date = "2019/06/11"
+    version = 8.919
+    version_date = "2019/06/21"
     beta = True
     beta = True
 
 
     # current date now
     # current date now

+ 4 - 0
README.md

@@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing.
 
 
 =================================================
 =================================================
 
 
+15.06.2019
+
+- fixed bug in Gerber parser that made the Gerber files generated by Altium Designer 18 not to be loaded
+
 11.06.2019
 11.06.2019
 
 
 - fixed the Edit -> Conversion -> Join ... functions (merge() functions)
 - fixed the Edit -> Conversion -> Join ... functions (merge() functions)

+ 1 - 2
camlib.py

@@ -2452,7 +2452,6 @@ class Gerber (Geometry):
                         # --- Buffered ---
                         # --- Buffered ---
                         try:
                         try:
                             log.debug("Bare op-code %d." % current_operation_code)
                             log.debug("Bare op-code %d." % current_operation_code)
-
                             geo_dict = dict()
                             geo_dict = dict()
                             flash = self.create_flash_geometry(
                             flash = self.create_flash_geometry(
                                 Point(current_x, current_y), self.apertures[current_aperture],
                                 Point(current_x, current_y), self.apertures[current_aperture],
@@ -2467,7 +2466,7 @@ class Gerber (Geometry):
                                 else:
                                 else:
                                     geo_dict['solid'] = flash
                                     geo_dict['solid'] = flash
 
 
-                                if last_path_aperture not in self.apertures:
+                                if current_aperture not in self.apertures:
                                     self.apertures[current_aperture] = dict()
                                     self.apertures[current_aperture] = dict()
                                 if 'geometry' not in self.apertures[current_aperture]:
                                 if 'geometry' not in self.apertures[current_aperture]:
                                     self.apertures[current_aperture]['geometry'] = []
                                     self.apertures[current_aperture]['geometry'] = []

+ 5 - 5
flatcamGUI/GUIElements.py

@@ -1059,7 +1059,6 @@ class FCDetachableTab(QtWidgets.QTabWidget):
             # Re-attach the tab at the given index
             # Re-attach the tab at the given index
             self.attachTab(contentWidget, name, icon, index)
             self.attachTab(contentWidget, name, icon, index)
 
 
-
         # If the drop did not occur on an existing tab, determine if the drop
         # If the drop did not occur on an existing tab, determine if the drop
         # occurred in the tab bar area (the area to the side of the QTabBar)
         # occurred in the tab bar area (the area to the side of the QTabBar)
         else:
         else:
@@ -1227,14 +1226,17 @@ class FCDetachableTab(QtWidgets.QTabWidget):
             :return:
             :return:
             """
             """
             # Determine if the current movement is detected as a drag
             # Determine if the current movement is detected as a drag
-            if not self.dragStartPos.isNull() and ((event.pos() - self.dragStartPos).manhattanLength() < QtWidgets.QApplication.startDragDistance()):
+            if not self.dragStartPos.isNull() and \
+                    ((event.pos() - self.dragStartPos).manhattanLength() < QtWidgets.QApplication.startDragDistance()):
                 self.dragInitiated = True
                 self.dragInitiated = True
 
 
             # If the current movement is a drag initiated by the left button
             # If the current movement is a drag initiated by the left button
             if (((event.buttons() & QtCore.Qt.LeftButton)) and self.dragInitiated):
             if (((event.buttons() & QtCore.Qt.LeftButton)) and self.dragInitiated):
 
 
                 # Stop the move event
                 # Stop the move event
-                finishMoveEvent = QtGui.QMouseEvent(QtCore.QEvent.MouseMove, event.pos(), QtCore.Qt.NoButton, QtCore.Qt.NoButton, QtCore.Qt.NoModifier)
+                finishMoveEvent = QtGui.QMouseEvent(
+                    QtCore.QEvent.MouseMove, event.pos(), QtCore.Qt.NoButton, QtCore.Qt.NoButton, QtCore.Qt.NoModifier
+                )
                 QtWidgets.QTabBar.mouseMoveEvent(self, finishMoveEvent)
                 QtWidgets.QTabBar.mouseMoveEvent(self, finishMoveEvent)
 
 
                 # Convert the move event into a drag
                 # Convert the move event into a drag
@@ -1261,13 +1263,11 @@ class FCDetachableTab(QtWidgets.QTabWidget):
                 # Initiate the drag
                 # Initiate the drag
                 dropAction = drag.exec_(QtCore.Qt.MoveAction | QtCore.Qt.CopyAction)
                 dropAction = drag.exec_(QtCore.Qt.MoveAction | QtCore.Qt.CopyAction)
 
 
-
                 # For Linux:  Here, drag.exec_() will not return MoveAction on Linux.  So it
                 # For Linux:  Here, drag.exec_() will not return MoveAction on Linux.  So it
                 #             must be set manually
                 #             must be set manually
                 if self.dragDropedPos.x() != 0 and self.dragDropedPos.y() != 0:
                 if self.dragDropedPos.x() != 0 and self.dragDropedPos.y() != 0:
                     dropAction = QtCore.Qt.MoveAction
                     dropAction = QtCore.Qt.MoveAction
 
 
-
                 # If the drag completed outside of the tab bar, detach the tab and move
                 # If the drag completed outside of the tab bar, detach the tab and move
                 # the content to the current cursor position
                 # the content to the current cursor position
                 if dropAction == QtCore.Qt.IgnoreAction:
                 if dropAction == QtCore.Qt.IgnoreAction: