- added a fix to allow creating of Excellon geometry even when there are points with no tools by skipping those points and warning the user about this in a Tcl message
This commit is contained in:
@@ -88,8 +88,8 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
# Version
|
# Version
|
||||||
version = 8.901
|
version = 8.901
|
||||||
version_date = "2019/01/08"
|
version_date = "2019/01/09"
|
||||||
beta = False
|
beta = True
|
||||||
|
|
||||||
# URL for update checks and statistics
|
# URL for update checks and statistics
|
||||||
version_url = "http://flatcam.org/version"
|
version_url = "http://flatcam.org/version"
|
||||||
@@ -1907,6 +1907,7 @@ class App(QtCore.QObject):
|
|||||||
self.log.debug("%f seconds executing initialize()." % (t2 - t1))
|
self.log.debug("%f seconds executing initialize()." % (t2 - t1))
|
||||||
|
|
||||||
if return_value == 'fail':
|
if return_value == 'fail':
|
||||||
|
log.debug("Object (%s) parsing and/or geometry creation failed." % kind)
|
||||||
return "fail"
|
return "fail"
|
||||||
|
|
||||||
# Check units and convert if necessary
|
# Check units and convert if necessary
|
||||||
@@ -5118,13 +5119,14 @@ class App(QtCore.QObject):
|
|||||||
try:
|
try:
|
||||||
ret = excellon_obj.parse_file(filename)
|
ret = excellon_obj.parse_file(filename)
|
||||||
if ret == "fail":
|
if ret == "fail":
|
||||||
|
log.debug("Excellon parsing failed.")
|
||||||
self.inform.emit("[error_notcl] This is not Excellon file.")
|
self.inform.emit("[error_notcl] This is not Excellon file.")
|
||||||
return "fail"
|
return "fail"
|
||||||
except IOError:
|
except IOError:
|
||||||
app_obj.inform.emit("[error_notcl] Cannot open file: " + filename)
|
app_obj.inform.emit("[error_notcl] Cannot open file: " + filename)
|
||||||
|
log.debug("Could not open Excellon object.")
|
||||||
self.progress.emit(0) # TODO: self and app_bjj mixed
|
self.progress.emit(0) # TODO: self and app_bjj mixed
|
||||||
return "fail"
|
return "fail"
|
||||||
|
|
||||||
except:
|
except:
|
||||||
msg = "[error_notcl] An internal error has occurred. See shell.\n"
|
msg = "[error_notcl] An internal error has occurred. See shell.\n"
|
||||||
msg += traceback.format_exc()
|
msg += traceback.format_exc()
|
||||||
@@ -5133,6 +5135,7 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
ret = excellon_obj.create_geometry()
|
ret = excellon_obj.create_geometry()
|
||||||
if ret == 'fail':
|
if ret == 'fail':
|
||||||
|
log.debug("Could not create geometry for Excellon object.")
|
||||||
return "fail"
|
return "fail"
|
||||||
|
|
||||||
if excellon_obj.is_empty():
|
if excellon_obj.is_empty():
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
|
|
||||||
=================================================
|
=================================================
|
||||||
|
|
||||||
|
9.01.2019
|
||||||
|
|
||||||
|
- added a fix to allow creating of Excellon geometry even when there are points with no tools by skipping those points and warning the user about this in a Tcl message
|
||||||
|
|
||||||
8.01.2019
|
8.01.2019
|
||||||
|
|
||||||
- added checkboxes in Preferences -> General -> Global Preferences to switch on/off version check at application startup and also to control if the app will send anonymous statistics about FlatCAM usage to help improve FlatCAM
|
- added checkboxes in Preferences -> General -> Global Preferences to switch on/off version check at application startup and also to control if the app will send anonymous statistics about FlatCAM usage to help improve FlatCAM
|
||||||
|
|||||||
11
camlib.py
11
camlib.py
@@ -4021,6 +4021,13 @@ class Excellon(Geometry):
|
|||||||
try:
|
try:
|
||||||
for drill in self.drills:
|
for drill in self.drills:
|
||||||
# poly = drill['point'].buffer(self.tools[drill['tool']]["C"]/2.0)
|
# poly = drill['point'].buffer(self.tools[drill['tool']]["C"]/2.0)
|
||||||
|
if drill['tool'] is '':
|
||||||
|
self.app.inform.emit("[warning] Excellon.create_geometry() -> a drill location was skipped "
|
||||||
|
"due of not having a tool associated.\n"
|
||||||
|
"Check the resulting GCode.")
|
||||||
|
log.debug("Excellon.create_geometry() -> a drill location was skipped "
|
||||||
|
"due of not having a tool associated")
|
||||||
|
continue
|
||||||
tooldia = self.tools[drill['tool']]['C']
|
tooldia = self.tools[drill['tool']]['C']
|
||||||
poly = drill['point'].buffer(tooldia / 2.0, int(int(self.geo_steps_per_circle) / 4))
|
poly = drill['point'].buffer(tooldia / 2.0, int(int(self.geo_steps_per_circle) / 4))
|
||||||
self.solid_geometry.append(poly)
|
self.solid_geometry.append(poly)
|
||||||
@@ -4033,8 +4040,10 @@ class Excellon(Geometry):
|
|||||||
lines_string = LineString([start, stop])
|
lines_string = LineString([start, stop])
|
||||||
poly = lines_string.buffer(slot_tooldia / 2.0, int(int(self.geo_steps_per_circle) / 4))
|
poly = lines_string.buffer(slot_tooldia / 2.0, int(int(self.geo_steps_per_circle) / 4))
|
||||||
self.solid_geometry.append(poly)
|
self.solid_geometry.append(poly)
|
||||||
except:
|
except Exception as e:
|
||||||
|
log.debug("Excellon geometry creation failed due of ERROR: %s" % str(e))
|
||||||
return "fail"
|
return "fail"
|
||||||
|
|
||||||
# drill_geometry = {}
|
# drill_geometry = {}
|
||||||
# slot_geometry = {}
|
# slot_geometry = {}
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user