Path module development

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
User avatar
quick61
Posts: 3804
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Path module development

Postby quick61 » Thu Jan 08, 2015 4:09 pm

Hi guys. It's nice to see the progress on this. Looking a bit better with every git pull. I did find a way to hard crash (Program received signal SIGSEGV, Segmentation fault.) FreeCAD with the Path Pocket command - Make a Pocket with a Torus shape and try to add a path to it. I know your all not really looking for bug reports quite yet, and again as Yorik says, it's always nice to know. Just thought I'd mention it in case you all weren't aware. I'll provide back trace if you all want it.

Also, I noticed that the paths start from the bottom center and go up. Shouldn't they be starting from the top and go down? Maybe I'm not understanding the process and how the paths will end up being used... :?

Question - Has the work on the CAM Workbench been merged into this branch? I didn't compile with CAM because I didn't know for sure and if it should be or shouldn't be turned on in cmake, so I just left it off.

Mark

OS: Kubuntu 14.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4561 (Git)
Branch: path-module
Hash: 718f499b1846d93d7805312dffeb849a61e96d52
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17-dev
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
yorik
Site Admin
Posts: 12214
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels, Belgium
Contact:

Re: Path module development

Postby yorik » Thu Jan 08, 2015 5:29 pm

There will be much more work on the pocket tool, so certainly these issues will end up solved at some point.
quick61 wrote:Question - Has the work on the CAM Workbench been merged into this branch? I didn't compile with CAM because I didn't know for sure and if it should be or shouldn't be turned on in cmake, so I just left it off.
No, actually this module started on very different paradigms...
User avatar
quick61
Posts: 3804
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Path module development

Postby quick61 » Thu Jan 08, 2015 6:59 pm

yorik wrote:There will be much more work on the pocket tool, so certainly these issues will end up solved at some point.
quick61 wrote:Question - Has the work on the CAM Workbench been merged into this branch? I didn't compile with CAM because I didn't know for sure and if it should be or shouldn't be turned on in cmake, so I just left it off.
No, actually this module started on very different paradigms...
Thanks Yorik. You guys keep at it, and I'll keep waiting. Truly appreciate the effort being made here.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
onekk
Posts: 673
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Path module development

Postby onekk » Sat Jan 17, 2015 8:15 am

Hi to all,

I'm interested in a CAM exporter (g-code output) for use it with a future homemade CNC, so i take a look at the CAM module but it seems dead, this part module is the new developing attempt to port this function in FreeCAD?

if yes i could help?
my skills aren't too high end, but i could do this:
1) translate the module gui in italian
2) modify little python code maybe in the postprocessor for GRBL (the open source G-code interpreter for Arduino)
3) come testing as soon as i have the machine up and running.

Thanks for the good work

Carlo (onekk)
Introduzione a FreeCAD in Italiano: https://github.com/onekk/freecad-doc
User avatar
onekk
Posts: 673
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Path module development

Postby onekk » Sat Jan 17, 2015 3:18 pm

Hi to all,
some thinking about freecad path and cam and wishes:

get a working simple gcode output from a 2d part design in which the user could specify:

1) tool diameter (maybe a shape, V ball-nose or cilindrical) for the simple cut a cilindrical one will suffice
2) raw piece dimension (the x,y,x dimension of the raw material)
3) Safe height (to not interfere with the pieces or the fixture)
4) velocity of the motion X-Y (feed rate and overlap of the tool?) Z (step of cut?)

so we will be able to achieve a simple milling operation on "sheet" of metal, plywood, MDF, PCB and so on

This will be a good starting point so a Freecad user could start milling simple things without using other software.
I wonder that this approach will be simple as determining a toolpath "parallel" to the boundary of the 2D sketch and determining the "steps" of the G1 X Y Z motions (and maybe the arcs maybe for the edges).

I have in mind controller lilke LinuxCNC and GRBL with take the simples G-Code command (G0 and G1 in GRBL are the same command) for the hobbistic machine out here.

Then maybe gradually implement some more exotic feature like voronoi or contour optimization for the toolpath and maybe "tool change" that in the actual hobbistic machines is done by generating one g-code file for every tool as far I know there are no automatic tool change in hobbistic machine.

Doing so there are many people who can test the code and increasing the user base of Freecad (the other project as far as i know are stalled or dead)

But this is only a thinking

Carlo D. :D
Introduzione a FreeCAD in Italiano: https://github.com/onekk/freecad-doc
User avatar
yorik
Site Admin
Posts: 12214
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels, Belgium
Contact:

Re: Path module development

Postby yorik » Sat Jan 17, 2015 3:44 pm

The current Path module already implements a great deal of what you are saying.. Check it out!
As for helping, if you can code a bit of python, yes, there is a lot you can do, especially postprocessors...
User avatar
onekk
Posts: 673
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Path module development

Postby onekk » Sat Jan 17, 2015 3:57 pm

Hi yorik, i'm on debian jessie how to find a up to date version of freecad with path module I've looked in /us/lib/freecad/Mod but there is no subdir called path?

Many Thanks

Carlo
Introduzione a FreeCAD in Italiano: https://github.com/onekk/freecad-doc
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: Path module development

Postby cox » Sat Jan 17, 2015 5:31 pm

onekk wrote:Hi yorik, i'm on debian jessie how to find a up to date version of freecad with path module I've looked in /us/lib/freecad/Mod but there is no subdir called path?

Many Thanks

Carlo
You need to build/compile Yoriks branch where he develops the path module.
It is located here

https://github.com/yorikvanhavre/FreeCA ... ath-module

When opening this link in a browser the readme file is displayed on the bottom of the page. This readme file explains how to compile for the different operating systems.

There is one exeption witch have been repeated in this forum but is not in the readme file.
After cloning Yoriks branch
"git clone https://github.com/yorikvanhavre/FreeCAD.git"
before the cmake and make commands you need to issue
"git checkout path-module"
in the FreeCAD folder created during cloning.

I made an in source build, and it worked perfectly.

EDIT It obviusly did not work perfectly without installing (becomes apparent in later posts) cause by the time of my writing I had no idea of how it was supposed to work

However i could not figure out how to use it. I guess it is a bit early in development.

It would be very nice if someone could do a demo of the code at this stage.

Good luck
Last edited by cox on Sun Jan 18, 2015 2:07 pm, edited 1 time in total.
Need help? Feel free to ask, but please read the guidelines first
User avatar
sliptonic
Posts: 2193
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Path module development

Postby sliptonic » Sat Jan 17, 2015 7:41 pm

cox wrote: I made an in source build, and it worked perfectly.
However i could not figure out how to use it. I guess it is a bit early in development.

It would be very nice if someone could do a demo of the code at this stage.

Good luck
There are several important scripts that get copied to Mod/Path/PathScripts during installation. If these aren't found, you'll still be able to launch the Path WB but many things may not work.

Here's a quick run through with some screenshots. It'll give you a sense of where the workbench is going but be warned that it is still very early and not ready to merge to Master. So there are many bugs and some things may change a lot before merging.

Below, I've created a sketch and padded it. Then selected the top face and created a profile path. The path is generated automatically stepping down 1mm at a time. There are lots of properties on the data tab that can be adjusted. The path itself will be updated in real time. It's also still parametric, so if the sketch is changed, the path will adapt. The profile is the first of the 'Path Python Features' In the future, there will be more for pocketing, drilling, surfacing, etc. As the name suggests, these are written in Python so it will be a great place for the community to contribute.
Image

I've added a sketch to the face and made a pocket. Then created a "path pocket" from it. This is all using OCC offsetting and is looking pretty good. The path pocket is incomplete. You can't set step-down, step-over or many other properties you'd expect.

Image

You can create a Path Project and add individual Paths to it. The project will control the sequence of operations and also hold properties that are global.
Image

Double clicking the path project opens up the Task view. Here you can resequence the path operations and also edit the tool table. The tool table editor will allow importing and existing tool table and will read HeeksCNC tool tables directly.
Image

Select either an individual path or a project and export it. The list of exporters now includes Gcode. Selecting it will bring up a second dialog where you can choose the post-processor to use. Post processors are in python and customization will be done there. The post selector will look in the directory referenced above as well as the user's Macro directory. as long as the name is <name>_post.py, it will be found.
Image

There are a lot more features already and more planned. I can do more posts and screen shots if there's interest.
danielfalck
Posts: 395
Joined: Fri Oct 07, 2011 8:58 pm
Location: Beaverton,Oregon, USA
Contact:

Re: Path module development

Postby danielfalck » Sat Jan 17, 2015 8:15 pm

I am also working on the Path workbench and have been coding up the selection and parameters for the Profile operation. I hope to soon work on the Procket operation and add most of the same parameters as are in Profile. Recently I added Fixture offset (since I have two Kurt vises on my own milling machine). It was easy to code up the script for that. Yorik guided me through that one and I can help others who might have similar inclination.
Here is a screen shot of two simple operations on two different vises:
Image

When testing this workbench out- be cautious and look over your own code before using it on real machines. There are bugs to be worked out. We have a lot of decisions to be made and a lot of work ahead, but I am optimistic.