First Steps with Path WB

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

First Steps with Path WB

Post by chrisb »

I have started documenting the first steps in the path WB. It is a walk through from the definition of a job to the generation of gcode. It could be the beginning of Path WB documention in the wiki, but I want to discuss it first here. If useful it can be pinned as a Path forum topic. I will update the first post according to your comments so that the information stays concisely together and is easy to find for newcomers.
I would have liked to make the screenshots on my linux system but the monitor gave up recently.

----------------
The following description is valid for FreeCAD 0.17.9508
uses the menu entries. Of course - if available - the actions can be triggered by their icons as well. Since the icons are included in the menu they can easyly be identified.

Let's assume you have created a model with a cube and a pocket, and you have the Path Working Bench selected.
Create a Job for path operations
All Path actions are collected under a job element. So there is no path without a job.
  • Menu->Path->Job
  • select the body as a Base Object
    pathJobGeneral.png
    pathJobGeneral.png (25.49 KiB) Viewed 5038 times
  • click the Post Processor tab
    The postprocessor file contains information about your machine and generates specific code for it.
    pathJobPostProcessor.png
    pathJobPostProcessor.png (23.75 KiB) Viewed 5038 times
    • enter the name of the Output File, i.e. the filename for the generated gcode. E.g. /tmp/myFirstPocket.gcode
    • select a Post Processor, e.g. generic
  • click OK
So now you have a job and a machine but you don't have any tools. This will be our next target.

Setup and usage of the tool table
  • Menu->Path->Edit the Tool Library
  • Click the "New Tool" button
  • Enter at least a name and a diameter
    As an example we create two endmills with a diameter of 3 and 5 mm
  • When you have defined all your tools click "Export..." and save your tooltable in a file. You can share the same tooltable between different FreeCAD installations by importing it.
pathTooltable.png
pathTooltable.png (72.35 KiB) Viewed 5038 times

You might have more tools in your tooltable than you need for your workpiece, at least I hope it is not vice versa. You can define, which tools to use for your job.
  • Select the tools for your job with the checkboxes at the left.
  • Click the "Copy checked tools ..."-button between the two lists and add the selected tools to your job.
    If you have selected only one tool, it is probably the one you want to use next. Then it is sensible to check the "Create tool controllers" checkbox and delete the default tool controller.
    pathToolAdd.png
    pathToolAdd.png (22.01 KiB) Viewed 5038 times
Setup of a tool controller
This is usually the first step in a job.
  • Menu->Path->Add Tool Controller to the Job
  • Double click on the new tool controller in the tree, this opens the dialog for the configuration of the tool controller
    • select one of the tools in the job,
    • edit the feed and speed rates,
    • select the spindle's turning direction
    • click OK
When you configure your own tool controller you can delete the automatically created default tool controller
pathTC.png
pathTC.png (32.92 KiB) Viewed 5038 times

Now you are ready to create your first path. The next post will cover this, forum restrictions permit only 5 images
Last edited by chrisb on Wed Jan 04, 2017 11:34 pm, edited 1 time in total.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: First Steps with Path WB

Post by chrisb »

The following description is valid for FreeCAD 0.17.9508

Creating a path for a pocket
This is the result we want to achieve, a cube with a pocket:
pathPocketResult.png
pathPocketResult.png (15.71 KiB) Viewed 5016 times
  • select the bottom of the pocket
    Warning: Watch out, on some systems the measures in the subdialogs get multiplied with 10 each time on opening. Correct them before continuing.
  • Menu->Path->Pocket
  • Leave the Base Geometry tab as is.
  • In the Depths tab you may want to change the step down depth.
    pathPocketDepth.png
    pathPocketDepth.png (23.32 KiB) Viewed 5016 times
  • In the Pattern tab you may want to change the overlap between passes from 100% to some smaller value
    pathPocketPattern.png
    pathPocketPattern.png (19.76 KiB) Viewed 5016 times
  • Confirm with OK and you are done
You can now
  • preview the code with Menu->Path->Inspect GCode
  • Select the Job (this selection is important!) and create the output file with Menu->Path->Post Process.
The Result depends on the post processor and can look like this:

Code: Select all

%PM
N9XXX (, 2017-01-05 00:47)
N1 ()
N2 (Exported by FreeCAD)
N3 (Post Processor: PathScripts.generic_post)
N4 (Target machine: Maho 600E)

N5 (TC: 5mm endmill)
N6 M66 T1
N7 M3 S800
N8 ()
N9 (Pocket001 :TC)
N10 G00 Y15.000
N11 X8.500 Z8.500
N12 Y23.000
N13 G01 Y8.000 F50.00
N14 X11.500    F100.00
N15    Z11.500   
N16 X8.500      
N17    Z8.500   
N18 G00 Y15.000
N19 X6.500 Z6.500
N20 Y23.000
N21 G01 Y8.000 F50.00
N22 X13.500    F100.00
N23    Z13.500   
N24 X6.500      
N25    Z6.500   
N26 G00 Y15.000
N27 X4.500 Z4.500
N28 Y23.000
N29 G01 Y8.000 F50.00
N30 X15.500    F100.00
N31    Z15.500   
N32 X4.500      
N33    Z4.500   
N34 G00 Y15.000
N35   
N36 X8.500 Z8.500
N37 Y21.000
N38 G01 Y6.000 F50.00
N39 X11.500    F100.00
N40    Z11.500   
N41 X8.500      
N42    Z8.500   
N43 G00 Y15.000
N44 X6.500 Z6.500
N45 Y21.000
N46 G01 Y6.000 F50.00
N47 X13.500    F100.00
N48    Z13.500   
N49 X6.500      
N50    Z6.500   
N51 G00 Y15.000
N52 X4.500 Z4.500
N53 Y21.000
N54 G01 Y6.000 F50.00
N55 X15.500    F100.00
N56    Z15.500   
N57 X4.500      
N58    Z4.500   
N59 G00 Y15.000
N60   
N61 X8.500 Z8.500
N62 Y19.000
N63 G01 Y5.000 F50.00
N64 X11.500    F100.00
N65    Z11.500   
N66 X8.500      
N67    Z8.500   
N68 G00 Y15.000
N69 X6.500 Z6.500
N70 Y19.000
N71 G01 Y5.000 F50.00
N72 X13.500    F100.00
N73    Z13.500   
N74 X6.500      
N75    Z6.500   
N76 G00 Y15.000
N77 X4.500 Z4.500
N78 Y19.000
N79 G01 Y5.000 F50.00
N80 X15.500    F100.00
N81    Z15.500   
N82 X4.500      
N83    Z4.500   
N84 G00 Y15.000
N85 M30
Last edited by chrisb on Wed Jan 04, 2017 11:55 pm, edited 2 times in total.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: First Steps with Path WB

Post by sliptonic »

I've wrestled with how to be helpful in getting people started without either wasting effort or confusing them down the road.

The problem is that the GUI for Path is still changing really fast and frequently and sometimes in very significant ways. Even now, I'm in the process of making a really large change to the Tool Library manager. It'll add some nice features but invalidate part of your documentation.

I don't want to dissuade you from doing this but I also don't want to increase confusion when things change. So I guess I'd suggest keeping the posts small and focused and maybe tag them with a commit ID.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: First Steps with Path WB

Post by chrisb »

sliptonic wrote:I've wrestled with how to be helpful in getting people started without either wasting effort or confusing them down the road.

The problem is that the GUI for Path is still changing really fast and frequently and sometimes in very significant ways. Even now, I'm in the process of making a really large change to the Tool Library manager. It'll add some nice features but invalidate part of your documentation.

I don't want to dissuade you from doing this but I also don't want to increase confusion when things change. So I guess I'd suggest keeping the posts small and focused and maybe tag them with a commit ID.
I hope it doesn't upset you, that I started a documentation topic while the development is still in process. I knew it might change and I will try to keep it up-to-date. I added the current commit id and when things change we can invalidate the posts immediately until they are updated. I had thought about waiting but it is like buying a new computer: waiting for another month will lower the price again or increase the revenue. But waiting too long lets you work always on an old machine.

While you talk about the tooltable: I found a minor bug, when you copy the selected tools to the job. If I cancel the subdialog the tool controllers are added anyway and the job stays in edit mode.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: First Steps with Path WB

Post by sliptonic »

chrisb wrote: I hope it doesn't upset you, that I started a documentation topic while the development is still in process.
Not in the slightest :D Very happy to have any contribution.

I think that larger, more comprehensive efforts at documentation like this should definitely be in the wiki but I'm totally cool with a thread on the forum either in the path section or the wiki section to discuss.
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: First Steps with Path WB

Post by herbk »

Hi Chris,

if you make a doku' for path, please do it in a way that the produced gcode works on the machine without problems. ;)
First step always must be the parts placement on the machine table. A placement like on the picture can cutt of the left lower corner of the part or crash the tool to the part, because the part is placed on X0 Y0.

As i wrote somewhere else before: Its important to know the machine, its workspace and used tools before you create any path, especially if you have a well configured router.
Both machines which I work with, are setting automaticly its "0 points" and have a "0 point" for the material. So the handling of the machine ist very easy: switch it on and place the materials left lower corner to the left lower corner of the machine table.

If you create a outline path for the part on the picture, it will result i an gcode with some -x/y points. A gcode with - points will never be accepted from linuxcnc or an other, only semiprofessional, postprozessor, because a machine never can run lower than 0, - lower 0 comes crash... ;) ;)
Gruß Herbert
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: First Steps with Path WB

Post by chrisb »

herbk wrote: As i wrote somewhere else before: Its important to know the machine, its workspace and used tools before you create any path, especially if you have a well configured router.
Both machines which I work with, are setting automaticly its "0 points" and have a "0 point" for the material. So the handling of the machine ist very easy: switch it on and place the materials left lower corner to the left lower corner of the machine table.

If you create a outline path for the part on the picture, it will result i an gcode with some -x/y points. A gcode with - points will never be accepted from linuxcnc or an other, only semiprofessional, postprozessor, because a machine never can run lower than 0, - lower 0 comes crash... ;) ;)
What you describe is (perhaps) a question of the post processor. My machine and the corresponding workflow is the other way round: I mount the material on the table and then I position the machine and set it to zero. If I am doing something symmetric I definitely want to have the possibility to enter negative values.
The positioning is something outside the gcode generation. There are even edge finder tools to support this operation. They would be completely useless if I could always know where my workpiece is on the table.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: First Steps with Path WB

Post by sliptonic »

herbk wrote:
If you create a outline path for the part on the picture, it will result i an gcode with some -x/y points. A gcode with - points will never be accepted from linuxcnc or an other, only semiprofessional, postprozessor, because a machine never can run lower than 0, - lower 0 comes crash... ;) ;)
Not true. LinuxCNC/Machinekit handle negative XY values just fine. Negative Z as well. I routinely position my parts in the +X-Y quadarant so they align with the milling vise for touchoff.
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: First Steps with Path WB

Post by herbk »

Hi sliptonic,
in that time path WB produces gcode with a G00 X-1.0 Y1.0 comand in the postamble.
If i not change the X-1.0 to 0 (or higher), linuxcnc gives me a warning about a path over the limits.
You are right, i can ignore that. But if i do so, and have a machine setup like mine, where the mechanical limit is realy close to the softlimit i run in problems.

My machine (a router) works like that:
I switch it on and make a calibration run. This run sets the 0 pionts for X, Y, Z by runing on the limit switches. The way from touching the limit switch to the mechanicel "touch" is 1mm.
After changing the tool ( on my own machine i have to do manuell) i run the Z axis down to the table to set the touch off and back to 0.
The sheet of material is always placed on X0, Y0. So it's easy to place a new sheet of material and after changing the tool i have only to adjust the touchoff new.

Around me the most people working with router setups like this
Gruß Herbert
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: First Steps with Path WB

Post by GeneFC »

I chose to set the origin on my 3-axis mill to the center of travel for X and Y, and near the top for Z. That places the origin of the part within the vise zone. Absolutely no problem with LinuxCNC. I typically set my FreeCAD objects to have the origin at the center of the part in X and Y and at the top of the part for Z. Almost all of the Z coordinates and half of the X-Y coordinates then become negative.

All of this is purely arbitrary, but one must be consistent at all steps of the process. A crash will occur only if one does not take care to ensure that all the origins and setups are based on the same choices.

Gene
Last edited by GeneFC on Fri Jan 06, 2017 2:14 am, edited 1 time in total.
Post Reply