Path module merged in master!

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!
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: Path module merged in master!

Post by shoogen »

I'm not sure if I got aspect 3) correct. I can build without errors. But upon workbench activation i get "No module named area".
mumme
Posts: 35
Joined: Sun Jun 21, 2015 4:52 pm

Re: Path module merged in master!

Post by mumme »

shoogen wrote:I'm not sure if I got aspect 3) correct. I can build without errors. But upon workbench activation i get "No module named area".
You probably have to build this lib yourself. Pull from https://github.com/Heeks/libarea

when you configure you set -DPYTHON_DIR=[path to your python directory that you built FreeCAD on]
example: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/

/ Fredrik
mumme
Posts: 35
Joined: Sun Jun 21, 2015 4:52 pm

Re: Path module merged in master!

Post by mumme »

ian.rees wrote: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-
Yes, sorry I had forgot, I also had trouble with macports version and had to compile the lib my self.
Great that you provide a fix for this upstream! I don't know how to make Portfiles so...
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Path module merged in master!

Post by yorik »

shoogen wrote:I'm not sure if I got aspect 3) correct. I can build without errors. But upon workbench activation i get "No module named area".
Yeah I didn't explain very well. The C++ part of the module compiles without the need of any external library (except for the KDL issue above). The python tools, however, make use of libArea, which is module from HeeksCAD which can compute a variety of 2D pocketing operations. So the Path module will compile, but indeed the Area python module will be missing when trying to use the GUI tools that use it.

I think the next step will be to setup a clean repo for libArea (apparently already done on Dan's github account), and maybe build some binaries from it for the different systems? We can use the same releases system as on the main FreeCAD repo...
ian.rees wrote:https://github.com/ianrrees/FreeCAD_tin ... build-path -Ian-
I liked the change... Indeed it will produce better messages. Is the disabling of the robot dependency still needed?
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Path module merged in master!

Post by triplus »

Nice addition to FreeCAD!
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Path module merged in master!

Post by ian.rees »

yorik wrote:Is the disabling of the robot dependency still needed?
My preference (although it is a weak one) is to leave the dependency out of the CMake configuration until there is a real dependency in the source code. If Path doesn't depend on Robot, then there's one less step for eg Mac users who want to try out Path. Once KDL is easier to get on Mac via the normal package management systems, then it doesn't make any difference. -Ian-
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Path module merged in master!

Post by yorik »

Ok, this makes sense indeed... I'll merge your change above, if nobody has anything against it...
danielfalck
Posts: 395
Joined: Fri Oct 07, 2011 8:58 pm
Location: Beaverton,Oregon, USA
Contact:

Re: Path module merged in master!

Post by danielfalck »

yorik wrote:Ok, this makes sense indeed... I'll merge your change above, if nobody has anything against it...
That sounds reasonable to me.
wmayer
Founder
Posts: 20317
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Path module merged in master!

Post by wmayer »

mumme wrote:
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 -DUSE_EXTERNAL_KDL=ON and make sure you have orocos-kdl installed (I use the macports one)

/ Fredrik
I wonder what makes the compilation of KDL fail on OSX. A couple of weeks ago a patch was added to fix the build failure with clang so I would assume this also fixed it for OSX.
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Path module merged in master!

Post by ian.rees »

@werner - I haven't looked into it much myself, but I just fired off a build with -DUSE_EXTERNAL_KDL=OFF and got:

Code: Select all

In file included from /Users/irees/Projects/freecad-code/src/Mod/Robot/App/kdl_cp/kinfam_io.cpp:22:
In file included from /Users/irees/Projects/freecad-code/src/Mod/Robot/App/kdl_cp/kinfam_io.hpp:25:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:627:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:254:9: error: field has incomplete type 'KDL::TreeElement'
    _T2 second;
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/map:629:16: note: in instantiation of template class 'std::__1::pair<const
      std::__1::basic_string<char>, KDL::TreeElement>' requested here
    value_type __cc;
               ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__tree:603:16: note: in instantiation of template class
      'std::__1::__value_type<std::__1::basic_string<char>, KDL::TreeElement>' requested here
    value_type __value_;
               ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__tree:694:22: note: in instantiation of template class
      'std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char>, KDL::TreeElement>, void *>' requested here
    typedef typename __node::base                                 __node_base;
                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/map:715:19: note: in instantiation of template class
      'std::__1::__tree_const_iterator<std::__1::__value_type<std::__1::basic_string<char>, KDL::TreeElement>, std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char>, KDL::TreeElement>,
      void *> *, long>' requested here
    _TreeIterator __i_;
                  ^
/Users/irees/Projects/freecad-code/src/Mod/Robot/App/kdl_cp/tree.hpp:45:37: note: in instantiation of template class
      'std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::__value_type<std::__1::basic_string<char>, KDL::TreeElement>,
      std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char>, KDL::TreeElement>, void *> *, long> >' requested here
        SegmentMap::const_iterator  parent;
                                    ^
/Users/irees/Projects/freecad-code/src/Mod/Robot/App/kdl_cp/tree.hpp:37:11: note: definition of 'KDL::TreeElement' is not complete until the closing '}'
    class TreeElement
          ^
1 error generated.
make[2]: *** [src/Mod/Robot/App/CMakeFiles/Robot.dir/kdl_cp/kinfam_io.cpp.o] Error 1
Post Reply