Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenCASCADE #4968

Closed
traversaro opened this issue Dec 13, 2018 · 18 comments · Fixed by #13493
Closed

Add OpenCASCADE #4968

traversaro opened this issue Dec 13, 2018 · 18 comments · Fixed by #13493
Assignees
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:good-first-issue This issue would be a good issue to get one's feet wet in solving.

Comments

@traversaro
Copy link
Contributor

traversaro commented Dec 13, 2018

It would be great to have a port of the Open CASCADE library ( https://dev.opencascade.org/ ).

It is interesting to note that there is both the official code release of Open CASCADE, available at https://dev.opencascade.org/ and a community mantained version at https://github.com/tpaviot/oce .
Debian currently packages both, while Homebrew packages the official one.

Build instructions:

Debian package :

Homebrew formula :

Repology page:

@MVoz
Copy link
Contributor

MVoz commented Dec 20, 2018

v7.0 build ok
https://github.com/3drepo/occt
https://www.opencascade.com/content/3rd-party-components

example static

-DBUILD_LIBRARY_TYPE=Static
-DBUILD_YACCLEX=OFF
-DUSE_D3D=ON
-DUSE_FREEIMAGE:BOOL=ON
-DUSE_GL2PS:BOOL=ON
-DUSE_TBB:BOOL=OFF
-DUSE_VTK:BOOL=OFF

"C:\Program Files\cmake\bin\cmake.exe" .. -LA -DCMAKE_INSTALL_PREFIX:PATH="../Rel" -DVCPKG_TARGET_TRIPLET=x64-windows-static -Ax64 -Wno-dev -DCMAKE_PREFIX_PATH="E:/tools/vcpkg/installed/x64-windows-static" -DCMAKE_TOOLCHAIN_FILE="E:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake" -DCMAKE_CL_64=1 -DCMAKE_CONFIGURATION_TYPES=Debug;Release -DBUILD_TEST=OFF -DBUILD_TESTING=OFF -DBUILD_CLI_EXECUTABLES:BOOL=OFF -DBUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_BOTH_STATIC_SHARED_LIB=ON -DCMAKE_VERBOSE_MAKEFILE=TRUE -G"Visual Studio 15 2017" -DBUILD_LIBRARY_TYPE=Static -DBUILD_YACCLEX=OFF -DUSE_D3D=ON -DUSE_FREEIMAGE:BOOL=ON -DUSE_GL2PS:BOOL=ON -DUSE_TBB:BOOL=OFF -DUSE_VTK:BOOL=OFF

3RDPARTY_DIR:PATH=
3RDPARTY_FREEIMAGEPLUS_DIR:PATH=
3RDPARTY_FREEIMAGEPLUS_DLL:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/bin/FreeImagePlus.dll
3RDPARTY_FREEIMAGEPLUS_DLL_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/bin
3RDPARTY_FREEIMAGEPLUS_INCLUDE_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_FREEIMAGEPLUS_LIBRARY:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/FreeImagePlus.lib
3RDPARTY_FREEIMAGEPLUS_LIBRARY_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/lib
3RDPARTY_FREEIMAGE_DIR:PATH=
3RDPARTY_FREEIMAGE_DLL:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/bin/FreeImage.dll
3RDPARTY_FREEIMAGE_DLL_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/bin
3RDPARTY_FREEIMAGE_INCLUDE_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_FREEIMAGE_LIBRARY:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/FreeImage.lib
3RDPARTY_FREEIMAGE_LIBRARY_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/lib
3RDPARTY_FREETYPE_DIR:PATH=
3RDPARTY_FREETYPE_DLL:FILEPATH=C:/Windows/System32/freetype.dll
3RDPARTY_FREETYPE_DLL_DIR:PATH=C:/Windows/System32
3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_FREETYPE_LIBRARY:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/freetype.lib
3RDPARTY_FREETYPE_LIBRARY_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/lib
3RDPARTY_GL2PS_DIR:PATH=
3RDPARTY_GL2PS_DLL:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/gl2ps.dll
3RDPARTY_GL2PS_DLL_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/lib
3RDPARTY_GL2PS_INCLUDE_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_GL2PS_LIBRARY:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/debug/lib/gl2ps.lib
3RDPARTY_GL2PS_LIBRARY_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/debug/lib
3RDPARTY_TCL_DIR:PATH=
3RDPARTY_TCL_DLL:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/bin/tcl86.dll
3RDPARTY_TCL_DLL_DIR:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/bin
3RDPARTY_TCL_INCLUDE_DIR:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_TCL_LIBRARY:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/tcl86.lib
3RDPARTY_TCL_LIBRARY_DIR:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib
3RDPARTY_TK_DIR:PATH=
3RDPARTY_TK_DLL:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/bin/tk86.dll
3RDPARTY_TK_DLL_DIR:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/bin
3RDPARTY_TK_INCLUDE_DIR:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/include
3RDPARTY_TK_LIBRARY:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/tk86.lib
3RDPARTY_TK_LIBRARY_DIR:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib
BUILD_ADDITIONAL_TOOLKITS:STRING=
BUILD_CLI_EXECUTABLES:BOOL=OFF
BUILD_DOC_Overview:BOOL=OFF
BUILD_MODULE_ApplicationFramework:BOOL=ON
BUILD_MODULE_DataExchange:BOOL=ON
BUILD_MODULE_Draw:BOOL=ON
BUILD_MODULE_FoundationClasses:BOOL=ON
BUILD_MODULE_MfcSamples:BOOL=OFF
BUILD_MODULE_ModelingAlgorithms:BOOL=ON
BUILD_MODULE_ModelingData:BOOL=ON
BUILD_MODULE_Visualization:BOOL=ON
BUILD_PATCH:PATH=
BUILD_WITH_DEBUG:BOOL=OFF
BUILD_YACCLEX:BOOL=OFF
BZIP2_INCLUDE_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/include
BZIP2_LIBRARY_DEBUG:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/debug/lib/bz2d.lib
BZIP2_LIBRARY_RELEASE:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/bz2.lib
CMAKE_CXX_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3 /GR /EHsc
CMAKE_CXX_FLAGS_DEBUG:STRING=/MDd /Zi /Ob0 /Od /RTC1
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /DNDEBUG
CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /DNDEBUG
CMAKE_CXX_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
CMAKE_C_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3
CMAKE_C_FLAGS_DEBUG:STRING=/MDd /Zi /Ob0 /Od /RTC1
CMAKE_C_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /DNDEBUG
CMAKE_C_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /DNDEBUG
CMAKE_C_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
CMAKE_EXE_LINKER_FLAGS:STRING=/machine:x64
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL
CMAKE_LINKER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/link.exe
CMAKE_MODULE_LINKER_FLAGS:STRING=/machine:x64
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL
CMAKE_RC_COMPILER:FILEPATH=rc
CMAKE_RC_FLAGS:STRING=/DWIN32
CMAKE_RC_FLAGS_DEBUG:STRING=/D_DEBUG
CMAKE_RC_FLAGS_MINSIZEREL:STRING=
CMAKE_RC_FLAGS_RELEASE:STRING=
CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_SHARED_LINKER_FLAGS:STRING=/machine:x64
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
CMAKE_SKIP_RPATH:BOOL=NO
CMAKE_STATIC_LINKER_FLAGS:STRING=/machine:x64
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
CMAKE_VERBOSE_MAKEFILE:BOOL=TRUE
FREETYPE_LIBRARY_DEBUG:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/debug/lib/freetyped.lib
FREETYPE_LIBRARY_RELEASE:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/freetype.lib
INSTALL_DIR:PATH=../Rel
INSTALL_DIR_BIN:PATH=win64/vc14/bin
INSTALL_DIR_CMAKE:PATH=cmake
INSTALL_DIR_DATA:PATH=data
INSTALL_DIR_DOC:PATH=doc
INSTALL_DIR_INCLUDE:PATH=inc
INSTALL_DIR_LAYOUT:STRING=Windows
INSTALL_DIR_LIB:PATH=win64/vc14/lib
INSTALL_DIR_RESOURCE:PATH=src
INSTALL_DIR_SAMPLES:PATH=samples
INSTALL_DIR_SCRIPT:PATH=.
INSTALL_DIR_TESTS:PATH=tests
INSTALL_FREEIMAGE:BOOL=OFF
INSTALL_FREEIMAGEPLUS:BOOL=OFF
INSTALL_FREETYPE:BOOL=OFF
INSTALL_GL2PS:BOOL=OFF
INSTALL_SAMPLES:BOOL=OFF
INSTALL_TCL:BOOL=OFF
INSTALL_TEST_CASES:BOOL=OFF
INSTALL_TK:BOOL=OFF
PNG_LIBRARY_DEBUG:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/debug/lib/libpng16d.lib
PNG_LIBRARY_RELEASE:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/libpng.lib
PNG_PNG_INCLUDE_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/include
USE_D3D:BOOL=ON
USE_FREEIMAGE:BOOL=ON
USE_GL2PS:BOOL=ON
USE_TBB:BOOL=OFF
USE_VTK:BOOL=OFF
VCPKG_APPLOCAL_DEPS:BOOL=ON
VCPKG_TARGET_TRIPLET:STRING=x64-windows-static
ZLIB_INCLUDE_DIR:PATH=E:/tools/vcpkg/installed/x64-windows-static/include
ZLIB_LIBRARY_DEBUG:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/debug/lib/zlibd.lib
ZLIB_LIBRARY_RELEASE:FILEPATH=E:/tools/vcpkg/installed/x64-windows-static/lib/zlib.lib

dependencies

FreeImage.all or other DLL dependencies and the executable TCL

build

cmake --build . --config Release --target install -- /target:Clean;ReBuild /p:Configuration=Release /p:Platform=x64 /p:VcpkgTriplet=x64-windows-static

@luzpaz
Copy link
Contributor

luzpaz commented Dec 24, 2018

we are making a distinction between OCC and OCCT, correct ?

@PhoebeHui PhoebeHui added the category:new-port The issue is requesting a new library to be added; consider making a PR! label Jan 17, 2019
@traversaro
Copy link
Contributor Author

we are making a distinction between OCC and OCCT, correct ?

When I originally opened the issue, I was not aware of the difference. I personally think it make sense to have two separate ports for each of them. If they are side-by-side installable, this is trivial, while if they conflict I think we can handle the conflict as done for the libmariadb/libmsql conflict:

@luzpaz
Copy link
Contributor

luzpaz commented Feb 7, 2019

When I originally opened the issue, I was not aware of the difference. I personally think it make sense to have two separate ports for each of them.

I agree

@greenbrettmichael
Copy link
Contributor

USE_VTK should be on to support the popular visualization module of OpenCASCADE, however VTK would need tk, which is currently bypassed in that build. I requested a new port for tk here #7648, which is needed to get VTK ready to support this port.

@christianlandgraf
Copy link

Is there any update regarding the integration of OpenCASCADE into vcpkg?

@greenbrettmichael
Copy link
Contributor

@christianlandgraf OpenCASCADE requires tcl, tk, and freetype2 and optionally requires DirectX, FFMPEG, freeimage, GLES2, rapidJSON, TBB, and VTK (with tk).

I added x86 and x64 windows support for tcl here #8026 . Which was a big blocker for tk. VCPKG has ports for freetype, FFMPEG, freeimage, TBB.

I am not sure any action is required for USE_D3D or USE_GLES2 .

This leaves the remaining blockers as a tk port and updating the VTK port to use the tk port (for USE_VTK)

@silentmissile
Copy link

this issue was opend almost one year ago, I can compile it by myself, but I still hope to have an easy pkg manager system to manage it

at first, its shorten name was OCC, several years before, there were many bugs in official version, so the community developed another branch to fix the bugs, the community version is called "opencascade community edition" which is shorten to OCE, from then on the official version shorten name became OCCT which means opencascade technology

official version is good, and it bumps to new and new, now the newest version is 7.4.0

the community version is also good, but it seems not good not, because the formal release of community version was released 3 years ago, that version is based on official version 6.9.0

so personally I prefer official version

@JackBoosY
Copy link
Contributor

@silentmissile Thanks for notice.

@aslze
Copy link

aslze commented May 25, 2020

Official version is indeed 7.4.0 (October 2019). They do not have a public repo but regularly publish releases here:

https://www.opencascade.com/content/latest-release

However, downloading the source code from the link:

https://www.opencascade.com/sites/default/files/private/occt/OCC_7.4.0_release/opencascade-7.4.0.tgz

Requires you to log in with your account!

What can we do? Copy the .tgz to a mirror somewhere? Make a github repo with a copy of the code? (not even sure Vcpkg supports .tgz archives).

I've compiled OCCT many times, I can try to add it here if I have the time... and if I solve the above issue.

EDIT

I just found out they do have a public repo:

https://git.dev.opencascade.org/gitweb/?p=occt.git;a=summary

You can clone it or download a snapshot for a tag. E.g (7.4.0patch1):

https://git.dev.opencascade.org/gitweb/?p=occt.git;a=snapshot;h=refs/tags/V7_4_0p1;sf=tgz

@ahoarau
Copy link
Contributor

ahoarau commented Jun 26, 2020

They now have an official mirror : https://github.com/Open-Cascade-SAS/OCCT

@JackBoosY
Copy link
Contributor

Hi guys, does anyone want to open a PR to add this port?

@ahoarau
Copy link
Contributor

ahoarau commented Jul 7, 2020

I'm curious : would it support different configurations ? because I see that it is optionally using VTK, TCL-TK and so on. Some of us might want the strict necessary

@JackBoosY JackBoosY added the info:good-first-issue This issue would be a good issue to get one's feet wet in solving. label Jul 7, 2020
@marekr
Copy link
Contributor

marekr commented Aug 2, 2020

I'm going to be adding a OCCT port as its on our critical path to dumpster msys among other dependencies

@ahoarau
Copy link
Contributor

ahoarau commented Sep 4, 2020

@marekr any news on the PR ? did you solve the TCL-TK port ?

@marekr
Copy link
Contributor

marekr commented Sep 11, 2020

Well, I put occt in vcpkg on hold for now
The problem with OCCT, is it requries specifically, tcl and tk 8.6.
TCL in vcpkg is already 9.0 :/ The only alternative is to download and build tcl/tk 8.6 within the OCCT port and use it only inside.

@ahoarau
Copy link
Contributor

ahoarau commented Sep 11, 2020

We can also have it with BUILD_MODULE_Draw=False for now, and update it later on ?

@marekr
Copy link
Contributor

marekr commented Sep 12, 2020

Hmm, yes looks like that will work. Let me see what I can knock out quickly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:new-port The issue is requesting a new library to be added; consider making a PR! info:good-first-issue This issue would be a good issue to get one's feet wet in solving.
Projects
None yet
Development

Successfully merging a pull request may close this issue.