FlatCAM 8.994 Beta, milling drills issue.

Issue #495 new
Oleh Steciuk created an issue

FlatCAM cannot create a drill milling geometry when data is loaded from an existing project- the application crashes. When you open a fresh Excellon file, a milling geometry object can be produced without any issues. I traced down the issue. The problem is that in some places (ParseExcellon.py, FlatCAMExcellon.py, FlatCAMGeometry.py) the tool container of objects self.tools[] is indexed using integers and string in different places. I’m not a Python developer, but I was able to change indexes to strings in all places and that fixed the issue.

Comments (6)

  1. Oleh Steciuk reporter

    I think that the issue is related to the fact that FlatCAM stores tool index as strings in a project file. When this value is deserialized back it is a string type. The index value was an integer type before it was serialized into the file.

  2. Marius Stanciu

    I think that the issue is related to the fact that FlatCAM stores tool index as strings in a project file. When this value is deserialized back it is a string type. The index value was an integer type before it was serialized into the file.

    True.

  3. Marius Stanciu

    Helo Maksym,

    you are right about this, just as Oleh mentioned it also. But I can’t pull in this PR because it is not complete. The solution should be implemented in the deserialization for all the objects and that require careful evaluation all over the app. The Gerber object self.apertures should be processed too.
    But I think that at some point I am going to replace the self.apertures with a self.tools so there is a sort of uniformity for all the app objects. I will have to think and plan this because those attributes hold almost all the data structures.

  4. Wiktor Starzak

    Hey i do have some error with panelized drilling too

    [ERROR] An internal error has occurred. See shell.
    Object (excellon) failed because: 'App' object has no attribute 'export' 
    Traceback (most recent call last):
      File "D:\1.DEV\FlatCAM_beta\appObjects\AppObject.py", line 162, in new_object
        File "D:\1.DEV\FlatCAM_beta\appTools\ToolPanelize.py", line 364, in job_init_excellon
        AttributeError: 'App' object has no attribute 'export'
    

  5. Marius Stanciu

    @Wiktor this I think is called thread hijack? You should open your own bitbucket issue because the problem you have has nothing to do with the one the OP presented.

  6. Log in to comment