Flatcam 8.994 - TclCommandAlignDrill (aligndrill) excellon cannot be processed by (drillcncjob)
To make long story short : just one change in TclCommandAlignDrill to fix:
init_obj.tools = {
line 176:
- '1': {
+ 1: {
then generated excellon object (typically 4 alignment holes) can be processed in camlib.py by generate_from_excellon_by_tool
, otherwise it crashes by KeyError at line 3956:
drill_no = 0
3956: if 'drills' in exobj.tools[to_ol]:
drill_no = len(exobj.tools[to_ol]['drills'])
for drill in exobj.tools[to_ol]['drills']:
sol_geo.append(drill.buffer((it[1] / 2.0), resolution=self.geo_steps_per_circle))
key string '1' cannot be referenced as int (1).
Comments (3)
-
-
reporter So far so good on my working copy. Didn’t noticed any side effects. UI imported excellon objects tools are indexed by integers, afaik.
I personally think that whole tool selection process would need rework. Especially when it comes to TCL scripting. User should be allowed to choose ToolID from his own ToolDB or to enter tool diameter allowing flatcam to select best match for given job (engrave, cut, paint/ncc, drill, etc)
I’d like to ask about 8.995 sources? Available somewhere to review?
Great job
-
Better late than never, I missed this.
https://bitbucket.org/marius_stanciu/flatcam_beta/branch/Beta_8.995 - Log in to comment
Thanks for the fix, I still need to find to look in those data structures… A change here might make it not work in another situation.