Getting started with Path in v0.17

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!
jcf
Posts: 53
Joined: Tue Nov 15, 2016 10:34 am

Getting started with Path in v0.17

Post by jcf »

Hi,
I am new to this forum (and quite new to FreeCAD), so let me do a short presentation: I am an electronics engeneer working as a teacher, with a variety of interests, including programming (in Python).
At our school we have a makerspace, and therein, a CNC machine.
I want to get it going with only Open source software, and after trying out HeeksCAD and some other softs, I came around FreeCAD.
This is a really good piece of software, thanks to all who have contributed!!!

The problem for me (and for others I suppose) is the lack of documentation, especially on the new 0.17 version (which I understand as it is more passionating to do programming than to document it).

I have started to try the different features of the path module, and I think I begin to understand how to start with a 2D sketch and make a contour path or a profile based on edges.
What I have not found out is: how do I make drill holes or an engraving of text.

Can anyone give me a clue or tell me where I have forgotten to look?
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Getting started with Path in v0.17

Post by Bance »

jcf
Posts: 53
Joined: Tue Nov 15, 2016 10:34 am

Re: Getting started with Path in v0.17

Post by jcf »

Thank you!
Meanwhile I did progress somewhat, I succeeded in making G code for contour, profile and engraving, just what I wanted.
I am writing a short document about it, and I will put it on my homepage when it is finished.
JC
jcf
Posts: 53
Joined: Tue Nov 15, 2016 10:34 am

Re: Getting started with Path in v0.17

Post by jcf »

Hi,
I have started to document my test workflow:
http://staff.ltam.lu/feljc/software/cnc ... t_to_g.pdf

but now I ran into difficulties again for the contour path. Maybe this has something to do with dwire versus face. It seems so, because I could do the contour path after upgrading the dwire contour line to a face.

I have another question: I have a modified postprocessing script for linuxcnc in my ~/.FreeCAD/Mod/Path folder.
I copied all the Path folder from /usr/lib/freecad/Mod to this place and edited the linuxcnc.py file.
What does not please me so much is that I have all the other files in my folder, and only one of these is the modified one. Is there no way to have just this file in my home folder? I tried to reconstruct the right folder structure there, but this didn't work.

jc
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Getting started with Path in v0.17

Post by mlampert »

jcf wrote:I have another question: I have a modified postprocessing script for linuxcnc in my ~/.FreeCAD/Mod/Path folder.
I copied all the Path folder from /usr/lib/freecad/Mod to this place and edited the linuxcnc.py file.
What does not please me so much is that I have all the other files in my folder, and only one of these is the modified one. Is there no way to have just this file in my home folder? I tried to reconstruct the right folder structure there, but this didn't work.

jc
It seems all you need is to copy linuxcnc_post.py into your local macro directory and modify it there. The trick is that the file has to end with _post.py. There is no need to copy anything else from the FC directory tree.
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Getting started with Path in v0.17

Post by sliptonic »

jcf wrote:Hi,
I have started to document my test workflow:
http://staff.ltam.lu/feljc/software/cnc ... t_to_g.pdf

but now I ran into difficulties again for the contour path. Maybe this has something to do with dwire versus face. It seems so, because I could do the contour path after upgrading the dwire contour line to a face.
Is there a specific reason that you're building your operations from 2D geometry? I strongly believe that FreeCAD path needs to work well with 2D geometry but the development assumption is that your object model is a 3D solid. By working with solids, it's possible to take guesses at depths and heights and populate the operations with reasonable values.

I know that some people will design in other software and import 2D geometry to build the CAM operations so supporting 2D geometry is a must. Figuring out the right workflow and GUI is difficult with so many different use-cases to consider. That's why the version 0.17 branch is so undocumented right now. We're in the process of figuring this stuff out and much of what you see is experimental and likely to change before an official release.
I have another question: I have a modified postprocessing script for linuxcnc in my ~/.FreeCAD/Mod/Path folder.
I copied all the Path folder from /usr/lib/freecad/Mod to this place and edited the linuxcnc.py file.
What does not please me so much is that I have all the other files in my folder, and only one of these is the modified one. Is there no way to have just this file in my home folder? I tried to reconstruct the right folder structure there, but this didn't work.
jc
You only need to put your post processor into your macro directory. As long as the post follows the naming convention <something>_post.py Path will find it there.
jcf
Posts: 53
Joined: Tue Nov 15, 2016 10:34 am

Re: Getting started with Path in v0.17

Post by jcf »

Just a small thing that also cost me some time: in FreeCAD the feedrate is explicitely noted in mm/s,
The number you enter here, e.g. 20 (mm/s) is output by the linuxcnc post processor just as it is, e.g. F20.
Linuxcnc now interpretes this as 20mm/min, which is wrong.
Wouldn't it be fine to simply omit the unit in FreeCAD, so nobody will be confused with this?
jcf
Posts: 53
Joined: Tue Nov 15, 2016 10:34 am

Re: Getting started with Path in v0.17

Post by jcf »

Is there a specific reason that you're building your operations from 2D geometry?
In fact I started with 3D and, after some frustrating experiences, decided to try with 2D, as I thought this should be simpler.
Another reason is that I want to use my mill a lot for front plates, and not so much for 3D objects (at least at the beginning).

I understand that it is not easy to consider so many use-cases.

Thanks for the info about the post processor! I will try it out.
chrisb
Veteran
Posts: 53937
Joined: Tue Mar 17, 2015 9:14 am

Re: Getting started with Path in v0.17

Post by chrisb »

jcf wrote:Just a small thing that also cost me some time: in FreeCAD the feedrate is explicitely noted in mm/s,
The number you enter here, e.g. 20 (mm/s) is output by the linuxcnc post processor just as it is, e.g. F20.
Linuxcnc now interpretes this as 20mm/min, which is wrong.
Wouldn't it be fine to simply omit the unit in FreeCAD, so nobody will be confused with this?
It sounds like the units problem again, see viewtopic.php?f=15&t=17768&start=30#p142306.
And in FEM Workbench it occurs as well: viewtopic.php?f=10&t=18833.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
jcf
Posts: 53
Joined: Tue Nov 15, 2016 10:34 am

Re: Getting started with Path in v0.17

Post by jcf »

There is another inconsistency:
when I tried to add a tool diameter by Python code (I'm recording and analysing macros to better understand what is happening behind the scene), I found it in the GUI, but multiplied by 10!

It seems to me that the Path module in Python is changing very much for the moment?
I have noticed that the code generated when I record a macro is buggy when I try to execute it again.

To find the bugs I would like to dive deeper into the Path.py code.
Is there a place where I could find helpful documentation?
Post Reply