Tool number auto increment
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- mpetrasinovic
- Posts: 106
- Joined: Sat Feb 22, 2020 10:19 am
- Location: Belgrade, Serbia
- Contact:
Tool number auto increment
Is there some case that prevents that tool number is auto-incremented when tools are added to the job? Currently, every tool gets number 1 by default and if you want to split the job by tools it won't work as you expect until you change tool numbers.
- sliptonic
- Veteran
- Posts: 3459
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: Tool number auto increment
You didn't say if you're using legacy or toolbits. I'll assume it's toolbits since legacy is deprecated and you really _should_ be using toolbits.
Tool controllers get the tool number assigned to them in the tool library.
Generally tools have toolnumbers assigned at the machine so assigning them dynamically in the job doesn't make sense.
Tool controllers get the tool number assigned to them in the tool library.
Generally tools have toolnumbers assigned at the machine so assigning them dynamically in the job doesn't make sense.
- mpetrasinovic
- Posts: 106
- Joined: Sat Feb 22, 2020 10:19 am
- Location: Belgrade, Serbia
- Contact:
Re: Tool number auto increment
I thought this is unique to toolbits, I am not sure if we are on the same page here. My question is about this table (on image) and tool number property that is later used to split job output.
- sliptonic
- Veteran
- Posts: 3459
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: Tool number auto increment
The image you're showing is from the Job setup. It's showing the tool numbers assigned to the tool controllers in the Job.
Below you'll see the tool 'dock' for my setup. All the tools have unique numbers that correspond to my mill's tool table. When I add these tools as TCs to the job, the number is maintained. It seems like all the tools in your library have the same tool number (1)
Below you'll see the tool 'dock' for my setup. All the tools have unique numbers that correspond to my mill's tool table. When I add these tools as TCs to the job, the number is maintained. It seems like all the tools in your library have the same tool number (1)
- mpetrasinovic
- Posts: 106
- Joined: Sat Feb 22, 2020 10:19 am
- Location: Belgrade, Serbia
- Contact:
Re: Tool number auto increment
This is not the case, in tool selector, they also have a unique number but the number is not maintained for the job, we use (freshly installed):
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
- sliptonic
- Veteran
- Posts: 3459
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: Tool number auto increment
Well then I guess it's a little more interesting than I thought
Ok, Have you duplicated the problem with a brand new job?
Ok, Have you duplicated the problem with a brand new job?
- mpetrasinovic
- Posts: 106
- Joined: Sat Feb 22, 2020 10:19 am
- Location: Belgrade, Serbia
- Contact:
Re: Tool number auto increment
Yes, it is the same every time on multiple PC-s. Tool number is always 1 when it is added to the job.
- sliptonic
- Veteran
- Posts: 3459
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: Tool number auto increment
This is the procedure that gets executed when you add the TC from the dock.
https://github.com/FreeCAD/FreeCAD/blob ... #L388-L410
It calls this procecedure to actually add each TC.
https://github.com/FreeCAD/FreeCAD/blob ... #L129-L138
Please make sure these lines are at the beginning of both files and uncommented.
Also add this line in PathToolBitLibraryGui.py inside the for tool in tools: block around line 408
Then try it again and look at what's happening in the report view.
I'm seeing this:
https://github.com/FreeCAD/FreeCAD/blob ... #L388-L410
It calls this procecedure to actually add each TC.
https://github.com/FreeCAD/FreeCAD/blob ... #L129-L138
Please make sure these lines are at the beginning of both files and uncommented.
Code: Select all
PathLog.setLevel(PathLog.Level.DEBUG, PathLog.thisModule())
PathLog.trackModule(PathLog.thisModule())
Code: Select all
PathLog.track('adding tool number: {}'.format(tool[0]))
I'm seeing this:
Code: Select all
09:33:01 PathToolBitLibraryGui(408).selectedOrAllToolControllers(adding tool number: 11)
09:33:01 PathToolControllerGui(132).Create(<Part::PartFeature>, 11)
Re: Tool number auto increment
Hi Sliptonic,
it is here the same:
OS: openSUSE Tumbleweed (KDE//usr/share/xsessions/plasma5)
Word size of FreeCAD: 64-bit
Version: 0.20.24693 (Git) AppImage
Build type: Release
Branch: master
Hash: e01f0d25d5f3ef9ceb66aa087212121e9f2f2e8b
Python version: 3.9.2
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.1
Locale: German/Germany (de_DE)
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.
Edit: I don't notice this till now, because i have no toolchanger at my machine and use only one tool per Job...
it is here the same:
OS: openSUSE Tumbleweed (KDE//usr/share/xsessions/plasma5)
Word size of FreeCAD: 64-bit
Version: 0.20.24693 (Git) AppImage
Build type: Release
Branch: master
Hash: e01f0d25d5f3ef9ceb66aa087212121e9f2f2e8b
Python version: 3.9.2
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.1
Locale: German/Germany (de_DE)
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.
Edit: I don't notice this till now, because i have no toolchanger at my machine and use only one tool per Job...
Gruß Herbert
- mpetrasinovic
- Posts: 106
- Joined: Sat Feb 22, 2020 10:19 am
- Location: Belgrade, Serbia
- Contact:
Re: Tool number auto increment
I have done everything you said and I only get:
Does it mean that this line is not even called?
Code: Select all
PathToolControllerGui(133).Create(<Part::PartFeature>, 1)