Tool bit definition

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Post Reply
CandL
Posts: 41
Joined: Thu Oct 29, 2020 6:41 pm

Tool bit definition

Post by CandL »

I think I am getting the hang of tool bits. But I am a somewhat confused. My questions are here:

1)
In the "bit" dir I have an fctb file. It is a json file that describes ... is it a bit or potentially a family of bits?

For example I have 3 1/8" end mill bits. One upcut, one down cut and one compression version. Do those all exist in a single file called 125_endmill? Or do I have three files one for each bit.

What is a bit weird (at least to me) is the toolbit "name" attribute is not actually associated with the file name. I found this out because I changed the bit name, uncoupling it from the file name. Came back the next day and had to back track the corresponding file name. ( In the GUI, I don't actually get to see the name of fctb file being edited.)


2) From the dialog, how does a user know to double click a tool to edit it. No fly over help or other indication I could find... for me it was you tube to the rescue

3) I am getting the Freecad logo instead of a bit outline. I checked and the shapefile is there... what am I missing.

4) Assuming I translate some of the "whiteside" bits into FreeCad json files .... where can I post them to share them.

Thanks
Carl
CandL
Posts: 41
Joined: Thu Oct 29, 2020 6:41 pm

Re: Tool bit definition

Post by CandL »

I forgot to add machine details ... my wife was saying time to go.

Edition Windows 11 Pro
Version 21H2
Installed on ‎8/‎1/‎2021
OS build 22000.556


OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.27422 (Git)
Build type: Release
Branch: master
Hash: d938733eaf2c2ce7cb18d1cbb56147185c473530
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)
User avatar
sliptonic
Veteran
Posts: 2957
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Tool bit definition

Post by sliptonic »

CandL wrote: Mon Mar 14, 2022 7:18 pm 1)
In the "bit" dir I have an fctb file. It is a json file that describes ... is it a bit or potentially a family of bits?
It's A bit. You'd have one per bit.
The current endmill toolshape doesn't have attributes for upcut/downcut/compression flute direction but that could be added as an enum property.

The toolbit name is a property and not the filename so it can include characters not allowed in filenames.
2) From the dialog, how does a user know to double click a tool to edit it. No fly over help or other indication I could find... for me it was you tube to the rescue
Good point. Suggestions?
3) I am getting the Freecad logo instead of a bit outline. I checked and the shapefile is there... what am I missing.
If it's a custom toolshape, you need to save with thumbnails on. Check my latest toolbit video.
https://youtu.be/fgCPmCEnndo. About 13 minutes in.
4) Assuming I translate some of the "whiteside" bits into FreeCad json files .... where can I post them to share them.
That's another good question. For now I'd make a github repo and post a link here. Also if you write a macro to harvest data from Whiteside catalog, please share that too.
CandL
Posts: 41
Joined: Thu Oct 29, 2020 6:41 pm

Re: Tool bit definition

Post by CandL »

1) "In the "bit" dir I have an fctb file. It is a json file that describes ... is it a bit or potentially a family of bits?"

So you mention "enum properties", I looked over the wiki and searched the web for the permitted enum values, but did not find them anywhere. For example the property material only appears to have a value of "HSS", but looking at a feed and speed add-on the seem to also have "Carbide" Do I look in the Path GitHub to find the definitions? If so can I then post them to the wiki? (is there an approval process)

2) "From the dialog, how does a user know to double click a tool to edit it. No fly over help or other indication I could find... for me it was you tube to the rescue"

You asked for suggestions so I went back to the dialog. Of all the available buttons in ver 0.2 the "?" seems the most likely location for the info. Clicking the "?" however gives me the international symbol for NO ( as in red circle, line through it). I would think a stop gap is putting a link under the the "?" If not that then a text pane under the library pane on the left. My guess is 5 libraries is a lot, so there would be plenty of room under that pane.

3) "I am getting the Freecad logo instead of a bit outline. I checked and the shapefile is there... what am I missing."

Thanks I will watch the vid.

4) Assuming I translate some of the "whiteside" bits into FreeCad json files .... where can I post them to share them.

The Whiteside folks are going to send me a spreadsheet. I will create a GitHub project with Python code to do the translation then write the files.

New question:

5) Is there doc on how the bit parameters are used in the creation of the tool path? ( Yes I know I asked this a year ago, but I had to go off and try VCarve Pro before coming back)
User avatar
sliptonic
Veteran
Posts: 2957
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Tool bit definition

Post by sliptonic »

CandL wrote: Tue Mar 15, 2022 2:46 pm So you mention "enum properties", I looked over the wiki and searched the web for the permitted enum values, but did not find them anywhere. For example the property material only appears to have a value of "HSS", but looking at a feed and speed add-on the seem to also have "Carbide" Do I look in the Path GitHub to find the definitions? If so can I then post them to the wiki? (is there an approval process)
https://youtu.be/fgCPmCEnndo?t=743
You can define properties in the propertybag as enum type and add the possible values there.
5) Is there doc on how the bit parameters are used in the creation of the tool path? ( Yes I know I asked this a year ago, but I had to go off and try VCarve Pro before coming back)
Entirely depends on the operation. Vcarve uses the angle to determine how deep to plunge. profile/pocket use the main diameter to determine offset.
In short, the toolbit system lets us add any kind of attributes, both informational and geometry to the shape file. But it still requires the operations and other parts of FreeCAD to USE those attributes in a meaningful way.

For example, the postprocessing system now looks for an attribute called SpindlePower. If it finds it and it is set to false, it will NEVER turn on the spindle regardless of how the tool controller is configured. this lets you create a tool like a probe or dragknife that should never be powered. Even if the user screws up the configuration, it won't turn on the spindle.
https://youtu.be/dY8SIL1cdmA?t=657
CandL
Posts: 41
Joined: Thu Oct 29, 2020 6:41 pm

Re: Tool bit definition

Post by CandL »

Possibly answering my own questions.

From the C++ code:

enum ToolType {
UNDEFINED,
DRILL,
CENTERDRILL,
COUNTERSINK,
COUNTERBORE,
FLYCUTTER,
REAMER,
TAP,
ENDMILL,
SLOTCUTTER,
BALLENDMILL,
CHAMFERMILL,
CORNERROUND,
ENGRAVER };

enum ToolMaterial {
MATUNDEFINED,
HIGHSPEEDSTEEL,
HIGHCARBONTOOLSTEEL,
CASTALLOY,
CARBIDE,
CERAMICS,
DIAMOND,
SIALON };

Then a tool constructor: Tool(const char* name,
ToolType type=Tool::UNDEFINED,
ToolMaterial material=Tool::MATUNDEFINED,
double diameter=10.0,
double lengthoffset=100,
double flatradius=0,
double cornerradius=0,
double cuttingedgeangle=0,
double cuttingedgeheight=0);

Do these map to the Python code? if so how does "HSS" map to HIGHSPEEDSTEEL.
User avatar
sliptonic
Veteran
Posts: 2957
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Tool bit definition

Post by sliptonic »

CandL wrote: Tue Mar 15, 2022 3:14 pm Possibly answering my own questions.
...

Do these map to the Python code? if so how does "HSS" map to HIGHSPEEDSTEEL.
This is from the deprecated legacy code. Nothing to do with toolbits.
User avatar
lrak
Posts: 15
Joined: Fri Feb 22, 2019 12:33 am

Re: Tool bit definition

Post by lrak »

RE:sliptonic youtube - Custom Tool Shapes

I am understanding parts of this..

Am I correct - I think path only understands endmills (cylinder) ballmills (sphere) Face-mill (same as endmill?) slitting-saw?

And, as of now, there is no way to do a cone tool for chamfering ?

,.,.
Hate to ask you to do more - but it would be helpful if you start a thread over here and post the link on youtube for your videos..

Really appreciate the work you are sharing with us.
I would rather have questions that cannot be answered,
than answers that cannot be questioned’
Richard Feynman.
CandL
Posts: 41
Joined: Thu Oct 29, 2020 6:41 pm

Re: Tool bit definition

Post by CandL »

Well life gets in the way, but I am back to importing FreeCad bits.

I have "imported" a dozen Whiteside bits. They can be found in a github repo: https://github.com/ShamanTcler/FreeCadToolBitImport (the code is rough and needs cleanup)

Look in the TooBits directory, it mirrors FreeCad.

I reached out to Harvey Tool and Lakeshore Carbide for more manufacturer data but I have received no data except for spam emails.

This is more Alpha code then Beta .... i.e. FreeCad 0.2 reads the data and doesn't crash. I only have a dew of their bits so I can only validate them as I use them.
FreeCadBit.png
FreeCadBit.png (52.03 KiB) Viewed 394 times


Some tweaks in my process:
1) Since the string "0.125 Endmill ...." does bad things to a file name the file name is "zero_pt25_endmill_Whiteside_RD2075"

2) Per Sliptonics advice I turned on thumbnails in preferences then opened/saved all the shape file to get thumbnails to work.

3) Added a vendor field to attributes
"attribute": {
"vendor": "Whiteside"
}

Request:
1) When the "_findToolFile" subroutine error out, could you print the path name to the dir you were searching? I spent a couple of days pounding my head until I caught the transpose of "tc" in "fctb" .... and was never sure I had the right directory.

2) Just not comfortable with the way parameters are stored and displayed i.e "chipload" is stored as a parameter in the json but displayed as an attribute in the GUI.

3) Adding extra attribute such a "vendor" .... is there a proper way to ask to have it added to the data model?

Next steps for me:

1) Use the bits I have
2) Use a V-Bit to do a chamfer
3) Add a tapered ball nose bit ( I will need to create a shape file)

Regards
Carl
User avatar
lgrfbs
Posts: 12
Joined: Wed Apr 07, 2021 9:51 am
Location: Sweden

Re: Tool bit definition

Post by lgrfbs »

Nice work CandL!
I like the GUI you posted.
Post Reply