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
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38034 is a reply to message #38033] Wed, 28 November 2012 22:21 Go to previous messageGo to next message
Tom1
Messages: 956
Registered: March 2007
Experienced Contributor
Hi Max,

Very nice indeed!

How about DXF import/export? And perhaps HPGL plotting?


Best regards,

Tom

Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38035 is a reply to message #38034] Wed, 28 November 2012 22:30 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
Hi Tom,

first thing I need is a SAT import.... it's needed to read 3d exported from autocad. By now I do the conversion to step wth an external app and then import the .stp file in UppCad, which is not so comfortable and looses layer/color info.
I have not found any opensourced SAT reader code....

DXF is completely useless regarding 3d objects, they're encrypted inside DXF files, so unreadable without spatial libraries.

I'll do of course a DXF import for simple objects, and a DXF export for 2d drawings, but the SAT reader is a must.
If somebody knows about some free code to read/write sat files, I'll be very happy Smile

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38036 is a reply to message #38035] Wed, 28 November 2012 22:54 Go to previous messageGo to next message
Tom1
Messages: 956
Registered: March 2007
Experienced Contributor
Yes, I was looking (quite narrowly, I might add) for just 2D DXF.

I did find a link to SAT format specification ... but I guess you're looking specifically for code, not spec. Anyway I put it here, just in case it is of interest to somebody: http://paulbourke.net/dataformats/sat/sat.pdf

Best regards,

Tom

[Updated on: Wed, 28 November 2012 22:55]

Report message to a moderator

Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38037 is a reply to message #38036] Wed, 28 November 2012 22:56 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
Hi Tom... yes, I have this document, and I'm afraid I'll have to write the importer from scratch.
OCC has a sat importer, but not free... pity.

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38038 is a reply to message #38037] Wed, 28 November 2012 23:35 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
Just updated the OCE package.

UPP package is ok and builds fine on windows; you still need to fetch the review branch containing fixes for static build up to it gets merged to master; the branch is

review/fix-static-build

I think it'll be merged on next days.

Please test and report any problems !

Ciao

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38049 is a reply to message #38016] Thu, 29 November 2012 10:32 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
I tried to compile under Windows with U++ 5592 and the review/fix-static-build branch. MSVC 11 builds successfully, however MINGW still complains:

keltor wrote on Wed, 28 November 2012 11:54

Hi,
- 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'm a bit stumped, to be honest, since I don't understand why it compiles all files and then refuses to build the library. Is it because of OCE, MINGW or U++?

Hmmmm... now it's personal Smile I'll find a way. Of course, if someone knows the reason, I'll be very glad to hear it Wink

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

I don't have mingw installed, so I can't test it.
Could you please do a FULL rebuild (clean packages, then rebuild them) and drop me the error output ?

Ciao

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38057 is a reply to message #35125] Thu, 29 November 2012 11:45 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
There are no errors - just warnings. That's what puzzles me...

Still, I'll dump those as soon as I finish rebuilding.
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38059 is a reply to message #35125] Thu, 29 November 2012 12:36 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
OK, so I did the following: I rebuilt with the compiler option -Werror to treat warnings as errors, then I built again without the option to filter out all files that were compiled correctly. Here's the output:

----- CtrlLib ( GUI USEMALLOC GCC BLITZ WIN32 ) (1 / 13)
----- OCE ( GUI USEMALLOC GCC WIN32 ) (2 / 13)
BSplSLib.cxx
OSD.cxx
OSD_File.cxx
OSD_FileNode.cxx
OSD_Process.cxx
C:\upp\bazaar\OCE\oce\src\BSplSLib\BSplSLib.cxx:43:0: warning: "M_SQRT2" redefined [enabled by default]
In file included from C:\upp\bazaar\OCE\oce\inc/Standard_Real.hxx:23:0,
                 from C:\upp\bazaar\OCE\oce\inc/Standard_PrimitiveTypes.hxx:41,
                 from C:\upp\bazaar\OCE\oce\inc/Handle_Standard_Transient.hxx:31,
                 from C:\upp\bazaar\OCE\oce\inc/Handle_Standard_Failure.hxx:17,
                 from C:\upp\bazaar\OCE\oce\inc/Standard_Failure.hxx:16,
                 from C:\upp\bazaar\OCE\oce\inc/Standard_DomainError.hxx:23,
                 from C:\upp\bazaar\OCE\oce\inc/Standard_RangeError.hxx:23,
                 from C:\upp\bazaar\OCE\oce\inc/Standard_OutOfRange.hxx:23,
                 from C:\upp\bazaar\OCE\oce\inc/TCollection_Array2.lxx:19,
                 from C:\upp\bazaar\OCE\oce\inc/TColgp_Array2OfPnt.hxx:119,
                 from oce/drv/BSplSLib/BSplSLib.jxx:2,
                 from oce/drv/BSplSLib/BSplSLib.ixx:6,
                 from C:\upp\bazaar\OCE\oce\src\BSplSLib\BSplSLib.cxx:29:
c:\mingw\bin\../lib/gcc/mingw32/4.7.0/../../../../include/math.h:64:0: note: this is the location of the previous definition
OSD_WNT.cxx
OSD_signal_WNT.cxx
Resource_Manager.cxx
C:\upp\bazaar\OCE\oce\src\OSD\OSD.cxx:123:0: warning: "finite" redefined [enabled by default]
C:\upp\bazaar\OCE\oce\src\OSD\OSD.cxx:28:0: note: this is the location of the previous definition
C:\upp\bazaar\OCE\oce\src\OSD\OSD_FileNode.cxx: In function 'void _osd_wnt_set_error(OSD_Error&, OSD_WhoAmI, ...)':
C:\upp\bazaar\OCE\oce\src\OSD\OSD_FileNode.cxx:971:27: warning: second parameter of 'va_start' not last named argument [enabled by default]
C:\upp\bazaar\OCE\oce\src\OSD\OSD_File.cxx: In member function 'void OSD_File::Read(TCollection_AsciiString&, Standard_Integer)':
C:\upp\bazaar\OCE\oce\src\OSD\OSD_File.cxx:1072:12: warning: deleting 'Standard_Address {aka void*}' is undefined [enabled by default]
C:\upp\bazaar\OCE\oce\src\OSD\OSD_File.cxx: In member function 'void OSD_File::ReadLine(TCollection_AsciiString&, Standard_Integer, Standard_Integer&)':
C:\upp\bazaar\OCE\oce\src\OSD\OSD_File.cxx:1141:36: warning: right shift count >= width of type [enabled by default]
C:\upp\bazaar\OCE\oce\src\OSD\OSD_File.cxx:1203:36: warning: right shift count >= width of type [enabled by default]
C:\upp\bazaar\OCE\oce\src\OSD\OSD_File.cxx: In static member function 'static OSD_File OSD_File::BuildTemporary()':
C:\upp\bazaar\OCE\oce\src\OSD\OSD_File.cxx:1708:17: warning: deprecated conversion from string constant to 'LPTSTR {aka char*}' [-Wwrite-strings]
C:\upp\bazaar\OCE\oce\src\OSD\OSD_File.cxx:1708:17: warning: deprecated conversion from string constant to 'LPTSTR {aka char*}' [-Wwrite-strings]
Standard_CString.cxx
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:59: warning: NULL used in arithmetic [-Wpointer-arith]
OpenGl_Display.cxx
C:\upp\bazaar\OCE\oce\src\Resource\Resource_Manager.cxx:42:0: warning: "ERROR" redefined [enabled by default]
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.0/../../../../include/windows.h:52:0,
                 from C:\upp\bazaar\OCE\oce\inc/Standard_ThreadId.hxx:29,
                 from C:\upp\bazaar\OCE\oce\inc/Standard_ErrorHandler.hxx:32,
                 from C:\upp\bazaar\OCE\oce\src\Resource\Resource_Manager.cxx:30:
c:\mingw\bin\../lib/gcc/mingw32/4.7.0/../../../../include/wingdi.h:313:0: note: this is the location of the previous definition
C:\upp\bazaar\OCE\oce\src\OSD\OSD_Process.cxx: In member function 'OSD_Path OSD_Process::CurrentDirectory()':
C:\upp\bazaar\OCE\oce\src\OSD\OSD_Process.cxx:405:65: warning: NULL used in arithmetic [-Wpointer-arith]
C:\upp\bazaar\OCE\oce\src\OSD\OSD_signal_WNT.cxx:226:1: warning: deprecated conversion from string constant to '_TCHAR* {aka char*}' [-Wwrite-strings]
C:\upp\bazaar\OCE\oce\src\OSD\OSD_signal_WNT.cxx:226:1: warning: deprecated conversion from string constant to '_TCHAR* {aka char*}' [-Wwrite-strings]
C:\upp\bazaar\OCE\oce\src\OSD\OSD_signal_WNT.cxx:226:1: warning: deprecated conversion from string constant to '_TCHAR* {aka char*}' [-Wwrite-strings]
In file included from C:\upp\bazaar\OCE\oce\src\Standard\Standard_CString.cxx:52:0:
C:\upp\bazaar\OCE\oce\inc/Standard_String.hxx:38:40: warning: 'MaskEndIntegerString' initialized and declared 'extern' [enabled by default]
OpenGl_Polygon.cxx
InterfaceGraphic_cPrintf.cxx
MFT_FontManager.cxx
Graphic2d_GraphicObject.cxx
C:\upp\bazaar\OCE\oce\src\InterfaceGraphic\InterfaceGraphic_cPrintf.cxx: In function 'int cPrintf(const char*, ...)':
C:\upp\bazaar\OCE\oce\src\InterfaceGraphic\InterfaceGraphic_cPrintf.cxx:56:5: warning: 'int cPrintf(const char*, ...)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
C:\upp\bazaar\OCE\oce\src\InterfaceGraphic\InterfaceGraphic_cPrintf.cxx: In function 'int fcPrintf(int, const char*, ...)':
C:\upp\bazaar\OCE\oce\src\InterfaceGraphic\InterfaceGraphic_cPrintf.cxx:85:5: warning: 'int fcPrintf(int, const char*, ...)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
C:\upp\bazaar\OCE\oce\src\InterfaceGraphic\InterfaceGraphic_cPrintf.cxx: In function 'char* GetEnv(const char*)':
C:\upp\bazaar\OCE\oce\src\InterfaceGraphic\InterfaceGraphic_cPrintf.cxx:114:7: warning: 'char* GetEnv(const char*)' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
FWOSDriver_Driver.cxx
C:\upp\bazaar\OCE\oce\src\OpenGl\OpenGl_Display.cxx:45:36: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
C:\upp\bazaar\OCE\oce\src\OpenGl\OpenGl_Polygon.cxx: In destructor 'virtual OpenGl_Polygon::~OpenGl_Polygon()':
C:\upp\bazaar\OCE\oce\src\OpenGl\OpenGl_Polygon.cxx:569:57: warning: deleting 'void* const' is undefined [enabled by default]
C:\upp\bazaar\OCE\oce\src\FWOSDriver\FWOSDriver_Driver.cxx: In member function 'virtual TCollection_ExtendedString FWOSDriver_Driver::DefaultFolder()':
C:\upp\bazaar\OCE\oce\src\FWOSDriver\FWOSDriver_Driver.cxx:175:23: warning: NULL used in arithmetic [-Wpointer-arith]
C:\upp\bazaar\OCE\oce\src\Graphic2d\Graphic2d_GraphicObject.cxx:45:0: warning: "MAX_PRIORITY" redefined [enabled by default]
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.7.0/../../../../include/windows.h:87:0,
                 from C:\upp\bazaar\OCE\oce\inc/Standard_ThreadId.hxx:29,
                 from C:\upp\bazaar\OCE\oce\inc/Standard_ErrorHandler.hxx:32,
                 from C:\upp\bazaar\OCE\oce\src\Graphic2d\Graphic2d_GraphicObject.cxx:41:
c:\mingw\bin\../lib/gcc/mingw32/4.7.0/../../../../include/winspool.h:208:0: note: this is the location of the previous definition
C:\upp\bazaar\OCE\oce\src\MFT\MFT_FontManager.cxx: In function 'void* mmap(off_t, int, int)':
C:\upp\bazaar\OCE\oce\src\MFT\MFT_FontManager.cxx:339:60: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
C:\upp\bazaar\OCE\oce\src\MFT\MFT_FontManager.cxx:343:61: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
C:\upp\bazaar\OCE\oce\src\MFT\MFT_FontManager.cxx:352:58: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
OCE: 15 file(s) built in (0:11.51), 767 msecs / file, duration = 12340 msecs, parallelization 100%
Creating library...

There were errors. (0:12.44)


As far as I can see, there are no errors as such, and despite that, the library does not get rebuilt. Weird.

Hope this helps in any case.

Kel
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38060 is a reply to message #38059] Thu, 29 November 2012 12:41 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
hummm... the warnings are quite normal stuff, OCC needs to be cleaned more, but we're in the way.

What do you mean that library is not built ?
BTW... do you use a recent IDE, right ? I posted a patch some monthes ago, about command line lenght limit when running compiler and linker... this limit was making OCE build impossible, but now it's corrected.

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38061 is a reply to message #35125] Thu, 29 November 2012 13:14 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
The library, despite what the quote from my last post seems to suggest, does not link properly. The files are all compiled AFAIK but the process stops there, it does not produce a valid .a file and it does not proceed to the compilation of the next module.
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38062 is a reply to message #38061] Thu, 29 November 2012 13:44 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
keltor wrote on Thu, 29 November 2012 13:14

The library, despite what the quote from my last post seems to suggest, does not link properly. The files are all compiled AFAIK but the process stops there, it does not produce a valid .a file and it does not proceed to the compilation of the next module.


Please check your IDE version.... I had a similar problem some time ago and had to fix ide to be able to link large file lists.
If your ide's version is more than few monthes old, please update it with last svn and retest.

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38065 is a reply to message #35125] Thu, 29 November 2012 15:31 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
Actually, my IDE is a few hours old... It's version 5592.

Kel

Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38067 is a reply to message #35125] Thu, 29 November 2012 16:21 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
I am beginning to think that the culprit may be GCC itself. Since the compiling works fine, it must be the linking. Maybe there are too many files for the linker to process at one time?

Wasn't there an option to view the commands it executes while compiling? I forgot how it's done... Embarassed
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38068 is a reply to message #38067] Thu, 29 November 2012 16:34 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
in setup menu, select 'be verbose' checkbox.

But, are you really sure you are running an up to date ide ?
this one seems really the problem I had before the command line patch... it was too long for link command.
Now if cmdline is too long, it does it by a command file, so no more problems.

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38069 is a reply to message #35125] Thu, 29 November 2012 16:46 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
I'm positive it's new, I just installed it this morning to test for OCE. On the About box, it states that it's version 5592.

I checked the ar linker command. It's over 600 KB in length so I won't paste it here:

----- OCE ( GUI USEMALLOC GCC WIN32 ) (2 / 13)
cd C:\upp\bazaar\OCE
Creating library...
ar -sr (...)
Exitcode: 

There were errors. (1:15.53)


No exitcode apparently? Could that be the reason?
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38070 is a reply to message #38069] Thu, 29 November 2012 16:53 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
ahhhh ! I guess that one is the problem... if you look on MSC command line you'll see :

cd c:\users\massimo\sources\upp-svn\bazaar\OCE
Creating library...
link /lib -nologo @C:\Users\Massimo\AppData\Local\Temp\4EB3709D3C0500B6545D5EB637FEBD0C.tmp


I guess mingw uses another command for lib building, which is unaffected by my patch, so gets the whole (too long) commandline.

Max
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38071 is a reply to message #35125] Thu, 29 November 2012 16:55 Go to previous messageGo to next message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
Great! Now we're really getting somewhere! It was driving me nuts Smile

I'll leave it in your capable hands then Wink Or we can just use MSVC after all...

Thanks Massimo,

Kel
Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38072 is a reply to message #38071] Thu, 29 November 2012 16:58 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1285
Registered: September 2007
Senior Contributor
keltor wrote on Thu, 29 November 2012 16:55



I'll leave it in your capable hands then Wink
Kel


sigh... another IDE patch.
I'll take a look at it, but I don't have mingw setup handy, so you'll have to test it.

Max

p.s.: could you please test my UppCad in the meanwhile ? If you find a reproductible crash, please tell me... I'm fixing last bgs before extending it.
http://www.timberstruct.it/UppCad.exe

Max

[Updated on: Thu, 29 November 2012 17:00]

Report message to a moderator

Re: Added OCE (OpenCascade Community Edition) 3d solid modeling kernel -- UPDATED to 0.10 version [message #38073 is a reply to message #35125] Thu, 29 November 2012 17:06 Go to previous messageGo to previous message
keltor is currently offline  keltor
Messages: 73
Registered: February 2012
Member
Absolutely! I have already looked at it, but not yet in depth. So I'll be sure to do that. From what I have gathered so far, it looks very impressive.

And of course I'll be glad to test any patches regarding the OCE issue as well.

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


Current Time: Thu Oct 21 08:19:57 CEST 2021

Total time taken to generate the page: 0.01561 seconds