CAM ToolShape: Difference between revisions

From FreeCAD Documentation
(Removed "has to be revised" remark from the macOS path.)
(Marked this version for translation)
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{UnfinishedDocu{{#translation:}}}}
<translate>
<translate>


Line 51: Line 50:
<!--T:9-->
<!--T:9-->
# Create a new FreeCAD document.
# Create a new FreeCAD document.
# Open the [[Image:Workbench_PartDesign.svg|24px|link=PartDesign_Workbench]] [[PartDesign_Workbench|Part Design]] workbench.
# Open the [[Image:Workbench_PartDesign.svg|16px]] [[PartDesign_Workbench|PartDesign Workbench]].
# Create a body and give the body a label you want to show up in the bit selection.
# Create a [[PartDesign_Body|Body]] and give the Body a label you want to show up in the bit selection.
# Create a sketch in the XZ plane and draw half the profile of the bit.
# Create a [[Image:PartDesign_NewSketch.svg|16px]] [[PartDesign_NewSketch|Sketch]] on the XZ plane and draw half the profile of the bit.
# Constrain the bottom most center of the bit on the origin {{incode|(0,0)}}. This will be the center of the axis on which the G-code will rotate the bit.
# In the Combo View Window, switch to Model View so you can see the file structure organization.
#* Note: Do not add dimensional constraints at this time.
# While in Sketch mode, constrain the bottom most center of the bit on the origin {{incode|(0,0)}}. This will be the center of the axis on which the GCODE will rotate the bit.
#* NOTE: Do not add dimensional constraints at this time.
# Close the Sketch.
# Close the Sketch.
# Revolve the Sketch around the vertical Sketch axis and hit "OK" to exit.
# [[Image:PartDesign_Revolution.svg|16px]] [[PartDesign_Revolution|Revolve]] the Sketch around the vertical Sketch axis.
# Open the [[Image:Workbench_Path.svg|16px]] [[Path_Workbench|Path Workbench]].
# Return to the Combo View window in the File Tree and click the arrow to the left of the Revolution so you see the embedded Sketch.
# Select the Sketch in the [[Tree_view|Tree view]]. This ensures that the PropertyBag created in the next step will be nested in the Body.
#* Highlight the Sketch in the FileTree Window.
# Select the {{MenuCommand|Path → Utils → PropertyBag}} option from the menu.
# Navigate to the [[Image:Workbench_Path.svg|24px]] [[Path_Workbench|Path Workbench]].
# A PropertyBag named {{Value|Attributes}} is created. This PropertyBag will be used to control the dimensions in the Sketch.
# With the Sketch still highlighted, go to the Menu>Path>Utils and select PropertyBag
# Double-click the PropertyBag in the [[Tree_view|Tree view]].
# An "Attributes" icon in the FileTree will be created below Sketch in the Combo View window which is the "PropertyBag" that controls variables within the Sketch.
# The {{MenuCommand|Property Bag}} task panel opens.
# Double click "Attributes" icon in the File Tree to open the Property Bag window.
# Click "Add..." button.
# Click the {{Button|Add...}} button.
# The {{MenuCommand|Create Property}} dialog opens.
# Create one variable called "Diameter" in the Name Field (a variable named "Diameter" is mandatory for Toolbits). All variables are case-sensitive and may not contain spaces.
# Create a property named {{Value|Diameter}}. This property is mandatory for ToolBits. Property names are case-sensitive and may not contain spaces.
# Type "Shape" in the Group Field.
# Select the appropriate variable type.
# Select {{Value|Shape}} from the {{MenuCommand|Group}} dropdown list.
# Select the appropriate {{MenuCommand|Type}}.
#* ToolTip comments is an optional field.
# Optionally specify a {{MenuCommand|ToolTip}}.
# Click "OK".
# Click the {{Button|OK}} button.
# In the Property Bag window, enter the Value (diameter) you assigned to the "Diameter" property.
# In the {{MenuCommand|Property Bag}} task panel enter a value for the '''Diameter''' property.
#* Add as many Property variables as needed to fully define your Sketch. This includes entering all required dimensions, angles etc. until all fields are completed.
# Similarly add all other required properties.
#* If you have FreeCad set up to work in metric units, you can still enter dimensions in inches units if you desire. FreeCad will change "in" to "mm" automatically.
# Click "OK" when done.
# Click the {{Button|OK}} button in the {{MenuCommand|Property Bag}} task panel when done.
# Double-click the Sketch in the [[Tree_view|Tree view]].
# Return to the [[Image:Workbench_Sketcher.svg|24px]] Sketch Workbench to edit the ToolBit. (You may double click "Sketch" listed under "Revolution" in the Combo View File Tree.)
# Add dimensional constraints and apply the properties from the created PropertyBag. For example to apply the '''Diameter''' property:
# Constrain the dimensions within the Sketch using the Property Bag you made in steps above.
## Double-click a dimension.
#* Select a feature such as a line, arc or points in the drawing. Assign a length, radius, dimension etc to the feature as to apply a constraint.
## Click the [[Image:Bound-expression.svg|16px]] icon.
#* When assigning a value to the feature, click on the little round blue circle instead of entering the value directly. This is where you can invoke the attributes assigned to your recently created PropertyBag.
## Enter {{Value|<<Attributes>>.Diameter}} in the {{MenuCommand|Formula editor}}.
#* A formula Editor will open and type in in the following: "<<Attributes>>.Diameter" (or your appropriate variable name) and hit the "OK" button.
## Click the {{Button|OK}} button twice.
#* The Length field will be greyed out indicating that the field is a fixed constraint in the Attributed Property Bag. Also, the constrained dimensions will be colored Orange indicating that the parameters are kept in an external Property Bag.
#* Repeat the above constraint assignment procedure above until the Sketch is fully constrained.
# Repeat this until the Sketch is fully constrained.
#Save the file as a *.FCStd file where Freecad expects to find ToolBit Shape files. By default, it is in C://Program Files/Freecad 0.19) >Mod>Path>Tools>Shape in Windows 10.
# Save the {{FileName|FCStd}} file where FreeCAD expects to find ToolBit files. See [[#Description|Description]] above.

#* EndNote 1. If you are denied access to this file in Windows, start FreeCad in ADMINISTRATOR mode and it will allow access to the folder. You are finally done! Use this new custom built ToolShape in the normal fashion in addition to the standard ToolBits using the PATH workbench.
<!--T:15-->
#* EndNote 2. The BODY of the Toolbit MUST be listed FIRST in the Combo View FileTree hierarchical structure. These instructions will produce this important structural order to create a successful ToolBit Shape.
* Note 1. If you are denied access to the folder on Windows, start FreeCAD in ADMINISTRATOR mode.
* Note 2. The Body of the ToolBit must be the first object in the [[Tree_view|Tree view]]. These instructions ensure that this is the case.


== Tool Thumbnail Images == <!--T:10-->
== Tool Thumbnail Images == <!--T:10-->


<!--T:11-->
<!--T:11-->
Toolbits will have a small icon image of the tool in the tree if the image is saved with thumbnails active.
ToolBits will have a small icon image of the tool in the [[Tree_view|Tree view]] if the file is saved with thumbnails active.


<!--T:12-->
<!--T:12-->
Line 96: Line 96:
* Also make sure to switch to Front View and Fit content to screen
* 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 the template
* Whatever you see when saving the document will end up being the visual representation of the template

== Options == <!--T:13-->





Revision as of 14:39, 15 April 2022

Other languages:

Description

ToolShapes are a core part of the Path Tools system. ToolShapes are the templates from which ToolBits are created. They represent the specific physical shape of a tool. A ToolShape does not completely describe the bit - for that some additional parameters are needed which will be added when an actual bit is parameterized from the template.

Initially ToolShapes are just FreeCAD documents with a single Body created from the Part Design workbench.

Creating new ToolShapes is an advanced topic. The most commonly needed ToolShapes already exist and are provided with the FreeCAD installation at:

  • On Linux it is usually /usr/lib64/FreeCAD/Mod/Path/Tools/Shape
  • On Windows it is usually C:\Program Files\FreeCAD\Mod\Path\Tools\Shape
  • On macOS it is usually /Applications/FreeCAD/Mod/Path/Tools/Shape

They are:

ballend.fcstd
bullnose.fcstd
chamfer.fcstd
drill.fcstd
endmill.fcstd
probe.fcstd
slittingsaw.fcstd
thread-mill.fcstd
v-bit.fcstd

These can be found in the /Mod/Path/Tools/Shape/ subdirectory where FreeCAD was installed.

Usage

  1. Create a new FreeCAD document.
  2. Open the PartDesign Workbench.
  3. Create a Body and give the Body a label you want to show up in the bit selection.
  4. Create a Sketch on the XZ plane and draw half the profile of the bit.
  5. Constrain the bottom most center of the bit on the origin (0,0). This will be the center of the axis on which the G-code will rotate the bit.
    • Note: Do not add dimensional constraints at this time.
  6. Close the Sketch.
  7. Revolve the Sketch around the vertical Sketch axis.
  8. Open the Path Workbench.
  9. Select the Sketch in the Tree view. This ensures that the PropertyBag created in the next step will be nested in the Body.
  10. Select the Path → Utils → PropertyBag option from the menu.
  11. A PropertyBag named Attributes is created. This PropertyBag will be used to control the dimensions in the Sketch.
  12. Double-click the PropertyBag in the Tree view.
  13. The Property Bag task panel opens.
  14. Click the Add... button.
  15. The Create Property dialog opens.
  16. Create a property named Diameter. This property is mandatory for ToolBits. Property names are case-sensitive and may not contain spaces.
  17. Select Shape from the Group dropdown list.
  18. Select the appropriate Type.
  19. Optionally specify a ToolTip.
  20. Click the OK button.
  21. In the Property Bag task panel enter a value for the Diameter property.
  22. Similarly add all other required properties.
  23. Click the OK button in the Property Bag task panel when done.
  24. Double-click the Sketch in the Tree view.
  25. Add dimensional constraints and apply the properties from the created PropertyBag. For example to apply the Diameter property:
    1. Double-click a dimension.
    2. Click the icon.
    3. Enter <<Attributes>>.Diameter in the Formula editor.
    4. Click the OK button twice.
  26. Repeat this until the Sketch is fully constrained.
  27. Save the FCStd file where FreeCAD expects to find ToolBit files. See Description above.
  • Note 1. If you are denied access to the folder on Windows, start FreeCAD in ADMINISTRATOR mode.
  • Note 2. The Body of the ToolBit must be the first object in the Tree view. These instructions ensure that this is the case.

Tool Thumbnail Images

ToolBits will have a small icon image of the tool in the Tree view if the file is saved with thumbnails active.

Important notes:

  • 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 the template