Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » OpenCascade package
OpenCascade package [message #41873] Sun, 02 February 2014 17:51 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
Hi,

because of recent changes in OpenCascade licensing (and consequently to OCE package), switching to LGPL, static builds are no longer convenient.
In addition, OCE added some plugin mechanics that make static builds cumbersome.

So, I removed completely the old OCE package and added an 'import' package named 'Oce2Upp'.
This package when run creates a directory three containing following packages:

1 - OCEBUILDER package, which provides a portable way to build OCE from inside Upp. The builder REQUIRES a very recent IDE and allows to build the full set of shared OCE libraries

2 - OCE package, which contains just the include files from OCE three and a couple of classes (OCEDoc and OCECtrl) that encapsulate the platform-dependent parts of OCE

USAGE :

1 - Fetch the OCE source three, with GIT :

git clone git://github.com/tpaviot/oce.git

As an alternative, sources can be fetched as a zip file here :

https://github.com/tpaviot/oce/zipball/master

2 - Run the 'Oce2Upp' bazaar application; it'll require the OCE source path and a destinazion path :

index.php?t=getfile&id=4416&private=0

3 - Press the 'Generate' button and wait up to process finishes

4 - Add a new IDE assembly pointing to the generated OCEBUILDER root folder inside your destination path, for example

/home/massimo/sources/OCEBUILDER;/home/massimo/sources/upp-svn/bazaar;/home/massimo/sources/upp-svn/uppsrc


Beware, you NEED the Bazaar nest inside assembly, because OCE needs FreeType package on build, which is already in bazaar.

This is needed because OCEBUILDER package needs to be in an assembly and it contains some 60 subpackages which would clobber an already available assembly.

5 - Open the OCEBUILDER package and build it. Again, you'll need a recent IDE. A bug still present requires that you choose 'all shared' build in builder setup. The SO flag is not enough, because it don't take care of correct package order in build, which is required when building DLLs.
The build takes some 10-20 minutes, depending on PC speed.
At the end you'll find some 60+ shared modules in output folder.

6 - You MUST install the shared modules, which is platform-dependent; on Linux, for example:
sudo mkdir /usr/local/lib/OCE
sudo cp /path/of/generated/files/* /usr/local/lib/OCE/

create a 'oce.conf' inside /etc/ld.so.conf.d/ folder with just a line inside containing the lib path:
sudo echo /usr/local/lib/OCE > /etc/ld.so.conf.d/oce.conf

and finally run ldconfig:
sudo ldconfig


On windows, simply create C:\OCE folder and copy all files there; you need to add this folder in PATH environment variable in order to use the libraries.

7 - You MUST set the new library path inside Upp builder Libraries tab

8 - Inside OCEBUILDER main folder you'll find an OCE package, which is the one to use on your projects. If you leave it where it is, you must add its nest in your assemblies; otherwise, just copy it inside MyApps folder.

9 - To test the whole stuff, just run the 'OCETest' package in Bazaar.

All this seems complicated but needs to be done just once, and takes some 10 minutes plus build time. From then you'll have OCE pagage ready to test with.
Usage is quite simple, just look at OCETest sample source code.

Ciao

Massimo

  • Attachment: oce2upp.png
    (Size: 44.30KB, Downloaded 602 times)

[Updated on: Sun, 02 February 2014 18:01]

Report message to a moderator

Re: OpenCascade package [message #41874 is a reply to message #41873] Sun, 02 February 2014 17:55 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
The OCETest demo looks like this :

index.php?t=getfile&id=4417&private=0

You can zoom the image (mouse wheel), pan (middle mouse button and drag) and 3d rotate (3d orbit-like) keeping ctrl+alt keyboard buttos pressed while dragging with middle mouse button.

Ciao

Max
  • Attachment: ocetest.png
    (Size: 49.26KB, Downloaded 596 times)
Re: OpenCascade package [message #41875 is a reply to message #41874] Sun, 02 February 2014 18:05 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
Auto-Installation of libraries

It would be possible to enhance the Oce2Upp package to auto-install the generated libraries.... not too difficult, but also not too easy, as it requires user root permission change (on linux) and administrator access on windows.

This can be done with my SysExec package, xxxAdmin functions, but requires the respawning of application in poweruser mode.

I've no time right now to do it, but if somebody wanna take the task he's wellcome. It would make OCE usage quite easy even for beginner.

Ciao

Max
Re: OpenCascade package [message #45974 is a reply to message #41875] Thu, 04 February 2016 09:47 Go to previous message
vegaonline is currently offline  vegaonline
Messages: 35
Registered: December 2015
Location: Mumbai, India
Member

Hi!

I am building an application with U++ GUI. This requires plotting and making 3D simple primitives based geometry models with simple properties like translation, rotation, extrusion etc. I have seen OCE2UPP and OCETEST in U++ bazaar. I could not run OCETEST as it is not getting OCE/OCE.h. Also I could not run OCE2UPP as it could not get oce root directory although I installed opencascade downloading from opencascade download center.

Can anyone help me?

Thanks and Regards
Abhijit
Previous Topic: [Barcode] Code128 & EAN13/UPC-A/EAN8 supported
Next Topic: Fixing bazaar - and usage survey
Goto Forum:
  


Current Time: Tue Oct 26 14:49:03 CEST 2021

Total time taken to generate the page: 0.01216 seconds