- 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:
Marius Stanciu
2019-03-29 23:45:50 +02:00
parent c5a77841f8
commit 1c1d8bd637
8 changed files with 4718 additions and 2464 deletions

View File

@@ -34,7 +34,9 @@ from flatcamGUI.FlatCAMGUI import *
from FlatCAMCommon import LoudDict
from FlatCAMPostProc import load_postprocessors
from FlatCAMEditor import FlatCAMGeoEditor, FlatCAMExcEditor
from flatcamEditors.FlatCAMGeoEditor import FlatCAMGeoEditor
from flatcamEditors.FlatCAMExcEditor import FlatCAMExcEditor
from FlatCAMProcess import *
from FlatCAMWorkerStack import WorkerStack
from flatcamGUI.VisPyVisuals import Color

View File

@@ -2640,7 +2640,7 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
# except TypeError: # Element is not iterable...
# 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
# if the 'ptint' option is set to False.

View File

@@ -13,6 +13,10 @@ CAD program, and create G-Code for Isolation routing.
- 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 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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,7 @@ from flatcamGUI.GUIElements import *
import platform
import webbrowser
from FlatCAMEditor import FCShapeTool
from flatcamEditors.FlatCAMGeoEditor import FCShapeTool
import gettext
import FlatCAMTranslation as fcTranslate

View File

@@ -1337,6 +1337,48 @@ class FCTable(QtWidgets.QTableWidget):
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):
def __init__(self, parent=None):
super(FCSpinner, self).__init__(parent)