How to Install Open CASCADE for FreeCAD in Ubuntu?

Forums: 

Ubuntu 10.04
FreeCAD 0.13 rev 5058
OpenCASCADE 6.5.2

I have a problem with FreeCAD which I am told OpenCASCADE will fix. (If OpenCASCADE takes care of the problem, why isn't it part of the FreeCAD package? How can OpenCASCADE take care of the problem if it isn't already part of FreeCAD?)

So far I have downloaded and opened ver 6.5.2, but have no idea where to put it. I have found help which tells me to ./configure for several programs, none of which I've heard of before, and some of which I don't have but can't find in Synaptic to install.

It seems like some of these program names actually have new names which would be obvious to anyone familiar with them. Of course I'm not familiar with them so I'm having problems. There's also the problem of where these packages are 'installed". They typically have portions installed in three to six directories, so which one do you pick?

Are there any complete descriptions of how to install OpenCASCADE for FreeCAD in Ubuntu?

fester's picture

Here is the procedure which finally worked for me in Ubuntu (12.04);

First, get yourself the build tools from Ubuntu! Specifically, the following should get everything you need:

$ sudo apt-get libtool autoconf automake gfortran

(gfortran is GNU FORTRAN). If you got any of those tools from their home web sites, get rid of them before installing the Ubuntu versions, or much confusion may result! (The beauty of a distro is that they take care of making sure that this automake works with this autoconf works with...)

Now your procedure should look like

$ tar xf foo-x.y.z.tar.gz
$ cd foo-x.y.z
$ ./build_configure
$ ./configure
$ make
$ sudo checkinstall make install

During the MAKE function on the last line, you will probably be told the value you've entered can't be accepted. This is a version number. Enter any number from 0-9, you'll get a chance to change it later.
You will eventually be shown a list of table entries that include things like the program name and the version number. Follow the directions to use the correct values. If you don't know what any of the entries are, leave them alone.

My build didn't successfully do the the INSTALL command on the last line. No matter, I installed it using the Gdebi Installer. "gdebi" is available in Ubuntu through Synaptic Package manager, or through a terminal using, "sudo apt-get install gdebi".

This would a good place to check with Synaptic Package Manager to see if your build got into the system successfully. While you're in Synaptic, you might as well also delete any old versions of Open Cascade you can find so the programs that use it won't get messed up. Having done that, I'd re-install the new version to be sure everything which needs to be there is.

What's happening here is that the build_config script is preparing the kit to the point where you could roll it back up into a new tar ball for distribution, with directions to the user to do the ./configure && make && make install with the kit. The whole autoconf/automake facility makes it possible to provide packages that will (ultimately) build and compile on systems as diverse as Windows, Linux and other Unix variants, and some proprietary operating systems.

Ricardo Benito's picture

Do it also works with Ubuntu 12.10?

fester's picture

I assume that since what I'm doing works on Ubuntu 12.04, it should also work on 12.10.

Please remember that I'm no guru. I'm really more of an Ubuntu Applications user than a system developer. I'm trying to improve my procedure every time I upgrade this program, so you might like to try my latest and greatest version below...

First, get yourself the build tools from Ubuntu! Specifically, the following should get everything you need:

$ sudo apt-get libtool autoconf automake gfortran gdebi

(gfortran is GNU FORTRAN). If you got any of those tools from their home web sites, get rid of them before installing the Ubuntu versions, or much confusion may result! (The beauty of a distro is that they take care of making sure that this automake works with this autoconf works with...)

Now your procedure should look like

$ sudo -i
$ tar xf foo-x.y.z.tar.gz
$ cd foo-x.y.z
$ cd ros
$ ./build_configure
$ ./configure
$ make
$ cp /usr/local/draw.sh /usr/local/draw.sh.old
$ rm /usr/local/draw.sh

$ sudo checkinstall make install

You may see the following...

"...is not a
*** Warning: debian policy compliant one.
Please specify an alternate one"

Press ENTER

During the MAKE function on the last line, you will probably be told the value you've entered can't be accepted. This is a version number. Enter any number from 0-9, you'll get a chance to change it later.

You MUST have a version number!

This package will be built according to these values:

0 - Maintainer: [ root@desktop ]
1 - Summary: [ OpenCascade654 ]
2 - Name: [ opencascade ]
3 - Version: [ 654 ]
4 - Release: [ 1 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ amd64 ]
8 - Source location: [ ros ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ ros ]
12 - Conflicts: [ ]
13 - Replaces: [ ]

When shown your version of the table above, pay attention to lines 1, 2, and 3. If those lines are in the form shown you should do alright. If you don't know what any of the entries are, leave them alone.

At this point, it may be useful to delete the old version of Open Cascade if you haven't yet, and re-install the new.

You can remove it from your system anytime using:

dpkg -r opencascade

What's happening here is that the build_config script is preparing the kit to the point where you could roll it back up into a new tar ball for distribution, with directions to the user to do the ./configure && make && make install with the kit. The whole autoconf/automake facility makes it possible to provide packages that will (ultimately) build and compile on systems as diverse as Windows, Linux and other Unix variants, and some proprietary operating systems.

hero's picture

Dear, Dan Riebs

I want to use OCCT to create CAD software in Microsoft visual studio using MFC application, and I have already installed OCCT on my system and it was build correctly on MSVS 2008.

Now if I want to create that CAD software project which is a Multi-Document Interface (MDI)and lets say I want to start with creating "point in 3D space" in the workspace , how could I use OCCT libraries for that??? or if you can kindly provide some document or codes which can help of doing that????

truly I don not know what to do or how to do

any help would be really appreciated.

Regards

fester's picture

Your question goes way beyond my capabilities. If you haven't already, I'd ask this question as a new post in the forum. The last time I did so, the response was that I should become active in the developers group, something which I am equally unqualified for.

The help here isn't as good as it is in other parts of the internet, but on the other hand, Open Cascade very much appears to be a "bleeding edge" technology. It may well be those who know the answers either aren't answering the posts because they have way too much to do, or they've stopped reading them altogether for the same reason.

As for your specific problem, I'd start by downloading FreeCAD and see how that works, then get onto their forums and see if you can get some answers there. Otherwise I counsel patience.

hero's picture

Dear fester ..
Thanks a lot for your suggestions
Anyhow appreciated effort dear

Regards

Forum supervisor's picture

Dear hero,
I suggest you to start from OCCT MFC Samples available with any public release of OCCT.
See ...\OpenCasCade\samples\mfc\ directory.
Read first 'readme.txt' file and follow instructions.
I suggest you to start from Geometry and Modeling samples.
I suppose you may find answers to most of your questions in corresponding project files
of the chosen samples.
Regards

hero's picture

Dear Forum supervisor...
I'm Thankful to you for helping me , no doubt your suggestions are considered , and surely I will do that and let you know dear

Regards