Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installation of opencascade, OCE, FreeCAD and pythonocc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
WvR
Tux's lil' helper
Tux's lil' helper


Joined: 03 Mar 2011
Posts: 139
Location: Tsuruga, Japan

PostPosted: Mon Dec 09, 2013 8:09 am    Post subject: Installation of opencascade, OCE, FreeCAD and pythonocc Reply with quote

I just want to share my experiences installing FreeCAD on my gentoo laptop(s). I am a complete newbie to FreeCAD and everything related to it. I just wanted to check it out, but installation was a bit more complex than I expected.

FreeCAD is an open-source CAD software project: www.freecadweb.org Presently (December 2013), FreeCAD-0.14 is the current version.

FreeCAD is based an open-source CAD library, called OpenCASCADE www.opencascade.org, which is at version 6.6.0 (December 2013). OpenCASCADE is also referred to as OCC and OCCT (OpenCasCade Technology). Note: the OCCT software is licensed with a special license, which may or may not be interpreted as "free" software. Some linux distributions do not accept the OCCT license.

There is a spin-off project from OpenCASCADE, called OCE: OpenCASCADE Community Edition. You need OCE together with OpenCASCADE to compile FreeCAD. OCE can be found at https://github.com/tpaviot/oce Current version is OCE-0.13 but you need to install OCE-0.12.

Finally, there is pythonocc, which is a Python wrapper around the OCCT libraries (which are mostly C++): https://github.com/tpaviot/pythonocc Present version in December 2013 is v0.6, which requires OCE-0.12

Installation steps:

1. Install OpenCASCADE from the gentoo ebuild
Code:
 emerge -auvDN opencascade
Note here that you may need to set USE-flags. I set the USE-flags "doc examples freeimage gl2ps java qt4 tbb" to get the most complete build

2. Install FreeCAD from the gentoo ebuild
Code:
 emerge -auvDN freecad
This will pull in the dependencies of FreeCAD (and there are quite a few). Note: the compilation of FreeCAD will fail, but it is the dependencies we are concerned with at the moment.

3. Install OCE-0.12. First, download the archive from https://github.com/tpaviot/oce/releases/tag/OCE-0.12 Extract the archive to a directory of your choice, for instance /home/user/oce-0.12

4.
Code:
user@pc > cd oce-0.12
user@pc > mkdir cmake-build
user@pc > cd cmake-build
user@pc > cmake ..
This should finish without errors, as long as you installed OpenCASCADE before (to get the dependencies). Then
Code:
user@pc > make
user@pc > sudo make install/strip


5. Now that OCE is installed, download the FreeCAD source from https://github.com/FreeCAD/FreeCAD_sf_master/ Make a directory and unpack the archive: for example, from your home directory
Code:
user@pc > mkdir freecad
user@pc > cd freecad
user@pc > tar xvzf ....
user@pc > mkdir cmake-build
user@pc > cd cmake-build
user@pc > cmake -D COIN3D_INCLUDE_DIR=/usr/include/coin/ ..
user@pc > make
user@pc > sudo make install


6. If you are interested in pythonocc, go to the GitHub repository, and download the latest version https://github.com/tpaviot/pythonocc/archive/master.zip Unpack the archive to a directory, for example /home/user/pythonocc.

6a. If you want to have support for the GEOM package in pythonocc:
Code:
user@pc > cd pythonocc/src/contrib/geom-6.3.1.8
user@pc > mkdir cmake-build
user@pc > cd cmake-build
user@pc > cmake ..
user@pc > make
user@pc > sudo make install


6b. If you want to have support for the SMESH package in pythonocc:
Code:
user@pc > cd pythonocc/src/contrib/smesh-5.1.2.2
user@pc > mkdir cmake-build
user@pc > cd cmake-build
user@pc > cmake ..
user@pc > make
user@pc > sudo make install


7. Finally, make the pythonocc library:
Code:
user@pc > cd pythonocc
user@pc > mkdir cmake-build
user@pc > cd cmake-build
user@pc > cmake ..
user@pc > make
user@pc > sudo make install
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum