- fix error in plotting Excellon when toggling units
- FlatCAM editors now are separated each in it's own file - fixed TextTool in Geometry Editor so it will open the notebook on activation and close it after finishing text adding - started to work on a Gerber Editor
This commit is contained in:
@@ -34,7 +34,9 @@ from flatcamGUI.FlatCAMGUI import *
|
|||||||
from FlatCAMCommon import LoudDict
|
from FlatCAMCommon import LoudDict
|
||||||
from FlatCAMPostProc import load_postprocessors
|
from FlatCAMPostProc import load_postprocessors
|
||||||
|
|
||||||
from FlatCAMEditor import FlatCAMGeoEditor, FlatCAMExcEditor
|
from flatcamEditors.FlatCAMGeoEditor import FlatCAMGeoEditor
|
||||||
|
from flatcamEditors.FlatCAMExcEditor import FlatCAMExcEditor
|
||||||
|
|
||||||
from FlatCAMProcess import *
|
from FlatCAMProcess import *
|
||||||
from FlatCAMWorkerStack import WorkerStack
|
from FlatCAMWorkerStack import WorkerStack
|
||||||
from flatcamGUI.VisPyVisuals import Color
|
from flatcamGUI.VisPyVisuals import Color
|
||||||
|
|||||||
@@ -2640,7 +2640,7 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
|
|||||||
# except TypeError: # Element is not iterable...
|
# except TypeError: # Element is not iterable...
|
||||||
# self.add_shape(shape=element, color=color, visible=visible, layer=0)
|
# self.add_shape(shape=element, color=color, visible=visible, layer=0)
|
||||||
|
|
||||||
def plot(self):
|
def plot(self, kind=None):
|
||||||
|
|
||||||
# Does all the required setup and returns False
|
# Does all the required setup and returns False
|
||||||
# if the 'ptint' option is set to False.
|
# if the 'ptint' option is set to False.
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
|
|
||||||
- update the TCL keyword list
|
- update the TCL keyword list
|
||||||
- fix on the Gerber parser that makes searching for '%%' char optional when doing regex search for mode, units or image polarity. This allow loading Gerber files generated by the ECAD software TCl4.4
|
- fix on the Gerber parser that makes searching for '%%' char optional when doing regex search for mode, units or image polarity. This allow loading Gerber files generated by the ECAD software TCl4.4
|
||||||
|
- fix error in plotting Excellon when toggling units
|
||||||
|
- FlatCAM editors now are separated each in it's own file
|
||||||
|
- fixed TextTool in Geometry Editor so it will open the notebook on activation and close it after finishing text adding
|
||||||
|
- started to work on a Gerber Editor
|
||||||
|
|
||||||
28.03.2019
|
28.03.2019
|
||||||
|
|
||||||
|
|||||||
2492
flatcamEditors/FlatCAMExcEditor.py
Normal file
2492
flatcamEditors/FlatCAMExcEditor.py
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2162
flatcamEditors/FlatCAMGrbEditor.py
Normal file
2162
flatcamEditors/FlatCAMGrbEditor.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@ from flatcamGUI.GUIElements import *
|
|||||||
import platform
|
import platform
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
from FlatCAMEditor import FCShapeTool
|
from flatcamEditors.FlatCAMGeoEditor import FCShapeTool
|
||||||
|
|
||||||
import gettext
|
import gettext
|
||||||
import FlatCAMTranslation as fcTranslate
|
import FlatCAMTranslation as fcTranslate
|
||||||
|
|||||||
@@ -1337,6 +1337,48 @@ class FCTable(QtWidgets.QTableWidget):
|
|||||||
action.triggered.connect(call_function)
|
action.triggered.connect(call_function)
|
||||||
|
|
||||||
|
|
||||||
|
class SpinBoxDelegate(QtWidgets.QItemDelegate):
|
||||||
|
|
||||||
|
def __init__(self, units):
|
||||||
|
super(SpinBoxDelegate, self).__init__()
|
||||||
|
self.units = units
|
||||||
|
self.current_value = None
|
||||||
|
|
||||||
|
def createEditor(self, parent, option, index):
|
||||||
|
editor = QtWidgets.QDoubleSpinBox(parent)
|
||||||
|
editor.setMinimum(-999.9999)
|
||||||
|
editor.setMaximum(999.9999)
|
||||||
|
|
||||||
|
if self.units == 'MM':
|
||||||
|
editor.setDecimals(2)
|
||||||
|
else:
|
||||||
|
editor.setDecimals(3)
|
||||||
|
|
||||||
|
return editor
|
||||||
|
|
||||||
|
def setEditorData(self, spinBox, index):
|
||||||
|
try:
|
||||||
|
value = float(index.model().data(index, Qt.EditRole))
|
||||||
|
except ValueError:
|
||||||
|
value = self.current_value
|
||||||
|
# return
|
||||||
|
|
||||||
|
spinBox.setValue(value)
|
||||||
|
|
||||||
|
def setModelData(self, spinBox, model, index):
|
||||||
|
spinBox.interpretText()
|
||||||
|
value = spinBox.value()
|
||||||
|
self.current_value = value
|
||||||
|
|
||||||
|
model.setData(index, value, Qt.EditRole)
|
||||||
|
|
||||||
|
def updateEditorGeometry(self, editor, option, index):
|
||||||
|
editor.setGeometry(option.rect)
|
||||||
|
|
||||||
|
def setDecimals(self, spinbox, digits):
|
||||||
|
spinbox.setDecimals(digits)
|
||||||
|
|
||||||
|
|
||||||
class FCSpinner(QtWidgets.QSpinBox):
|
class FCSpinner(QtWidgets.QSpinBox):
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super(FCSpinner, self).__init__(parent)
|
super(FCSpinner, self).__init__(parent)
|
||||||
|
|||||||
Reference in New Issue
Block a user