Path module merged in master!

Here's the place for discussion related to CAM/CNC and the development of the Path module.
User avatar
yorik
Site Admin
Posts: 12070
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels, Belgium
Contact:

Path module merged in master!

Postby yorik » Sat Jul 04, 2015 10:05 pm

I just merged the Path module in master. Please note:

1) In a first moment, we'd like to make sure that it compiles on all platforms. Please report problems related to compiling first!
2) You will likely need to "make install". Some stuff might still not be correctly copied to the build dir (please also help us to fix that if you see something wrong in that regard)
3) The GUI tools are still in heavy development. You'll likely meet many bugs or even fail to make them work properly. Some also need external libraries such as libArea. Please refrain from shouting "it doesn't work!", we'll try first to make the path module compile harmoniously, then take care of the external libs, then attack these end-user issues. It'll take some time.
4) The API, however, is already pretty solid. Documentation is at https://github.com/yorikvanhavre/FreeCAD/wiki We need to transfer (and extend) this documentation to the FreeCAD wiki, help welcome ;)
5) We were gathering bugs and issues on https://github.com/yorikvanhavre/FreeCAD/issues , I'll also transfer them on the FreeCAD tracker.
6) At the moment the Path module will be hard to use for end-users or people who are not used to GCode. But be patient, this will come...
7) If anything goes wrong, you can disable compilation of the Path module by giving the option: BUILD_PATH=OFF to cmake.

General guidelines for who wants to look at the code:

The Path module is a very hybrid module, 50% C++, 50% python.
The C++ core is very similar to the Robot module, and contains:
- The base Path::Feature
- PropertyPath which contains the Path data of a Path::Feature, works the same way as Part or Mesh
- The Path object contains an ordered list of Path Commands
- a Path Command is a basic GCode operation such as movement, rapid feed, etc.
- Paths are stored, in memory and inside the .FCStd file, as a simplified, vendor-agnostic form of Gcode. But many apps can read it directly.
- PropertyTooltable which contain an ordered list of Path Tools
- The Path Tool object stores information about a particular CNC tool.
- A couple of derived features (Path::FeatureCompound that works like a Part Compound and Path::FeatureShape that builds a path from a wire shape)
- View Providers for the above features

All the rest is python (located in the PathScripts folder), that is:
- All the GUI tools
- The GCode importers and exporters (pre- and post- scripts). There are several, since each machine speaks a different GCode dialect.
- Specific features derived from Path::Feature, for each operation: profile, pocket, etc...
- All the code that generate path data for these operations, some of it inside each feature, some in a couple of generic module files.

That's it for now, thanks to Dan Falck, Brad Collette, Frederik Johansson, Dmitry Platonov who worked hard on this module!
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Path module merged in master!

Postby ian.rees » Sat Jul 04, 2015 10:18 pm

Awesome! Thanks for all the work on this.

I'm currently having problems building on Mac due to the dependency on Robot, should have a few hours today to work on it. -Ian-
User avatar
yorik
Site Admin
Posts: 12070
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels, Belgium
Contact:

Re: Path module merged in master!

Postby yorik » Sat Jul 04, 2015 10:25 pm

Actually the dependency is probably due to the KDL libs present in the Robot module. But they are not used in Path at the moment, but I put stuff in Path to enable, in the future, to make Robot use it (Jürgen asked for it). So it might be best to solve it, but we could also simply remove that dependency if too much annoyance.
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Path module merged in master!

Postby ian.rees » Sun Jul 05, 2015 1:10 am

No luck yet with KDL on my system, so I disabled the dependencies on Robot and got Path to build. Now I just need to get libarea installed...

I made some changes to the top-level CMakeLists, do you think these are a good idea to bring into master? I think this won't make any difference in normal usage, but if something like -DFREECAD_BUILD_ROBOT="0" is specified on the command line, it results in an error message that Path is dependent on Robot, instead of ignoring the command line option (and probably producing a more cryptic error message later).

https://github.com/ianrrees/FreeCAD_tin ... build-path -Ian-
User avatar
quick61
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Path module merged in master!

Postby quick61 » Sun Jul 05, 2015 2:57 am

Everything built just fine here. Nice job so far! Very nice to see this get merged into master. :)

Mark

OS: Kubuntu 14.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5172 (Git)
Build type: Release
Branch: master
Hash: 3f4e55a4745b911aeed902cd0295ca3871aad884
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
This post made with 0.0% Micro$oft products - GOT LINUX?
drei
Posts: 479
Joined: Sun May 11, 2014 7:47 pm
Location: Mexico
Contact:

Re: Path module merged in master!

Postby drei » Sun Jul 05, 2015 3:00 am

@yorik
Should libarea be compiled with python2 or python 3. I'm having issues with how to properly install this, any idea where I should report my problems?

It just fails here:

Code: Select all

CMake Error at CMakeLists.txt:158 (install):
  install TARGETS given no LIBRARY DESTINATION for module target "area".
Note that FreeCAD compiles just fine, it's just this library that is giving me issues. Currently I tried both the Google Code repository and the github repo as well (for libarea).

Code: Select all

OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5172 (Git)
Build type: Debug
Branch: master
Hash: 3f4e55a4745b911aeed902cd0295ca3871aad884
Python version: 2.7.10
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17
Need help? Feel free to ask, but please read the guidelines first
danielfalck
Posts: 395
Joined: Fri Oct 07, 2011 8:58 pm
Location: Beaverton,Oregon, USA
Contact:

Re: Path module merged in master!

Postby danielfalck » Sun Jul 05, 2015 4:09 am

use Python 2 .

I also exported the google code repo for libarea to this location:

https://github.com/danielfalck/libarea/tree/clipper
django013
Posts: 106
Joined: Tue Jan 13, 2015 7:51 am

Re: Path module merged in master!

Postby django013 » Sun Jul 05, 2015 5:29 am

Hello,

i built fc today without knowing this thread - I didn't change anything and build was fine.
Really great job!

my FC-Info:
OS: Debian GNU/Linux 8.1 (jessie) (KDE)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5172 (Git)
Build type: Unknown
Branch: master
Hash: 3f4e55a4745b911aeed902cd0295ca3871aad884
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

P.S. why do I have build-type unknown? Do I have to change that? How can I do that?
OS: Linux Debian Jessie amd64 - FC: Git Master
mumme
Posts: 35
Joined: Sun Jun 21, 2015 4:52 pm

Re: Path module merged in master!

Postby mumme » Sun Jul 05, 2015 6:09 am

ian.rees wrote:Awesome! Thanks for all the work on this.

I'm currently having problems building on Mac due to the dependency on Robot, should have a few hours today to work on it. -Ian-
You have to set -DFREECAD_USE_EXTERNAL_KDL=ON and make sure you have orocos-kdl installed (I use the macports one)

/ Fredrik

Edit: cmake switch was named wrong correct name is: FREECAD_USE_EXTERNAL_KDL
Last edited by mumme on Mon Jul 06, 2015 1:29 pm, edited 1 time in total.
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Path module merged in master!

Postby ian.rees » Sun Jul 05, 2015 7:17 am

Thanks Fredrik. I had problems getting the MacPorts KDL 1.0.2 to build, ended up making an updated Portfile for KDL 1.3.0 and submitting it to MacPorts. In the end, it was a good learning experience because I figured out the next step in making a working Portfile for FreeCAD 0.15, which I've been putting off for ages...

Did use your FreeCAD CMake switch though, thanks for that! -Ian-