adding resources tool bit libraries

This commit is contained in:
OddlyTimbot 2025-04-10 17:22:40 -04:00
parent 59ebeca372
commit 88b8f1fbfb
21 changed files with 273 additions and 0 deletions

View File

@ -0,0 +1,14 @@
{
"version": 2,
"name": "45 Deg. Chamfer",
"shape": "chamfer.fcstd",
"parameter": {
"CuttingEdgeAngle": "45.0000 \u00b0",
"CuttingEdgeHeight": "6.3500 mm",
"Diameter": "12.3323 mm",
"Length": "30.0000 mm",
"ShankDiameter": "6.3500 mm",
"TipDiameter": "5.0000 mm"
},
"attribute": {}
}

View File

@ -0,0 +1,14 @@
{
"version": 2,
"name": "5mm-thread-cutter",
"shape": "thread-mill.fcstd",
"parameter": {
"Crest": "0.10 mm",
"Diameter": "5.00 mm",
"Length": "50.00 mm",
"NeckDiameter": "3.00 mm",
"NeckLength": "20.00 mm",
"ShankDiameter": "5.00 mm"
},
"attribute": {}
}

View File

@ -0,0 +1,11 @@
{
"version": 2,
"name": "5mm Drill",
"shape": "drill.fcstd",
"parameter": {
"Diameter": "5.0000 mm",
"Length": "50.0000 mm",
"TipAngle": "119.0000 \u00b0"
},
"attribute": {}
}

View File

@ -0,0 +1,12 @@
{
"version": 2,
"name": "5mm Endmill",
"shape": "endmill.fcstd",
"parameter": {
"CuttingEdgeHeight": "30.0000 mm",
"Diameter": "5.0000 mm",
"Length": "50.0000 mm",
"ShankDiameter": "3.0000 mm"
},
"attribute": {}
}

View File

@ -0,0 +1,14 @@
{
"version": 2,
"name": "60 Deg. V-Bit",
"shape": "v-bit.fcstd",
"parameter": {
"CuttingEdgeAngle": "60.0000 \u00b0",
"Diameter": "10.0000 mm",
"CuttingEdgeHeight": "1.0000 mm",
"TipDiameter": "1.0000 mm",
"Length": "20.0000 mm",
"ShankDiameter": "5.0000 mm"
},
"attribute": {}
}

View File

@ -0,0 +1,12 @@
{
"version": 2,
"name": "6mm Ball End",
"shape": "ballend.fcstd",
"parameter": {
"CuttingEdgeHeight": "40.0000 mm",
"Diameter": "6.0000 mm",
"Length": "50.0000 mm",
"ShankDiameter": "3.0000 mm"
},
"attribute": {}
}

View File

@ -0,0 +1,13 @@
{
"version": 2,
"name": "6 mm Bull Nose",
"shape": "bullnose.fcstd",
"parameter": {
"CuttingEdgeHeight": "40.0000 mm",
"Diameter": "6.0000 mm",
"FlatRadius": "1.5000 mm",
"Length": "50.0000 mm",
"ShankDiameter": "3.0000 mm"
},
"attribute": {}
}

View File

@ -0,0 +1,11 @@
{
"version": 2,
"name": "Probe",
"shape": "probe.fcstd",
"parameter": {
"Diameter": "6.0000 mm",
"Length": "50.0000 mm",
"ShaftDiameter": "4.0000 mm"
},
"attribute": {}
}

View File

@ -0,0 +1,14 @@
{
"version": 2,
"name": "Slitting Saw",
"shape": "slittingsaw.fcstd",
"parameter": {
"BladeThickness": "3.0000 mm",
"CapHeight": "3.0000 mm",
"CapDiameter": "8.0000 mm",
"Diameter": "76.2000 mm",
"Length": "50.0000 mm",
"ShankDiameter": "19.0500 mm"
},
"attribute": {}
}

View File

@ -0,0 +1,41 @@
{
"tools": [
{
"nr": 1,
"path": "5mm_Endmill.fctb"
},
{
"nr": 2,
"path": "5mm_Drill.fctb"
},
{
"nr": 3,
"path": "6mm_Ball_End.fctb"
},
{
"nr": 4,
"path": "6mm_Bullnose.fctb"
},
{
"nr": 5,
"path": "60degree_Vbit.fctb"
},
{
"nr": 6,
"path": "45degree_chamfer.fctb"
},
{
"nr": 7,
"path": "slittingsaw.fctb"
},
{
"nr": 8,
"path": "probe.fctb"
},
{
"nr": 9,
"path": "5mm-thread-cutter.fctb"
}
],
"version": 1
}

117
resources/tools/README.md Normal file
View File

@ -0,0 +1,117 @@
# Tools
Each tool is stored as a JSON file which has the shape's path and values
for all attributes of the shape. It also includes all additional
parameters and their values.
Storing a tool as a JSON file sounds great but eliminates the option of
an accurate thumbnail. On the other hand, storing each tool as a `*.fcstd`
file requires more space, and does not allow for generating tools. If a
person has an extensive tool arsenal, they might want to script the
generation of tools, which is easily done for a `*.json` file but
practically impossible for `*.fcstd` files.
When a tool is instantiated in a job the PartDesign body is created from
the shape, and the attributes and constraints are set according to the
values from the JSON file. All additional parameters are created as
properties on the object. This provides the correct shape and dimensions
which can be used to generate a point cloud or mesh for advanced
algorithms (and potentially simulation).
# Tool Libraries
Due to each tool being stored in its own file, and the storage/organization
of those files being quite flexible, the importance of a tool library for
organisational purposes is quite diminished. The user is free to organise
their tools in whichever directory hierarchy they see fit, and can also
name them as best fits their use and organisation. A _tool library_ is
nevertheless a great representation for a physical grouping of tools,
such as in an automatic tool changer.
A tool library is a (JSON) file with a mapping of tool ID to the path of
the tool file. As a consequence, each tool can be in multiple libraries
and doesn't have an `ID` of its own. The `ID` is a property of the library
If a tool from a tool library (or an entire tool library) is added to a
job it retains its `ID` from the library as a property. Adding a tool bit
directly results in the tool getting the next free ID assigned.
# Tool Controllers
Tool controllers largely stay the same as they are today. As an additional
feature, it should be possible to _copy_ a tool controller, which allows
for easy feed and speed changes for the same tool.
The above requirement highlights one change though, that the `ID` should
be a property of the tool bit, and not of the tool controller. There are
two requirements that are currently mapped to a single `ID`. There needs
to be an identification of which tool controller is being used by a
certain op, and which tool number to use for a `M6` command.
# Paths and Extensibility
The following directory structure is used for supplied
(shipped with FreeCAD) tools:
```
Tools
+ Bit
+ Library
+ Shape
```
Strictly speaking, a user is free to store their tools wherever they
want and however they want. By default, the file dialog will open the
corresponding directory (depending on context), or whichever directory
the user opened last.
The above directory structure with the most common default tools shipped
with FreeCAD should be installed analogous to TechDraw's templates.
## How to create a new tool
1. Set the tool's Label, this will show up in the object tree.
1. Select a tool shape from the existing shape files.
If your tool shape doesn't exist, you'll have to create a new
shape, see below for details.
1. Each tool bit shape has its own set of parameters,
fill them with the tool's values.
1. Select additional parameters.
1. Save the tool under the path/file that makes sense to you.
## How to create a new tool bit Shape
The shape file for a tool bit is expected to contain a PartDesign body
which represents the tool as a 3D solid. The PartDesign body should be
parametric based on a PropertyBag object so that, when the properties
of the PropertyBag are changed the solid is updated to the correct
representation.
1. Create a new FreeCAD document.
1. Open the `PartDesign` workbench, create a body, and give the body
a label you want to show up in the bit selection.
1. Open the Path workbench and (with the PartDesign body selected)
create a PropertyBag:
menu 'Path' -> 'Utils' -> 'Property Bag'
* This creates a PropertyBag object inside the Body
(assuming it was selected).
* Add properties that define the tool bit's shape, and put those
into the group 'Shape'.
* Add any other properties to the bag which might be useful for
the tool bit.
1. Construct the body of the tool bit and assign expressions referencing
properties from the PropertyBag (in the `Shape` Group) for all
constraints.
* Position the tip of the tool bit on the origin (0,0).
1. Save the document as a new file in the Shape directory.
* Before saving the document, make sure you have _Save Thumbnail_
selected, and _Add program logo_ deselected in FreeCAD's
preferences.
* Also, make sure to switch to _Front View_ and
_Fit content to screen_ .
* Whatever you see when saving the document will end up being the
visual representation of tool bits with this shape.
Not that 'Shape' is the only property group which has special meaning
for tool bits. All other property groups are copied verbatim to the
tool bit object when one is created.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.