Path ToolBit

From FreeCAD Documentation
Revision as of 15:27, 24 October 2020 by Sliptonic (talk | contribs)
Jump to navigation Jump to search
Under construction icon-blue.svg
This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.

{{{Name}}}

Menu location
None
Workbenches
{{{Workbenches}}}
Default shortcut
None
Introduced in version
-
See also
None


Description

Each toolbit is stored as a JSON file. JSON is structured data that can be easily parsed by macros or python scripts but remains human readable. Describing toolbits with JSON allows for the possibility of automatically creating large collections of accurate toolbits automatically or with a script.

Storing a tool as a JSON file sounds great but eliminates the option of an accurate thumbnail or solid body representation. On the other hand, if each toolbit were created as a FreeCAD object, obtaining the solid body would be simple but would require enormous storage for large tool collections. Also automatically creating toolbits as FreeCAD objects would be difficult or impossible.

Instead, the toolbit is a hybrid. The JSON file contains the file path to the toolshape file and values for all parameters required to create the specific toolbit.

When a tool is instantiated in a job the a body is created from the template and the constraints are set according to the values from the JSON file. All additional parameters are created as properties on the object. This provides the the correct shape and dimensions which can be used to generate a point cloud or mesh for advanced algorithms (and potentially simulation).

Usage

Within the FreeCAD GUI the toolbit library manager provides a mechanism to create a new toolbit. A single toolbit can exist in multiple toolbit libraries.

  1. open the toolbit manager.
  2. select a library.
  3. create a toolbit.

JSON Structure

{

 "version": 2,
 "name": "T1",
 "shape": "endmill.fcstd",
 "attribute": {},
 "parameter": {
   "CuttingEdgeHeight": "30.000 mm",
   "Diameter": "1.000 mm",
   "Length": "50.000 mm",
   "ShankDiameter": "3.000 mm"
 }

}