Iāve got a decent proof of concept written for this. Youāll run into a handful of issues, most revolve around a lack of information in the c3d libraries that f3d considers required.
That said, itās all ~doable with a bit of maths and some assumptions to fill in those gaps.
To get a library generated youāll want to copy the tool library within carbide create itself. That will generate a āuserā tool library which will show up in the folder. (The defaults are builtins so they donāt need to store the configā¦thatās my assumption anyway )
My poc is written in my native language of powershell but Iām thinking of writing it in ocaml as some fun practice. DM me if you want the poc or the resultant fusion library to see how I approached it
@HeuristicBishop any start of code helps.
You all are welcome to any source code I make.
I should be able to push data around, but I am lacking in practical machining knowledge.
Meaning I may work on aspects that donāt mean a a lot, so guidance as to what fields are important and/or known questions/default is welcome.
I do have some long time tool makers that I can ask questions
I am not a coding expert, but this realm I am accustom to.
It will be a Windows Winform application so that may limit usage.
The above youtube link has a github link to the source code I will be working with.
I need to put a reference to that gentlemen for due credit
I have been looking at the various data from HSM, Fusion360 and CC.
The CC data is āsparseā as compared to Fusion 360, which itself seems to be a subset of the HSM data.
I have HTML diagrams of Xml Schema for the HSM and Fusion tool libraries
The HSM document was made by the original code author
The FSM document I made based on a JSON schema I created from the MichaelGrilo created JSON file.
I am not sure how to attach HTML / XSD / XML / JSON files to this forum.
I do not have a cloud repository.
The next move is to create a F360 tool with the bare minimum and see what the resulting JSON file looks like. The references I have are a few years old, so there maybe changes to the contents.
We can then map the CC data to the F360 tool schema and see what needs to be done ( hard coded defaults and any calculations.
Iāll send you my example converted fusion library tonight and the code for it. At the very least the comments will be helpful in generating your property mapping.
I ended up doing some shenanigans to flatten all of the materials per tool when converting up fusion.
(So you get 1 entry for the 247Z with each material from the C3D library as a feed/speed preset. Huge quality of life upgrade compared to a separate tool for each tool/material combination)
@WillAdams Are the columns of the CSV export position dependent or can they be in any order ?
What columns can be null ? That may depend on the tool type ā¦
I finally got a program that reads the JSON and CSV files. Next is a mapping technique.
Itās amazing how much you can forget in 5.5 years. I have been laughing at myself.
@HeuristicBishop I am trying to run your Powershell script. I donāt know diddly about PowerShell.
Using your README.md file there is an execution line
convertfrom-C3d -Verbose | ConvertTo-Json -Depth 5 | out-file D:\downloads\test-library.json -Force -Encoding ascii
I get this.
D:\Projects\F360toHSM\PowerShell\f3d_of_c3d_tool_library-main>powershell convertfrom-C3d -Verbose | ConvertTo-Json -Depth 5 | out-file D:\downloads\test-library.json -Force -Encoding ascii
āConvertTo-Jsonā is not recognized as an internal or external command,
operable program or batch file.
I also launched the PS1 file in the PowerShell ISE but I canāt get it to enter the code to run to a breakpoint. HELP !
@WillAdams Here is the C# class I am making for the CSV file.
Are all CC Tool defined in Imperial units ?
For each property
Note any property that is no longer valid/used.
Check default values.
Note which application within CC uses that property.
public int number = 0; // Integer ID
public string? vendor = null; // Limited optons ?
public string? model = null; // Descriptive ID
public string? URL = null; // Shopping
public string? name = null; // Optional
public string? type = null; // Limited options ball,end,vee,engraver
public decimal diameter = 0; // thousands inch
public decimal cornerradius = 0; // thousands inch
public decimal flutelength = 0; // thousands inch
public decimal shaftdiameter = 0; // ??
public decimal angle = 0; // Degrees
public int numflutes = 0; // Count
public string? stickout = null; // thousands inch ?? What is this ?
public string? coating = null; // NULL
public int metric = 0; // 0 = Inch 1 = MM
public string? notes = null; // NULL
public string? machine = null; // NULL
public string? material = null; // NULL
public decimal plungerate = 0; // inch per minute
public decimal feedrate = 0; // inch per minute
public int rpm = 0; // Rev pe minute
public decimal depth = 0; // thousands inch
public string? cutpower = null; // NULL ?
public decimal finishallowance = 0; // thousands inch
public decimal stepover3d = 0; // inch per minute
public decimal feedrate3d = 0; // inch per minute
public decimal rpm3d = 0; // Rev per minute