New libpacks for Windows with VTK and OCCT7 by sgrogan

Having trouble installing or compiling FreeCAD? Get help here.
yves78
Posts: 49
Joined: Wed Nov 26, 2014 8:32 pm

Re: New libpacks for Windows with VTK and OCCT7 by sgrogan

Postby yves78 » Fri Mar 31, 2017 7:44 pm

I was away, and just tested your way of building freecad.

It worked perfectly. I just have two remarks which for my opinion could be helpful for newbies :

- "14) Copy the bin subdirectory to the root of the build folder."
You should specify which bin subdirectory you mean.
You can reuse the same item in CompileOnWindows page, which is : "Copy libpack\bin folder into the new build folder CMake created"

- "16) There will be 2 drop downs in the VS toolbar menu. Change Debug to Release.
Click the dropdown for Win32 and “Configuration Manager...” From the “Active solution
platform” dropdown choose new, then from the “Type or select the new platform” dropdown select
“x64” Close all sub-menus."
I changed debug to release, but the dropdown was already on X64, no need to switch from Win32 to x64 : may be it could specified as
optional, if x64 is not already set ?

Thanks again !
peterl94
Posts: 999
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: New libpacks for Windows with VTK and OCCT7 by sgrogan

Postby peterl94 » Sat Jul 22, 2017 2:12 pm

I've patched netgen 5.3 to work with occt7 (it should work with 7.1, but I have only tested with 7.0 in the libpack). The code is here: https://github.com/peterlama/netgen/tree/5.3-occt7-win. In addition to applying wmayer's and vejmarie's changes, I have modified the project file and install script to makes things more convenient. I would have used netgen 6.2, but I read somewhere it uses C++11 features that don't work with VS 2013.

Install instructions:
1. Checkout branch 5.3-occt7-win in https://github.com/peterlama/netgen.git
2. Open netgen\windows\nglib_config.props in a text editor and change <PrefixPath> for the x64 configuration to the path of FreeCADLibs_11.5.2_x64_VC12 (e.g C:\Users\peter\freecad\FreeCADLibs_11.5.2_x64_VC12). The location of the occt include folder is specified in nglib_config.props too, if you need to change it.
3. Open nglib.sln in VS 2013
4. Build the Release(OCC)|x64 or Debug(OCC)|x64 configuration.
5. The library and headers will be installed to netgen\nglib-instOCC_x64

Note that the Win32 configuration with FreeCADLibs_11.5.1_x86_VC12 is not working at the moment. I haven't found out why yet.

My windows 7 install is broken currently, or else I would provide a pre-compiled package.

I hope it works for you guys.
User avatar
sgrogan
Posts: 5140
Joined: Wed Oct 22, 2014 5:02 pm

Re: New libpacks for Windows with VTK and OCCT7 by sgrogan

Postby sgrogan » Sat Jul 22, 2017 2:24 pm

peterl94 wrote:
Sat Jul 22, 2017 2:12 pm
Note that the Win32 configuration with FreeCADLibs_11.5.1_x86_VC12 is not working at the moment. I haven't found out why yet.
Thanks Peter!! I think I still have a non-portable path in the 11.5.1 build. Please don't spend time on this, I still need to build OCCT 7.1 with wmayers patch to re-name the debug libs properly.
Speaking of debug libs, has anyone found a solution for VTK debug libs, similar to what wmayer has provided for OCCT?
peterl94
Posts: 999
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: New libpacks for Windows with VTK and OCCT7 by sgrogan

Postby peterl94 » Sat Jul 22, 2017 2:33 pm

sgrogan wrote:
Sat Jul 22, 2017 2:24 pm
Speaking of debug libs, has anyone found a solution for VTK debug libs, similar to what wmayer has provided for OCCT?
I recently discovered cmake has a built-in variable for doing this. No patching required, just set CMAKE_DEBUG_POSTFIX=d
User avatar
saso
Posts: 1224
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: New libpacks for Windows with VTK and OCCT7 by sgrogan

Postby saso » Sat Jul 22, 2017 4:00 pm

Great! This one was hanging in the air for a long time :)
User avatar
sgrogan
Posts: 5140
Joined: Wed Oct 22, 2014 5:02 pm

Re: New libpacks for Windows with VTK and OCCT7 by sgrogan

Postby sgrogan » Sun Jul 23, 2017 1:51 pm

peterl94 wrote:
Sat Jul 22, 2017 2:33 pm
I recently discovered cmake has a built-in variable for doing this. No patching required, just set CMAKE_DEBUG_POSTFIX=d
Fantastic! Thanks again Peter :)
wmayer
Site Admin
Posts: 14359
Joined: Thu Feb 19, 2009 10:32 am

Re: New libpacks for Windows with VTK and OCCT7 by sgrogan

Postby wmayer » Sun Jul 23, 2017 2:25 pm

peterl94 wrote:I would have used netgen 6.2, but I read somewhere it uses C++11 features that don't work with VS 2013.
https://forum.freecadweb.org/viewtopic. ... 10#p139222
I recently discovered cmake has a built-in variable for doing this. No patching required, just set CMAKE_DEBUG_POSTFIX=d
Cool! Never heard of that one.
User avatar
sgrogan
Posts: 5140
Joined: Wed Oct 22, 2014 5:02 pm

Re: New libpacks for Windows with VTK and OCCT7 by sgrogan

Postby sgrogan » Mon Jul 24, 2017 11:31 pm

peterl94 wrote:
Sat Jul 22, 2017 2:12 pm
I hope it works for you guys.
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11654 (Git)
Build type: Release
Branch: master
Hash: 81bdb1f276540427872c72d2033c3f400a89a626
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Locale: English/UnitedStates (en_US)
First time in a long time I've been able to compile FC w/nglib on Win!
peterl94 wrote:
Sat Jul 22, 2017 2:12 pm
it should work with 7.1, but I have only tested with 7.0 in the libpack
I have a problem with OCCT7.1, I'll post more on this later.
Thanks again peterl94, this has been kicking my ass for a long time.
peterl94
Posts: 999
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: New libpacks for Windows with VTK and OCCT7 by sgrogan

Postby peterl94 » Wed Jul 26, 2017 12:32 am

sgrogan wrote:
Mon Jul 24, 2017 11:31 pm
I have a problem with OCCT7.1
Just tried it myself. It should work now with this commit.
User avatar
sgrogan
Posts: 5140
Joined: Wed Oct 22, 2014 5:02 pm

Re: New libpacks for Windows with VTK and OCCT7 by sgrogan

Postby sgrogan » Thu Jul 27, 2017 8:54 pm

peterl94 wrote:
Wed Jul 26, 2017 12:32 am
Just tried it myself. It should work now with this commit.
Thanks everyone that worked on this, and a special thanks to Peter for making it so simple that even I can't muck it up ;)