Tool number auto increment

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
mpetrasinovic
Posts: 106
Joined: Sat Feb 22, 2020 10:19 am
Location: Belgrade, Serbia
Contact:

Re: Tool number auto increment

Post by mpetrasinovic »

herbk wrote: Wed Apr 14, 2021 3:38 pm But only if i put the tools to the Job at the Job setup. If i open the Tool Seelctor and ad the tools from there to an existing Job the tool numbers are correct.
Same here, it works from Tool Selector as expected.
User avatar
mpetrasinovic
Posts: 106
Joined: Sat Feb 22, 2020 10:19 am
Location: Belgrade, Serbia
Contact:

Re: Tool number auto increment

Post by mpetrasinovic »

sliptonic wrote: Wed Apr 14, 2021 2:38 pm
Should I report this on the bug tracker?
User avatar
sliptonic
Veteran
Posts: 3459
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Tool number auto increment

Post by sliptonic »

As the toolbit system is currently implemented, the tool number is not an attribute of the toolbit. Rather it is an attribute of the toolbit IN the library. This allows the same toolbit to have different numbers in different libraries.

Scenario: You are a shop with a large collection of tools - perhaps hundreds. You organize those tools into different libraries to be used on the machine with an automatic tool changer. The ATC has 10 slots so tool numbers have to be re-used.

The problem that you are reporting here is that adding tools from the job adds by selecting the toolbit file. This is convenient but since no tool number is in the file, it defaults to '1'.

Possible solutions:

1) Change the job dialog. Either remove it entirely so tools are added from the dock only or make the job dialog duplicate the dock so tools are added from a library. This is pretty easy but it means we lose the ability to add the odd-ball toolbit that's only needed rarely and doesn't exist in a library.

2) Add the tool number to the toolbit as an attribute. It will no longer be possible to set or edit the toolnumber in the dock. To change it you would have to open the full editor, double click a toolbit, and change the number there. Toolbits could exist in many libraries but would have the same number in all of them.

3) When adding a tool from the job, we check to see if the toolbit is in the currently selected library and add the tool number from there. This doesn't solve the problem but avoids it most of the time.

4) Something else I haven't thought of?
User avatar
mpetrasinovic
Posts: 106
Joined: Sat Feb 22, 2020 10:19 am
Location: Belgrade, Serbia
Contact:

Re: Tool number auto increment

Post by mpetrasinovic »

Thank you for all clarifications.
sliptonic wrote: Tue Apr 27, 2021 1:40 pm 3) When adding a tool from the job, we check to see if the toolbit is in the currently selected library and add the tool number from there. This doesn't solve the problem but avoids it most of the time.
If this is the way to go I would like to have (what I proposed in the first post) an auto-incremented tool number for those that are not found in the currently selected library. Simply we need to change that 1 to the next available integer by default, and allow that user can override that later in the table (the goal is just to prevent the same tool number by default).
User avatar
sliptonic
Veteran
Posts: 3459
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Tool number auto increment

Post by sliptonic »

Actually that's probably another entire option. We could just leave the functionality as-is plus the auto-increment. That might be the easiest. Would it be confusing if the tool exists in the selected library as T3 but you add it to the job from the job dialog and get Tn+1?
User avatar
mpetrasinovic
Posts: 106
Joined: Sat Feb 22, 2020 10:19 am
Location: Belgrade, Serbia
Contact:

Re: Tool number auto increment

Post by mpetrasinovic »

For me, that can be confusing but it is not as bad as it is now with the default 1 value for all tools, if a user leaves it like that there can be other confusing results (like with mentioned job split by tools).
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Tool number auto increment

Post by herbk »

Hi Sliptonic,
sliptonic wrote: Tue Apr 27, 2021 1:40 pm Scenario: You are a shop with a large collection of tools - perhaps hundreds. You organize those tools into different libraries to be used on the machine with an automatic tool changer. The ATC has 10 slots so tool numbers have to be re-used.
in my mind this scenario is not common in practice, at least not at machines with automatic tool changer...

At all shops (with this equipment) i know, the tool stays at one machine! Ther reason is easy to explane and logical in my mind:
To use a automatic tool changer the tool itselv has to be premounted at a clamping system wich fits to the machine and mostly this pre mounted system dos only fit at one machine.
But also it the changing system fits to mor the one machine the shops don't use it at different because it needs to much time to search for the tool and the risk for mistakes (placing the tool to a wrong pocket) is to big.

So, what you realy need to know if you want to make a compensated path: Which tool is at which location on which machine. The easyest way to get this, is to import the machines tooltable i think. ;-)
Gruß Herbert
User avatar
mpetrasinovic
Posts: 106
Joined: Sat Feb 22, 2020 10:19 am
Location: Belgrade, Serbia
Contact:

Re: Tool number auto increment

Post by mpetrasinovic »

sliptonic wrote: Tue Apr 27, 2021 7:58 pm Try this: https://github.com/FreeCAD/FreeCAD/pull/4765
That is it, thank you!
chrisb
Veteran
Posts: 54177
Joined: Tue Mar 17, 2015 9:14 am

Re: Tool number auto increment

Post by chrisb »

herbk wrote: Wed Apr 28, 2021 5:26 am in my mind this scenario is not common in practice, at least not at machines with automatic tool changer...
I know different setups - which shows that they at least exist: They have similar machines with the same clamping system and the tools are indeed exchanged between the machines. The tools are stored on a trolley and moved to the appropriate machine.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply