- fixed issue with not loading old projects that do not have certain information's required by the new versions of FlatCAM
- compacted a bit more the GUI for Gerber Object
This commit is contained in:
@@ -6272,7 +6272,6 @@ class App(QtCore.QObject):
|
|||||||
obj_inst.from_dict(obj)
|
obj_inst.from_dict(obj)
|
||||||
App.log.debug(obj['kind'] + ": " + obj['options']['name'])
|
App.log.debug(obj['kind'] + ": " + obj['options']['name'])
|
||||||
self.new_object(obj['kind'], obj['options']['name'], obj_init, active=False, fit=False, plot=True)
|
self.new_object(obj['kind'], obj['options']['name'], obj_init, active=False, fit=False, plot=True)
|
||||||
|
|
||||||
self.plot_all()
|
self.plot_all()
|
||||||
self.inform.emit("[success] Project loaded from: " + filename)
|
self.inform.emit("[success] Project loaded from: " + filename)
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,12 @@ class FlatCAMObj(QtCore.QObject):
|
|||||||
if attr == 'options':
|
if attr == 'options':
|
||||||
self.options.update(d[attr])
|
self.options.update(d[attr])
|
||||||
else:
|
else:
|
||||||
setattr(self, attr, d[attr])
|
try:
|
||||||
|
setattr(self, attr, d[attr])
|
||||||
|
except KeyError:
|
||||||
|
log.debug("FlatCAMObj.from_dict() --> KeyError: %s. Means that we are loading an old project that don't"
|
||||||
|
"have all attributes in the latest FlatCAM." % str(attr))
|
||||||
|
pass
|
||||||
|
|
||||||
def on_options_change(self, key):
|
def on_options_change(self, key):
|
||||||
# Update form on programmatically options change
|
# Update form on programmatically options change
|
||||||
|
|||||||
21
ObjectUI.py
21
ObjectUI.py
@@ -390,16 +390,19 @@ class GerberObjectUI(ObjectUI):
|
|||||||
# Rounded corners
|
# Rounded corners
|
||||||
self.noncopper_rounded_cb = FCCheckBox(label="Rounded corners")
|
self.noncopper_rounded_cb = FCCheckBox(label="Rounded corners")
|
||||||
self.noncopper_rounded_cb.setToolTip(
|
self.noncopper_rounded_cb.setToolTip(
|
||||||
"Creates a Geometry objects with polygons\n"
|
"Resulting geometry will have rounded corners."
|
||||||
"covering the copper-free areas of the PCB."
|
|
||||||
)
|
)
|
||||||
grid4.addWidget(self.noncopper_rounded_cb, 1, 0, 1, 2)
|
grid4.addWidget(self.noncopper_rounded_cb, 1, 0)
|
||||||
|
|
||||||
self.generate_noncopper_button = QtWidgets.QPushButton('Generate Geometry')
|
self.generate_noncopper_button = QtWidgets.QPushButton('Generate Geo')
|
||||||
self.custom_box.addWidget(self.generate_noncopper_button)
|
grid4.addWidget(self.generate_noncopper_button, 1, 1)
|
||||||
|
|
||||||
## Bounding box
|
## Bounding box
|
||||||
self.boundingbox_label = QtWidgets.QLabel('<b>Bounding Box:</b>')
|
self.boundingbox_label = QtWidgets.QLabel('<b>Bounding Box:</b>')
|
||||||
|
self.boundingbox_label.setToolTip(
|
||||||
|
"Create a geometry surrounding the Gerber object.\n"
|
||||||
|
"Square shape."
|
||||||
|
)
|
||||||
self.custom_box.addWidget(self.boundingbox_label)
|
self.custom_box.addWidget(self.boundingbox_label)
|
||||||
|
|
||||||
grid5 = QtWidgets.QGridLayout()
|
grid5 = QtWidgets.QGridLayout()
|
||||||
@@ -421,13 +424,13 @@ class GerberObjectUI(ObjectUI):
|
|||||||
"their radius is equal to\n"
|
"their radius is equal to\n"
|
||||||
"the margin."
|
"the margin."
|
||||||
)
|
)
|
||||||
grid5.addWidget(self.bbrounded_cb, 1, 0, 1, 2)
|
grid5.addWidget(self.bbrounded_cb, 1, 0)
|
||||||
|
|
||||||
self.generate_bb_button = QtWidgets.QPushButton('Generate Geometry')
|
self.generate_bb_button = QtWidgets.QPushButton('Generate Geo')
|
||||||
self.generate_bb_button.setToolTip(
|
self.generate_bb_button.setToolTip(
|
||||||
"Genrate the Geometry object."
|
"Generate the Geometry object."
|
||||||
)
|
)
|
||||||
self.custom_box.addWidget(self.generate_bb_button)
|
grid5.addWidget(self.generate_bb_button, 1, 1)
|
||||||
|
|
||||||
|
|
||||||
class ExcellonObjectUI(ObjectUI):
|
class ExcellonObjectUI(ObjectUI):
|
||||||
|
|||||||
@@ -12,7 +12,10 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
19.02.2019
|
19.02.2019
|
||||||
|
|
||||||
- added the ability to compress the FlatCAM project on save with LZMA compression. There is a setting in Edit -> Preferences -> Compression Level between 0 and 9. 9 level yields best compression at the price of RAM usage and time spent.
|
- added the ability to compress the FlatCAM project on save with LZMA compression. There is a setting in Edit -> Preferences -> Compression Level between 0 and 9. 9 level yields best compression at the price of RAM usage and time spent.
|
||||||
- made FlatCAM able to load old type (uncompressed) FlatCAM projects
|
- made FlatCAM able to load old type (uncompressed) FlatCAM projects
|
||||||
|
- fixed issue with not loading old projects that do not have certain information's required by the new versions of FlatCAM
|
||||||
|
- compacted a bit more the GUI for Gerber Object
|
||||||
|
|
||||||
|
|
||||||
18.02.2019
|
18.02.2019
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user