Flexible tool numbering

Issue #501 new
Dániel Zombori created an issue

When working on LinuxCNC, the milling software holds a tool library my machine. Since I use it manually, I set up a tool numbering such that I wouldn’t mix up tools while milling, hence my numbering is not linear. In FlatCAM the tool numbering seems to start from 1, no matter what and changing the DB file causes a crash. (I’m new to FC, and could not find any options regarding this.)

Can you enable tool number editing for the user?

Thanks.

Comments (4)

  1. Marius Stanciu

    Hi Daniel,

    I’m not going to put much attention on the Tools Database for now. As long as it is working in the current state (without mods) it is well, because there are other matters that need to be done before this.
    But this is marked as an ‘enhancement’ so I (or someone else) may take a look at it in the future.

    Best regards,
    Marius

  2. Dániel Zombori reporter

    After some more messing around I found that deleting tools from the database or a job causes a crash. Also adding tools can cause a crash after deletion.
    This can be worked around by just never deleting tools (except jobs where only the first tool is needed).

    In the meantime I also found a bug that could cause at least some of the crashes:
    appDatabase.py:2013
    new_toolid = len(self.db_tool_dict) + 1

    Basically when there are 3 tools (t1,t2 and t3), t2 is deleted and a new tool added → the new tool will get the id 3 which creates a collision.

    A dirty solution is to check from id 1 until no tool found and reserve the first missing id.

    Cheers,
    Dániel

  3. Marius Stanciu

    Hi Daniel,

    Basically when there are 3 tools (t1,t2 and t3), t2 is deleted and a new tool added → the new tool will get the id 3 which creates a collision.

    That has been fixed in my working copy for a while now, it has been reported before.
    Best regards,
    Marius

  4. Log in to comment