CNC Job creation fails when extra_cut / re-cut is set.
When re-cut is selected in preferences CNC job creation fails with this error:
[ERROR] An internal error has occurred. See shell.
Object (cncjob) failed because: linear2gcode_extra() got multiple values for argument 'dia'
Traceback (most recent call last):
File "/opt/flatcam/appObjects/AppObject.py", line 131, in new_object
return_value = initialize(obj, self.app)
File "/opt/flatcam/appObjects/FlatCAMGeometry.py", line 2042, in job_init_multi_geometry
res = job_obj.generate_from_multitool_geometry(
File "/opt/flatcam/camlib.py", line 3961, in generate_from_multitool_geometry
self.gcode += self.create_gcode_single_pass(geo, current_tooldia, extracut, extracut_length,
File "/opt/flatcam/camlib.py", line 4646, in create_gcode_single_pass
gcode_single_pass = self.linear2gcode_extra(geometry, extracut_length, tolerance=tolerance,
TypeError: linear2gcode_extra() got multiple values for argument 'dia
When re-cut is not selected if works as expected.
Comments (5)
-
-
reporter Version 8.993 BETA (2020/06/05) installed using the Arch Linux AUR package flatcam-git on a 64 bit system.
I did a bit more investigation:
It is pretty obvious that this call https://bitbucket.org/jpcgt/flatcam/src/a58cd5d9473554b9a620eb5eb44fb766f26ef693/camlib.py#lines-4646 is wrong:
gcode_single_pass = self.linear2gcode_extra(geometry, extracut_length, tolerance=tolerance, z_move=z_move, dia=cdia, old_point=old_point)
As the function signature of linear2gcode_extra is
def linear2gcode_extra(self, linear, dia, extracut_length, tolerance=0, down=True, up=True, z_cut=None, z_move=None, zdownrate=None, feedrate=None, feedrate_z=None, feedrate_rapid=None, cont=False, old_point=(0, 0)):
the parameter extracut_length is used as a positional parameter for dia. I would guess changing it to
gcode_single_pass = self.linear2gcode_extra(geometry, extracut_length=extracut_length, tolerance=tolerance, z_move=z_move, dia=cdia, old_point=old_point)
should be enough, but you better verify it first.
Note: The same error is also present in line 4716.
-
Hello Hermann,
I just arrived out of a very short (but intense) vacation at sea so I still need to adjust.
It seems that this error was reported by @vladi and then fixed by me some 2 months ago in this big topic:http://flatcam.org/discussion#!/developers:flatcam-beta
about 14 replies before the end.In any case, thank you for the report!
The fix will be available in the next version 8.994, when finished. -
Hi,
Can you check the latest version and see if we can close this issue? Let me know if FlatCAM beta 8.994 (just released) solves the issue.
-
- changed status to resolved
Solved in v 8.994
- Log in to comment
Hello,
What version of FlatCAM beta are you using? Under what OS? 32bit vs 64bit? If run under Windows, it is done when installed with an installer or from sources?