Merged in Beta (pull request #340)
Issue-495: milling drills issue Approved-by: Marius Stanciu
This commit is contained in:
commit
5d45994877
|
@ -879,9 +879,11 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
|||
|
||||
for tool in tools:
|
||||
if tooldia > self.tools[tool]["tooldia"]:
|
||||
mseg = '[ERROR_NOTCL] %s %s: %s' % (_("Milling tool for DRILLS is larger than hole size. Cancelled."),
|
||||
mseg = '[ERROR_NOTCL] %s %s: %s (tool = %s, hole = %s)' % (_("Milling tool for DRILLS is larger than hole size. Cancelled."),
|
||||
_("Tool"),
|
||||
str(tool))
|
||||
str(tool),
|
||||
str(tooldia),
|
||||
str(self.tools[tool]["tooldia"]))
|
||||
self.app.inform.emit(mseg)
|
||||
return False, "Error: Milling tool is larger than hole."
|
||||
|
||||
|
@ -920,7 +922,6 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
|||
geo_obj.solid_geometry.append(drill.buffer(0.0000001).exterior)
|
||||
else:
|
||||
geo_obj.solid_geometry.append(drill.buffer(buffer_value).exterior)
|
||||
|
||||
if use_thread:
|
||||
def geo_thread(a_obj):
|
||||
a_obj.app_obj.new_object("geometry", outname, geo_init, plot=plot)
|
||||
|
|
|
@ -148,6 +148,11 @@ class FlatCAMObj(QtCore.QObject):
|
|||
|
||||
if attr == 'options':
|
||||
self.options.update(d[attr])
|
||||
elif attr == 'tools':
|
||||
#FIXME: JSON stringifies all keys however tools datastructure is indexed by integer not by string
|
||||
if(d[attr] != None):
|
||||
d[attr] = {int(k):v for k,v in d[attr].items()}
|
||||
setattr(self, attr, d[attr])
|
||||
else:
|
||||
try:
|
||||
setattr(self, attr, d[attr])
|
||||
|
@ -780,7 +785,7 @@ class FlatCAMObj(QtCore.QObject):
|
|||
exc_tool,
|
||||
[
|
||||
_('Diameter'),
|
||||
'%.*f %s' % (self.decimals, tool_dia, self.app.defaults['units'].lower())
|
||||
'%.*f %s' % (self.decimals, float(tool_dia), self.app.defaults['units'].lower())
|
||||
],
|
||||
True
|
||||
)
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
|
||||
from shapely.geometry import LineString
|
||||
from shapely.affinity import rotate
|
||||
from ezdxf.math import Vec3 as ezdxf_vector
|
||||
#FIXME: No such class as Vec3 in ezdxf.0.15.1, instead there is Vector "ImportError: cannot import name 'Vec3' from 'ezdxf.math"
|
||||
#from ezdxf.math import Vec3 as ezdxf_vector
|
||||
from ezdxf.math import Vector as ezdxf_vector
|
||||
|
||||
from appParsers.ParseFont import *
|
||||
from appParsers.ParseDXF_Spline import *
|
||||
|
|
Loading…
Reference in New Issue