Explorar el Código

Solved issue #188: Order of the drill bits in Gcode generation from Excellon file
The tools are ordered by diameter as I found that the tools order in the Excellon file is not always diameter based. There is also a plated / no-plated holes criteria.
The tools in the GUI tool-list are selected all by default.
If the user wants to select only some tools, he should be carefull when selecting the tools as the order of the selection will be the actual order of the tools in G-code.

Marius Stanciu hace 10 años
padre
commit
a7b29065df
Se han modificado 2 ficheros con 7 adiciones y 1 borrados
  1. 6 0
      FlatCAMObj.py
  2. 1 1
      camlib.py

+ 6 - 0
FlatCAMObj.py

@@ -648,6 +648,12 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
             dia.setFlags(QtCore.Qt.ItemIsEnabled)
             self.ui.tools_table.setItem(i, 1, dia)  # Diameter
             i += 1
+        
+        # sort the tool diameter column
+        self.ui.tools_table.sortItems(1)
+        # all the tools are selected by default
+        self.ui.tools_table.selectColumn(0)
+        
         self.ui.tools_table.resizeColumnsToContents()
         self.ui.tools_table.resizeRowsToContents()
         self.ui.tools_table.horizontalHeader().setStretchLastSection(True)

+ 1 - 1
camlib.py

@@ -2746,7 +2746,7 @@ class CNCjob(Geometry):
 
         gcode += self.pausecode + "\n"
 
-        for tool in points:
+        for tool in tools:
 
             # Tool change sequence (optional)
             if toolchange: