1. Issue when importing Vector from ezdxf module; 2. KeyError when clicking on Excellon Properties: format expects floating point not string; 3. KeyError when clicking 'Mill Drills': JSON stringified integer keys
This commit is contained in:
parent
19561cb936
commit
d7acfee0ce
|
@ -879,9 +879,11 @@ class ExcellonObject(FlatCAMObj, Excellon):
|
||||||
|
|
||||||
for tool in tools:
|
for tool in tools:
|
||||||
if tooldia > self.tools[tool]["tooldia"]:
|
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"),
|
_("Tool"),
|
||||||
str(tool))
|
str(tool),
|
||||||
|
str(tooldia),
|
||||||
|
str(self.tools[tool]["tooldia"]))
|
||||||
self.app.inform.emit(mseg)
|
self.app.inform.emit(mseg)
|
||||||
return False, "Error: Milling tool is larger than hole."
|
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)
|
geo_obj.solid_geometry.append(drill.buffer(0.0000001).exterior)
|
||||||
else:
|
else:
|
||||||
geo_obj.solid_geometry.append(drill.buffer(buffer_value).exterior)
|
geo_obj.solid_geometry.append(drill.buffer(buffer_value).exterior)
|
||||||
|
|
||||||
if use_thread:
|
if use_thread:
|
||||||
def geo_thread(a_obj):
|
def geo_thread(a_obj):
|
||||||
a_obj.app_obj.new_object("geometry", outname, geo_init, plot=plot)
|
a_obj.app_obj.new_object("geometry", outname, geo_init, plot=plot)
|
||||||
|
|
|
@ -148,6 +148,11 @@ class FlatCAMObj(QtCore.QObject):
|
||||||
|
|
||||||
if attr == 'options':
|
if attr == 'options':
|
||||||
self.options.update(d[attr])
|
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:
|
else:
|
||||||
try:
|
try:
|
||||||
setattr(self, attr, d[attr])
|
setattr(self, attr, d[attr])
|
||||||
|
@ -780,7 +785,7 @@ class FlatCAMObj(QtCore.QObject):
|
||||||
exc_tool,
|
exc_tool,
|
||||||
[
|
[
|
||||||
_('Diameter'),
|
_('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
|
True
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,7 +7,9 @@
|
||||||
|
|
||||||
from shapely.geometry import LineString
|
from shapely.geometry import LineString
|
||||||
from shapely.affinity import rotate
|
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.ParseFont import *
|
||||||
from appParsers.ParseDXF_Spline import *
|
from appParsers.ParseDXF_Spline import *
|
||||||
|
|
Loading…
Reference in New Issue