CNCjob.check_zcut missing "return zcut" statement - fixed for next version

Issue #567 new
Krzysztof Kluczek created an issue

CNCjob.check_zcut misses “return zcut” statement at the end of the function (camlib.py:3112) when everything is fine with the zcut value.
This causes the function to return NoneType in such case, which gets propagated and eventually crashes.
E.g. ‘drillcncjob’ command calls “check_zcut” at camlib.py:3861 and the value is propagated to “self.z_cut = z_offset + old_zcut” (camlib.py:4455) and fails while trying to add “float” to “NoneType”.

Enabling the unsafe “machinist mode” skips the check and avoids the problem.

Reproduction: use any ‘drillcncjob’ command with “-drillz” properly set to negative value, in non-machinist mode.

All line numbers as of version 8.994.

Comments (2)

  1. Marius Stanciu

    Hello Krzysztof,
    The machinist mode was removed for the next version. I also made sure that if the self.z_cut is 0.0 then it is not kept set to “fail”.
    Thank you for the report!

    Best regards,
    Marius

  2. Log in to comment