Path Workbench: Difference between revisions

From FreeCAD Documentation
(Marked this version for translation)
(Marked this version for translation)
(41 intermediate revisions by 10 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<!--T:86-->
{{docnav|[[PartDesign Workbench|PartDesign Workbench]]|[[Plot Workbench|Plot Workbench]]|IconL=Workbench_PartDesign.svg|IconR=Workbench_Plot.svg}}

</translate>
[[Image:Path-Workbench.svg|64px]]

<translate>
<translate>
== Introduction == <!--T:1-->
== Introduction == <!--T:1-->
Line 5: Line 13:
The Path workbench is used to produce machine instructions for [https://en.wikipedia.org/wiki/CNC_router CNC machines] from a FreeCAD 3D model. These produce real-world 3D objects on CNC machines such as mills, lathes, lasercutters, or similar. Typically, instructions are a [https://en.wikipedia.org/wiki/G-Code G-Code] dialect.
The Path workbench is used to produce machine instructions for [https://en.wikipedia.org/wiki/CNC_router CNC machines] from a FreeCAD 3D model. These produce real-world 3D objects on CNC machines such as mills, lathes, lasercutters, or similar. Typically, instructions are a [https://en.wikipedia.org/wiki/G-Code G-Code] dialect.


</translate>

{{TOCright}}
<translate>
<!--T:17-->
<!--T:17-->
[[Image:pathwb.png|frameless|center|upright=2.8]]
[[Image:pathwb.png|none|600px]]



<!--T:3-->
<!--T:3-->
Line 16: Line 25:
* Tools are selected as required by the Job Operations.
* Tools are selected as required by the Job Operations.
* Milling paths are created using e.g. [[Path_Profile|Contour]] and [[Path_Pocket_3D|Pocket]] Operations. These [[Path objects|Path objects]] use internal FreeCAD G-Code dialect, independent of the CNC machine.
* Milling paths are created using e.g. [[Path_Profile|Contour]] and [[Path_Pocket_3D|Pocket]] Operations. These [[Path objects|Path objects]] use internal FreeCAD G-Code dialect, independent of the CNC machine.
* Export the job with a g-code, matching to your machine.
* Export the job with a g-code, matching to your machine. This step is called ''post processing''; there are different post processors available.



=== Links for the impatient === <!--T:18-->
=== Links for the impatient === <!--T:18-->
Line 30: Line 38:


== General concepts == <!--T:20-->
== General concepts == <!--T:20-->
The Path Workbench generates G-Code defining the paths required to mill the Project represented by the 3D model on the target mill—in [[https://www.freecadweb.org/wiki/Path_scripting#FreeCAD.27s_internal_GCode_format the Path Job Operations FreeCAD G-Code dialect ]], which is later translated to the appropriate dialect for the target CNC controller by selecting the appropriate Postprocessor.
The Path Workbench generates G-Code defining the paths required to mill the Project represented by the 3D model on the target mill in [https://www.freecadweb.org/wiki/Path_scripting#FreeCAD.27s_internal_GCode_format the Path Job Operations FreeCAD G-Code dialect], which is later translated to the appropriate dialect for the target CNC controller by selecting the appropriate postprocessor.
The G-Code is generated from directives and Operations contained in a Path Job. The Job Workflow lists these in the order they will be executed. The list is populated by adding Path Operations, Path Dressups, Path Partial Commands, and Path Modifications—from the Path Menu, or GUI buttons.
The G-Code is generated from directives and Operations contained in a Path Job. The Job Workflow lists these in the order they will be executed. The list is populated by adding Path Operations, Path Dressups, Path Partial Commands, and Path Modifications from the Path Menu, or GUI buttons.


<!--T:22-->
<!--T:22-->
Line 39: Line 47:
<!--T:23-->
<!--T:23-->
The Path Workbench has external dependencies including:
The Path Workbench has external dependencies including:
# The FreeCAD 3D model units are defined in the Edit-> Preference...->General->Units tab's Units settings. The Postprocessor configuration defines the final G-Code units.
# The FreeCAD 3D model units are defined in the {{MenuCommand|Edit PreferenceGeneralUnits tab's Units settings}}. The Postprocessor configuration defines the final G-Code units.
# The Macro file path, and Geometric tolerances, are defined in the Edit->Preferences...->Path->Job Preferences tab.
# The Macro file path, and Geometric tolerances, are defined in the {{MenuCommand|EditPreferencesPathJob Preferences}} tab.
# Colors are defined in the Edit->Preferences...->Path->Path colors tab.
# Colors are defined in the {{MenuCommand|EditPreferencesPathPath colors}} tab.
# Holding tag parameters are defined in the Edit->Preferences...->Path->Dressups tab.
# Holding tag parameters are defined in the {{MenuCommand|EditPreferencesPathDressups}} tab.
# That the Base 3D model quality supports the Path WB requirements—passes Check Geometry.
# That the Base 3D model quality supports the Path WB requirements, passes Check Geometry.

== Limitations == <!--T:91-->

<!--T:92-->
Most of the Path Tools are not true 3D tools but only 2.5D capable. This means that they take a fixed 2D shape and can cut it down to a given depth. There are two tools which produce true 3D paths, one of which is still experimental ( December 2019 ).
There are currently no tools to face-mill a vertical face or to cut vertical non planar surfaces of a model.


== Units == <!--T:78-->
== Units == <!--T:78-->
Line 71: Line 85:


==Path Commands== <!--T:37-->
==Path Commands== <!--T:37-->
Many of the commands have various heights and depths:
[[File:Path-DepthsAndHeights.gif|center]]
{{Caption|Visual reference for Depth properties (settings)}}



<!--T:38-->
<!--T:38-->
Line 110: Line 128:
<!--T:50-->
<!--T:50-->
* [[Image:Path_Drilling.png|32px]] [[Path_Drilling|Drilling]]: Performs a drilling cycle
* [[Image:Path_Drilling.png|32px]] [[Path_Drilling|Drilling]]: Performs a drilling cycle

<!--T:90-->
* [[Image:Path-Adaptive.svg|32px]] [[Path_Adaptive|Adaptive]]: Creates an adaptive clearing and profiling operation


<!--T:51-->
<!--T:51-->
Line 124: Line 145:


===Path Dressup=== <!--T:55-->
===Path Dressup=== <!--T:55-->


<!--T:93-->
* [[Image:Path_DressupDogbone.png|32px]] [[Path_DressupBoundary|Boundary Dressup]]: Adds a boundary dressup modification to a selected path


<!--T:56-->
<!--T:56-->
* [[Image:Path_Dressup.png|32px]] [[Path_DressupDogbone|Dogbone Dressup]]: Adds a dogbone dressup modification to a selected path
* [[Image:Path_DressupDogbone.png|32px]] [[Path_DressupDogbone|Dogbone Dressup]]: Adds a dogbone dressup modification to a selected path


<!--T:57-->
<!--T:57-->
* [[Image:Path_Dressup.png|32px]] [[Path_DressupDragKnife|Dragknife Dressup]]: Adds a dragknife dressup modification to a selected path
* [[Image:Path_DressupDragKnife.png|32px]] [[Path_DressupDragKnife|Dragknife Dressup]]: Adds a dragknife dressup modification to a selected path


<!--T:58-->
<!--T:58-->
* [[Image:Path_Dressup.png|32px]] [[Path_DressupLeadInOut|Lead In Dressup]]: Adds a lead-in and/or lead-out point to a selected path
* [[Image:Path_DressupLeadInOut.png|32px]] [[Path_DressupLeadInOut|Lead In Dressup]]: Adds a lead-in and/or lead-out point to a selected path


<!--T:59-->
<!--T:59-->
* [[Image:Path_Dressup.png|32px]] [[Path_DressupRampEntry|Ramp Entry Dressup]]: Adds ramp entry dressup modification to a selected path
* [[Image:Path_DressupRampEntry.png|32px]] [[Path_DressupRampEntry|Ramp Entry Dressup]]: Adds ramp entry dressup modification to a selected path


<!--T:60-->
<!--T:60-->
* [[Image:Path_Dressup.png|32px]] [[Path_DressupTag|Tag Dressup]]: Adds a holding tag dressup modification to a selected path
* [[Image:Path_DressupTag.png|32px]] [[Path_DressupTag|Tag Dressup]]: Adds a holding tag dressup modification to a selected path


===Partial Commands=== <!--T:61-->
===Partial Commands=== <!--T:61-->
Line 156: Line 181:
<!--T:68-->
<!--T:68-->
* [[Image:Path_GcodeFromShape.png|32px]] [[Path_FromShapes|Gcode From a Shape]]: Creates a path object from a selected Part object
* [[Image:Path_GcodeFromShape.png|32px]] [[Path_FromShapes|Gcode From a Shape]]: Creates a path object from a selected Part object

<!--T:89-->
* [[Image:Path_OpActive.svg|32px]] [[Path_OpActive|Op Active]]: Used to activate or de-activate a path operation


===Path Modification=== <!--T:69-->
===Path Modification=== <!--T:69-->


<!--T:70-->
<!--T:70-->
* [[Image:Path_Copy.png|32px]] [[Path_Copy|Copy]]: Creates a parametric Copie of a selected path object
* [[Image:Path_Copy.png|32px]] [[Path_Copy|Copy]]: Creates a parametric Copy of a selected path object


<!--T:71-->
<!--T:71-->
Line 171: Line 199:


<!--T:74-->
<!--T:74-->
* [[Image:Path-3DSurface.png|32px]] [[Path_Surface|3D Surface]]: Creates a path for a 3D surface
* [[Image:Path-3DSurface.png|32px]] [[Path_3DSurface|3D Surface]]: Creates a path for a 3D surface ( experimental , December 2019 )


<!--T:75-->
<!--T:75-->
Line 181: Line 209:
<!--T:77-->
<!--T:77-->
* [[File:Path_Sanity.png|32px]] [[Path_Sanity|Path Errors]]: Checks the selected Job for missing values
* [[File:Path_Sanity.png|32px]] [[Path_Sanity|Path Errors]]: Checks the selected Job for missing values

<!--T:88-->
* [[Fourth Axis]]: Developmental four axis milling

===Preferences=== <!--T:83-->

<!--T:84-->
* [[Image:Std_DlgParameter.png|32px]] [[Path_Preferences|Preferences...]]: Preferences disposable in Path Tools.


== Scripting == <!--T:12-->
== Scripting == <!--T:12-->

<!--T:85-->
See the [[Path scripting]] page.


<!--T:13-->
<!--T:13-->
The Path workbench offers a broad [[Path scripting|python scripting API]]. With it, you can create and modify paths from python scripts, or extend the available functionality of the workbench.
The Path workbench offers a broad [[Python]] scripting API. With it, you can create and modify paths from python scripts, or extend the available functionality of the workbench.


== FAQ == <!--T:14-->
== FAQ == <!--T:14-->


<!--T:35-->
<!--T:35-->
[[Path_FAQ|FAQ]]
See the [[Path FAQ]]


<!--T:33-->
<!--T:33-->
Line 196: Line 235:


<!--T:34-->
<!--T:34-->
{{docnav|[[PartDesign Workbench|PartDesign Workbench]]|[[Plot Workbench|Plot Workbench]]|IconL=Workbench_PartDesign.svg|IconR=Workbench_Plot.svg}}
[[Category:User Documentation]]

<!--T:87-->
{{Userdocnavi}}
[[Category:Path]]
[[Category:Workbenches]]



</translate>
</translate>
{{clear}}
{{clear}}
<languages/>

Revision as of 10:33, 10 December 2019

Introduction

The Path workbench is used to produce machine instructions for CNC machines from a FreeCAD 3D model. These produce real-world 3D objects on CNC machines such as mills, lathes, lasercutters, or similar. Typically, instructions are a G-Code dialect.

The FreeCAD Path Workbench workflow creates these machine instructions as follows:

  • A 3D model is the base object, typically created using one or more of the Part Design, Part or Draft Workbenches.
  • A Job is created in Path Workbench. This contains all the information required to generate the necessary G-Code to process the Job on a CNC mill: there is Stock material, the mill has a certain set of tools and it follows certain commands controlling speed and movements (usually G-Code).
  • Tools are selected as required by the Job Operations.
  • Milling paths are created using e.g. Contour and Pocket Operations. These Path objects use internal FreeCAD G-Code dialect, independent of the CNC machine.
  • Export the job with a g-code, matching to your machine. This step is called post processing; there are different post processors available.

Links for the impatient

Depending on your interest in the Path workbench there are different topics for further reading:

  • If you are a new new user trying to get familiar with Path, you might be interested in a fast walk-through tutorial.
  • If you have a special machine which cannot use one of the available postprocessors you may want to learn about post-processor customization
  • As an experienced user you may want to write a macro or automate a process might need to learn about scripting
  • Power users who want to streamline their workflow can learn about customization.
  • New developers who want to contribute to path might want to understand core concepts.

General concepts

The Path Workbench generates G-Code defining the paths required to mill the Project represented by the 3D model on the target mill in the Path Job Operations FreeCAD G-Code dialect, which is later translated to the appropriate dialect for the target CNC controller by selecting the appropriate postprocessor.

The G-Code is generated from directives and Operations contained in a Path Job. The Job Workflow lists these in the order they will be executed. The list is populated by adding Path Operations, Path Dressups, Path Partial Commands, and Path Modifications from the Path Menu, or GUI buttons.

The Path Workbench provides a Tool Manager (Library, Tool-Table), and G-Code Inspection, and Simulation tools. It links the Postprocessor, and allows importing and exporting Job Templates.

The Path Workbench has external dependencies including:

  1. The FreeCAD 3D model units are defined in the Edit → Preference → General → Units tab's Units settings. The Postprocessor configuration defines the final G-Code units.
  2. The Macro file path, and Geometric tolerances, are defined in the Edit → Preferences → Path → Job Preferences tab.
  3. Colors are defined in the Edit → Preferences → Path → Path colors tab.
  4. Holding tag parameters are defined in the Edit → Preferences → Path → Dressups tab.
  5. That the Base 3D model quality supports the Path WB requirements, passes Check Geometry.

Limitations

Most of the Path Tools are not true 3D tools but only 2.5D capable. This means that they take a fixed 2D shape and can cut it down to a given depth. There are two tools which produce true 3D paths, one of which is still experimental ( December 2019 ). There are currently no tools to face-mill a vertical face or to cut vertical non planar surfaces of a model.

Units

Unit handling in Path can be confusing. There are several points to understand:

  1. FreeCAD base units for length and time are 'mm' and 's' respectively. Velocity is thus 'mm/s'. This is what FreeCAD stores internally regardless of anything else
  2. The default unit schema uses the default units. If you're using the default schema and you enter a feed rate without a unit string, it will get entered as 'mm/s'
  3. Most CNC machines expect feed rate in the form of either 'mm/min' or 'in/min'. Most post-processors will automatically convert the unit when generating gcode.

Schemas:

  1. Changing schema in preferences changes default unit string for the input fields. If you're a Path user and prefer to design in metric, it's highly recommended that you use the "Metric Small Parts & CNC" schema. If you design in US units, either the Imperial Decimal and Building US will work
  2. Changing your preferred unit schema will have no effect on output but will help avoid input errors

Output:

  1. Generating the correct unit in output is the responsibility of the post-processor and is done only at that time
  2. Machine output unit is completely unrelated to your selected unit schema
  3. Post-processors produce either metric (G21) output, Imperial (G20) output or are configurable.
  4. Configurable post-processors default to metric (G21)
  5. If you want your configurable post-processor to output imperial gcode (G20), Set the correct argument in your job output configation (ie --inches for linuxcnc). This can be stored in a job template and set as your default template to make it automatic for all future jobs

Path Inspection:

  1. If you use the Path Inspect tool to look at g-code, you will see it in 'mm/s' because it is not being post-processed

Path Commands

Many of the commands have various heights and depths:

Visual reference for Depth properties (settings)


These commands are used for seting up a CNC project and manage your templates.

  • Job: Creates a new CNC job
  • Simulator: Shows the milling operation like it's done on the machine
  • Pocket: Creates a pocketing operation from one ore more selected pocket(s)
  • Helix: Creates a helical path

Path Dressup

  • Tag Dressup: Adds a holding tag dressup modification to a selected path

Partial Commands

  • Fixture: Changes the fixture position
  • Comment: Inserts a comment in the G-code of a path
  • Stop: Inserts a full stop of the machine
  • Custom: Inserts custom G-code
  • Op Active: Used to activate or de-activate a path operation

Path Modification

  • Copy: Creates a parametric Copy of a selected path object
  • Array: Creates an array by duplicating a selected path
  • Simple Copy: Creates a non-parametric copy of a selected path object

Other

  • 3D Surface: Creates a path for a 3D surface ( experimental , December 2019 )
  • Path Errors: Checks the selected Job for missing values

Preferences

Scripting

See the Path scripting page.

The Path workbench offers a broad Python scripting API. With it, you can create and modify paths from python scripts, or extend the available functionality of the workbench.

FAQ

See the Path FAQ

The Path Workbench shares many concepts with other CAM software packages but has its own peculiarities. If something seems wrong, this might be a good place to start.