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 » Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version
Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #35125] Sun, 15 January 2012 17:19 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
PLEASE SEE LAST POST FOR LATEST INSTRUCTIONS !

Hi,

finally I could add this package, which I'm using in my UppCad.
It was a long run because the library source tree is totally Upp-unfriendly AND because it's so big that I couldn't drop into bazaar.

BEWARE, NEEDS AN UPDATED IDE TO BUILD !!! (nighty build from 18/01/2011)

So, here instructions :

1 - RTFR (Read The Fine Readme) !!!

2 - If you're in a hurry, please read point 1.

3 - If you're *really* in hurry, keep in mind that the Bazaar package DON'T have the library sources inside (around 30 MB were just too big...), just the .upp files and some other neede ones, so, you MUST fetch the library source tree by yourself.
So, as contained in the infamous README file, as an option :

From inside OCE folder......

If using GIT (preferred method):
git clone git://github.com/tpaviot/oce.git


If not using git, fetch files from here :
https://github.com/tpaviot/oce/zipball/master
Unpack them inside OCE folder AND BE SURE that resulting folder name is 'oce'. You'll end with OCE folder containing following:
ApplicationFramework
Draw
FoundationClasses
InterfaceGraphic_WNT.hxx
ModelingAlgorithms
ModelingData
oce                         <<-- THIS IS OCE source tree
OCE.h
README-REALLY.txt
Visualization


From now, you can open OCETest package and run it... if all is ok, you'll see a small demo with a 3d bottle on it.

BE PATIENT, OpenCascade is totally Blitz-unfriendly, and it's
around 30 MB of source code. On Linux it takes around 20-25 minutes to build on my machine, on WINE it takes more than one our, don't know on a real machine.

You can zoom (mouse wheel) pan (middle mouse button) and rotate (ctrl+shift + mouse middle drag).

Tested on windows an Ubuntu Linux 11.10; if you've some BSD handy, please test it and/or apply needed patches.

Please report here any bugs you find !

LAST NOTE : GIT is preferred because the OCE project is very active on these days and we're fixing tons of issues on it, so with git you can stay updated easly.

Ciao

Max

[Updated on: Mon, 19 November 2012 22:57]

Report message to a moderator

Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel [message #35127 is a reply to message #35125] Sun, 15 January 2012 17:22 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Thank you very much Massimo!

Best regards
Iñaki
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel [message #35128 is a reply to message #35127] Sun, 15 January 2012 17:27 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
Hi Koldo Smile

I'll be happy if you can test it.
It was quite difficult having it packaged without touching at source tree... and I'm not completely happy about, but that's the only way by now.

On next days I'll adapt my UppCad to the new package and push a couple of windows+linux test versions somewhere.

Ciao

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel [message #35130 is a reply to message #35128] Sun, 15 January 2012 21:38 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Hello Massimo

It is great to have good engineering tools in U++. And OpenCascade is perhaps one of the most advanced available to open source.

So IMHO having it in U++ is very good news Smile.


Best regards
Iñaki
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel [message #35173 is a reply to message #35125] Wed, 18 January 2012 20:56 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
Ide now can build the sample without patches.
Just update to a nigthy build (today 18/01/2011)

Please test ! Smile

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel [message #36608 is a reply to message #35125] Mon, 18 June 2012 16:55 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
Sorry for bumping a rather old topic. Just a small heads up. It appears that the new version (0.10.*) of OpenCascade does not compile properly with the bazaar project - one has to use the older 0.9* code.
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel [message #37884 is a reply to message #36608] Mon, 19 November 2012 22:55 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
Hi,

I just updated the bazaar OCE package to latest OCE build, and so is the demo app.
Now there's just a *BIG* single library named OCE.
As before,you need to fetch the OCE sources with git from OCE website; see the readme file.

As a note, the OCE package still has a couple of bugs that prevents building on last ubuntu GCC; I pushed the needed patches in a private branch named miciomax/fix-ubuntu-build, so upon fetching the git code, you need to switch to that private branch to build it.
Resumed instructions :

1: cd into OCE bazaar folder
2: git clone git://github.com/tpaviot/oce.git oce
3: cd into 'oce' folder
4: git checkout miciomax/fix-ubuntu-build

From now you can try to build demo code.

By now, tested JUST on Linux; you may miss some dependencies, in my case it was TCL devel libraries and limxmu, but your mileage may vary... jut look at error codes, if any, and google for dependencies.
I'll test it on windows (and make needed changes...) on next days.

Ciao

Max

p.s.: the build takes LOOONG... if you don't have a fast pc with very fast HDD. On my quad core i7 with 512 GB ssd it takes some 3-5 minutes; on former machine it could take 2 ours....

p.p.s: I warmly suggest to build with USEMALLOC flag... maybe the OCC allocators are fixed now, but they were quite broken one year ago....
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #37907 is a reply to message #35125] Thu, 22 November 2012 13:35 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
Ciao Massimo,

Good to hear that the new version is almost ready! Here's a small report on my attempt to compile OCETest under Windows, using the latest OCE code and version 5575 of u++:

It's not working yet, but it's almost there. Compiling with gcc 4.7.0 I get the following:

Quote:

C:\upp\bazaar\OCE\oce\src\OSD\OSD_Thread.cxx: In function 'DWORD WNTthread_func(LPVOID)':
C:\upp\bazaar\OCE\oce\src\OSD\OSD_Thread.cxx:145:11: error: 'intptr_t' was not declared in this scope
C:\upp\bazaar\OCE\oce\src\OSD\OSD_Thread.cxx:145:20: error: expected ';' before 'ret'
C:\upp\bazaar\OCE\oce\src\OSD\OSD_WNT.cxx: In function 'BOOL MoveDirectory(LPCTSTR, LPCTSTR)':
C:\upp\bazaar\OCE\oce\src\OSD\OSD_WNT.cxx:1017:22: error: 'intptr_t' was not declared in this scope
C:\upp\bazaar\OCE\oce\src\OSD\OSD_WNT.cxx:1017:32: error: expected ')' before 'TlsGetValue'
C:\upp\bazaar\OCE\oce\src\OSD\OSD_WNT.cxx:1419:1: error: expected ')' at end of input
C:\upp\bazaar\OCE\oce\src\OSD\OSD_WNT.cxx:1419:1: error: expected statement at end of input
C:\upp\bazaar\OCE\oce\src\OSD\OSD_WNT.cxx:1419:1: error: expected '}' at end of input
C:\upp\bazaar\OCE\oce\src\OSD\OSD_WNT_1.cxx: In function 'WORD* lpwAlign(LPWORD)':
C:\upp\bazaar\OCE\oce\src\OSD\OSD_WNT_1.cxx:245:9: error: 'intptr_t' was not declared in this scope
C:\upp\bazaar\OCE\oce\src\OSD\OSD_WNT_1.cxx:245:19: error: expected ';' before 'lpIn'
C:\upp\bazaar\OCE\oce\src\OpenGl\OpenGl_FontMgr.cxx:23:22: fatal error: ft2build.h: No such file or directory
compilation terminated.
C:\upp\bazaar\OCE\oce\src\OpenGl\OpenGl_Context.cxx: In member function 'void* OpenGl_Context::findProc(const char*)':
C:\upp\bazaar\OCE\oce\src\OpenGl\OpenGl_Context.cxx:252:40: error: invalid conversion from 'PROC {aka int (__attribute__((__stdcall__)) *)
()}' to 'void*' [-fpermissive]


With Visual Studio 2012 it's even better:

Quote:

C:\upp\bazaar\OCE\oce\src\OpenGl\OpenGl_FontMgr.cxx:23:22: fatal error: ft2build.h: No such file or directory


Hope this helps, and looking forward to the fixes Smile

Kel
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #37909 is a reply to message #37907] Thu, 22 November 2012 15:40 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
Hi Keltor,

thank you for testing Smile

The ftbuild problem is solved (I have still to upload the fix, I'll do it this evening); the other I guess depends on GCC for windows not defining intptr_t; I can do it inside package.

If you're in a hurry, you can solve both opening the packge organizer and adding a couple of compilation options :

1) Add an internal include, with the value ../freetype
2) Add a compiler option, with the value -Dintptr_t=int*

(second one I don't know if it works...)

Ciao

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #37910 is a reply to message #35125] Thu, 22 November 2012 17:39 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
Thanks for the speedy reply, Max!

I am certainly not in a hurry Smile Still, I tried your suggestions. Fix number 1 works no problem, fix 2 induces a few other errors here and there. I will not bore you with the details since I guess it would be more of a nuisance than a help - after all, the important thing is in the package itself.

What might be helpful is the following: Since fix 1 solves the Visual Studio 2012 error, I have gone ahead and compiled the project again from scratch using that toolchain. Two points arise:

- First, the VC compiler keeps saying
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Vc\Include\crtdefs.h(446) : warning C4091: 'typedef ' :
ignored on left of '__w64 unsigned long' when no variable is declared

after compiling every file

- Second, the library is linked correctly, yet the OCETest executable fails because of the following:

Linking...
   Creating library C:\upp\out\bazaar\MSVC11.Gui.Usemalloc\OCETest.lib and object C:\upp\out\bazaar\MSVC11.Gui.Usemalloc\OCETest.exp
OCE.lib(Graphic3d_WNTGraphicDevice.obj) : error LNK2019: unresolved external symbol "private: void __thiscall Graphic3d_WNTGraphicDevice::
	SetGraphicDriver(char const * const)" (?SetGraphicDriver@Graphic3d_WNTGraphicDevice@@AAEXQBD@Z) referenced in function "public: __this
	call Graphic3d_WNTGraphicDevice::Graphic3d_WNTGraphicDevice(char const * const)" (??0Graphic3d_WNTGraphicDevice@@QAE@QBD@Z)
OCE.lib(OpenGl_Window.obj) : error LNK2019: unresolved external symbol __imp__InterfaceGraphic_RealizePalette referenced in function "publ
	ic: __thiscall OpenGl_Window::OpenGl_Window(class Handle_OpenGl_Display const &,struct CALL_DEF_WINDOW const &,void *,class Handle_Ope
	nGl_Context const &)" (??0OpenGl_Window@@QAE@ABVHandle_OpenGl_Display@@ABUCALL_DEF_WINDOW@@PAXABVHandle_OpenGl_Context@@@Z)
C:\upp\out\bazaar\MSVC11.Gui.Usemalloc\OCETest.exe : fatal error LNK1120: 2 unresolved externals


Still, it's very very close... Thanks Max for the great job!
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #37911 is a reply to message #37910] Thu, 22 November 2012 17:47 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
Hi,

for the second error, I already sent a patch to OCE which is being integrated.
If you want to test it, there's a private branch named

review/fix-static-build

which contains the fixes.

Sorry for the inconveniences, but OCE is in the way incorporating 6.5.4 update, so it needs some days to stabilize.
BTW, with the patch I got it compiling and running or both on windows (visualc 9) and Linux (ubuntu, GCC 4.7.2).

Feel free to signal more problems.... I'm a bit busy on these days, but I'm thinking to continue development of my UppCad application, so I guess I'll be faster with updates on next days.

Ciao

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #37912 is a reply to message #35125] Thu, 22 November 2012 20:34 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
Hi again Max,

No need to apologise for inconveniences! On the contrary, it's the whole community that is grateful to you and to the rest of the people who make it possible for us all to reap the rewards of your hard work. Personally, I am just happy to contribute in any humble way I can if with that I can make your life a little easier, that's why I thought I would present my own experience in case it might help out.

Let me make that extensive to all the really talented folks working on U++. Guys, you all rock, seriously.

Back to the issue: I will certainly keep testing the new version, not only compiling it but also working with the final product, so if something comes up, I'll be sure to let you know.

Thanks again, cheers,

Kel
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38012 is a reply to message #37912] Wed, 28 November 2012 11:08 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
I've uploaded a demo (NON open sourced, just the executable and a test file) of the ongoing uppcad project, based on OCE libraries.

It's still in early stage, but many stuffs are already working.
If you want to test it, just grab these files:

http://www.timberstruct.it/UppCad.exe
http://www.timberstruct.it/prova.ucd

(.ucd file needs to be saved on disk, so if your browser opens it, just choose 'save as' option instead)

To test, just run UppCad.exe and open the Prova.ucd file.
Usage is simple, only 'weird' thing is the view rotate command, which is done with

CTRL+SHIFT+middle mouse button drag

To see view in shaded, random colors, just select GOURAUD view mode. HIDDEN line mode is quite slow when rotating the view, as it must regenerate all hidden lines on each step.

Ciao

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38013 is a reply to message #38012] Wed, 28 November 2012 11:14 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Very cool Cool .

index.php?t=getfile&id=3938&private=0
  • Attachment: cool.png
    (Size: 165.71KB, Downloaded 783 times)


Best regards
Iñaki
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38015 is a reply to message #38013] Wed, 28 November 2012 11:38 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
Hi Koldo Smile

Thank you for testing.
There's also a 'stepin' command (must be entered by command line) which allows to import any step file... you can find some on web or make them with some cad application.
The sample above is a job drawing exported from autocad, converted to step and imported in uppcad.

Ciao

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38016 is a reply to message #35125] Wed, 28 November 2012 11:54 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
Hi,

I have retaken the project of compiling the new OCE under Windows. This time, since Massimo reports that VS works fine, with GCC 4.7.0. I am using the latest version of U++ (5584) and the review/fix-static-build source for OCE.

As is, the project has a few issues:

- One still needs to define the internal include ../freetype as mentioned on a previous post.

- File OpenGl_Context.cxx yields an error on line 252. That can be solved either by adding a (void*) cast in front of the returned value or by adding the compiler option -fpermissive.

- After those issues are solved, all files are compiled correctly, yet U++ complains that there are errors and does not proceed to the next package. To further illustrate: if I re-run the build process after that, I get the following:

----- CtrlLib ( GUI USEMALLOC GCC WIN32 ) (1 / 13)
----- OCE ( GUI USEMALLOC GCC WIN32 ) (2 / 13)
Creating library...

There were errors. (0:09.01)


Any ideas why that is so?


I will keep on at it Smile

Keltor


PS: Really cool proggie, Max!
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38017 is a reply to message #38016] Wed, 28 November 2012 12:02 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
Hi Keltor,

sorry, but I had no time to test and commit latest fixes to OCE... I guess I'll do it this evening.
Just wait for next post, I'll tell when the fixes will be on git.

Ciao

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38018 is a reply to message #35125] Wed, 28 November 2012 12:10 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
OK, no problem. I will wait for the next version then. In the meantime I'll take a further look at UppCad Wink Thanks!
icon14.gif  Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38031 is a reply to message #38018] Wed, 28 November 2012 20:53 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 671
Registered: November 2008
Location: France
Contributor
Hi Max,

I just tried under wine.
It started fine and looks very good (great icons Smile)

But it got stuck when trying to do a move ( Wine issue )

Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38033 is a reply to message #38031] Wed, 28 November 2012 22:11 Go to previous messageGo to previous message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
Hi Didier... I think on next days (weeks ?) I'll setup an autoupdater on my server, both for linux and windows, so you'll be able to test it on Linux directly.

It still has a couple of bugs... it does hard multithreading, and the behaviour is far from perfect....

Ciao

Max
Previous Topic: zip/postal code and cities
Next Topic: OpenCL
Goto Forum:
  


Current Time: Tue Oct 26 15:05:21 CEST 2021

Total time taken to generate the page: 0.01235 seconds