Offby one in the tool table: Tooltype
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Offby one in the tool table: Tooltype
Not sure if this is already reported (i had a quick look and it does not appear to be)...
My tooltable shows the wrong ToolType, e.g. SlotCutter instead of EndMill.
I had one old entry (the first one), and as soon as I edited it, it jumped to Tap (which is one before) OS: Debian GNU/Linux testing (buster)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13180 (Git)
Build type: None
Branch: master
Hash: d9627d5311eadc31dee647bcc1650d02d0a30830
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Austria (de_AT)
My tooltable shows the wrong ToolType, e.g. SlotCutter instead of EndMill.
I had one old entry (the first one), and as soon as I edited it, it jumped to Tap (which is one before) OS: Debian GNU/Linux testing (buster)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13180 (Git)
Build type: None
Branch: master
Hash: d9627d5311eadc31dee647bcc1650d02d0a30830
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Austria (de_AT)
Re: Offby one in the tool table: Tooltype
could you post your steps please?
Re: Offby one in the tool table: Tooltype
Hi Markus,
open a tooltable and doubleclick an existing tool.
On my installation i get a "Tap" instead of a "Endmill"
OS: "openSUSE Leap 42.3"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13125 (Git)
Build type: None
Branch: master
Hash: 59dedd12751a3f5730734741ae6258a4ea4f5745
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
Gruß Herbert
Re: Offby one in the tool table: Tooltype
Oh boy, I seem to have one of these days -
Apologies for being slow today.
Apologies for being slow today.
Re: Offby one in the tool table: Tooltype
The reason is that Flycutter seems to be missing from the list in PathToolLibraryManager.py, I think it was added to the ToolEdit.ui quite recently. I cannot create pull request now but I can fix that tonight if @mlampert did not start that already? Maybe it would make sense to remove the duplication of the list and generate the items to the combo box on the fly instead of hard coding them to ToolEdit..?
Pekka
Pekka
Re: Offby one in the tool table: Tooltype
Haven't started - your idea of consolidating the enumeration strings into a single place sounds fantastic! Be aware that the Tool/Tooltable implementation is spread between c++ and python which complicates things a bit.roivai wrote: ↑Wed Jan 31, 2018 8:35 am The reason is that Flycutter seems to be missing from the list in PathToolLibraryManager.py, I think it was added to the ToolEdit.ui quite recently. I cannot create pull request now but I can fix that tonight if @mlampert did not start that already? Maybe it would make sense to remove the duplication of the list and generate the items to the combo box on the fly instead of hard coding them to ToolEdit..?
Pekka
Re: Offby one in the tool table: Tooltype
Oh crap, that's the end of my capabilities. Or maybe a change to finally study how c++ and Python ties together.. Lets see.. But maybe I'll add Flycutter to the lists right now to get the bug fixed.
Re: Offby one in the tool table: Tooltype
Phew.. That was a tough night of learning C++ after quite a many years.. I think I was able to do it: now the list of tool types and materials exist only in C++ side on Tooltable.cpp and Tooltable.h. The changes are here:
https://github.com/pekkaroi/FreeCAD/com ... c9713e7adb
Some things:
1. I did not read any coding style or naming conventions which I'm sure exist for FreeCAD C++ so it definitely needs a review.
2. Something went wrong with my beloved Atom text editor at some point and I messed with most of the line endings of the files. I returned them to unix encoding, but now git does not see the diff correctly, it thinks the whole file has changed. On command line I can get a decent diff with "git diff --ignore-space-at-eol -b -w --ignore-blank-lines". Any hints to deal with that except to do a git --reset at some branch and copy-paste the changes again..
3. I did not test that all that well and now I am well past my bed time, so that needs to be done tomorrow.
https://github.com/pekkaroi/FreeCAD/com ... c9713e7adb
Some things:
1. I did not read any coding style or naming conventions which I'm sure exist for FreeCAD C++ so it definitely needs a review.
2. Something went wrong with my beloved Atom text editor at some point and I messed with most of the line endings of the files. I returned them to unix encoding, but now git does not see the diff correctly, it thinks the whole file has changed. On command line I can get a decent diff with "git diff --ignore-space-at-eol -b -w --ignore-blank-lines". Any hints to deal with that except to do a git --reset at some branch and copy-paste the changes again..
3. I did not test that all that well and now I am well past my bed time, so that needs to be done tomorrow.