realthunder / FreeCAD

Link branch FreeCAD
Other
763 stars 45 forks source link

[Problem/Fix] OCC 7.8.0 Support #963

Closed scottmudge closed 6 months ago

scottmudge commented 6 months ago

Is there an existing issue for this?

Version

0.21 (Development)

Full version info

[code]
OS: Windows 11 build 22621
Word size of FreeCAD: 64-bit
Version: 2024.0220.0.39107 (Git)
Build type: Release
Branch: MudgeBranch_OCC780
Hash: 51fcbef7582b8b453b22da14a075d666e0d35cc6
Python 3.11.8, Qt 5.15.12, Coin 4.0.1rt, Vtk 9.3.0, OCC 7.8.0
Locale: English/United States (en_US)
Installed mods: 
  * asm3 0.12.2
  * CfdOF 1.25.2
  * Curves 0.6.23
  * ExplodedAssembly
  * fasteners 0.5.12
  * fcgear 1.2.0
  * FEM_FrontISTR 0.1.0
  * InventorLoader 1.4.0
  * update.sh
[/code]

Subproject(s) affected?

None

Problem description

I've rebuilt the Windows LibPack with all of the latest libraries -- OCC 7.8.0, Boost 1.84, Python 3.11.8, QT 5.15.12, VTK 9.3, etc., but I was having issues with the LinkStable branch not compiling against OCC 7.8.0.

I went through the main/upstream commits and cherry-picked out their OCC 7.8.0 fixes, but even so there were a few differences with your branch which needed some extra compatibility changes. Primarily around the removal of HashCode() variants from OCC, in addition to some NETGEN compatibility issues.

I fixed all of the issues and it now compiles against all of the latest libraries.

I haven't created a PR, since my main branch has a few other customizations features which you may not want, but I squashed the relevant commits to compatibility fixes, and pushed them here:

https://github.com/scottmudge/FreeCAD/commit/ec9bb1e036b5be503affc1bc538b86d98b8c1236

If you want to reference them to quickly update compatibility on your end. You should be able to unpin OCC on the conda builds after these changes.

Note, the header/include changes were primarily geared for Windows built with PRECOMP enabled, so there may be some extra additions/removals of OCC headers required in the non-precompiled header include blocks, but I tried to make sure they were equivalent.

Anything else?

No response

Code of Conduct

realthunder commented 6 months ago

I am in the process of merging with upstream. So I guess my branch will be getting many of the fixes in that process. I'll come back to check out your patches to fix any missed out places.

scottmudge commented 6 months ago

Excellent, looking forward to the upstream merge. I recall you mentioning you don't use FEM much, but I did notice that the latest version of Netgen had some issues with OCC 7.8.0. I had to slightly alter the public interface of the Netgen library to get it working on Windows, but it might just be a Windows issue.

I'll close this issue for the time being, but let me know if you notice any weirdness with Netgen, and I'll share the changes I made to get it working with all of the FEM solvers.