Getting started with Path in v0.17

Here's the place for discussion related to CAM/CNC and the development of the Path module.
jcf
Posts: 35
Joined: Tue Nov 15, 2016 10:34 am

Getting started with Path in v0.17

Postby jcf » Sun Nov 20, 2016 2:08 pm

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
Posts: 8
Joined: Wed Feb 11, 2015 3:00 pm

Re: Getting started with Path in v0.17

Postby Bance » Mon Nov 21, 2016 7:33 am

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

Re: Getting started with Path in v0.17

Postby jcf » Fri Nov 25, 2016 8:42 pm

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: 35
Joined: Tue Nov 15, 2016 10:34 am

Re: Getting started with Path in v0.17

Postby jcf » Wed Nov 30, 2016 2:22 pm

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
Posts: 292
Joined: Fri Sep 16, 2016 9:28 pm

Re: Getting started with Path in v0.17

Postby mlampert » Wed Nov 30, 2016 2:56 pm

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.
sliptonic
Posts: 621
Joined: Tue Oct 25, 2011 10:46 pm

Re: Getting started with Path in v0.17

Postby sliptonic » Wed Nov 30, 2016 3:04 pm

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: 35
Joined: Tue Nov 15, 2016 10:34 am

Re: Getting started with Path in v0.17

Postby jcf » Wed Nov 30, 2016 3:57 pm

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: 35
Joined: Tue Nov 15, 2016 10:34 am

Re: Getting started with Path in v0.17

Postby jcf » Thu Dec 01, 2016 9:37 am

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
Posts: 1859
Joined: Tue Mar 17, 2015 9:14 am

Re: Getting started with Path in v0.17

Postby chrisb » Fri Dec 02, 2016 12:27 am

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

Re: Getting started with Path in v0.17

Postby jcf » Sun Dec 11, 2016 9:26 am

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?