-
-
Notifications
You must be signed in to change notification settings - Fork 733
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
compile against opencascade 7.8.0 fails #4393
Comments
~~ Hmm. I bet the issue is https://github.com/FreeCAD/FreeCAD/blob/e0ecd213b2c34673cb58b9ee04f3a3db152e4b09/src/Mod/TechDraw/App/Makefile.am#L45 which doesn't use the libraries that were located at ~~ https://github.com/FreeCAD/FreeCAD/blob/e0ecd213b2c34673cb58b9ee04f3a3db152e4b09/cMake/FindOCC.cmake#L159-L164 is a useful example. |
We have a hardcoded list here. IfcOpenShell/cmake/CMakeLists.txt Lines 379 to 385 in bce0f0d
Some help would be very welcome if you know already what to do for 7.8 compatibility. |
Yes, see the second link above. You need to pull the TKIGES, TKSTEP, TKSTEPAttr, TKSTEP209 and TKSTEPBase out of the OPENCASCADE_LIBRARY_NAMES and then add a following if/else/endif clause that inserts either those five, or else TKDESTEP and TKDEIGES depending on the OCC_VERSION_STRING.
I'd just do that, except I don't know how to run this build or test it yet, so if somebody else is already set, maybe they can? Or educate me. |
looks like it works, although I did had to add the logic to define OCC_VERSION_STRING, copied straight from freecad's FIndOCC. Thanks! |
Oh, yeah. Duh. CMake isn't going to magically define OCC package strings. That's the right approach, glad you got it all going. |
BTW - given the rapid evolution of IfcOpenShell and thanks to the build service it has, I'm working on a tool to allow users to download and update their version of IfcOpenShell on the fly, from inside FreeCAD. We could then stop bundling it with FreeCAD. @adrianinsaval to reply your question above, IfcOpenShell is used 1) to import/export IFC files in Arch/BIM WB, and 2) as an engine when using NativeIFC. It is never a hard requirement to use Arch/BIM, only if you want to work with IFC. The fact that it is bundled in our installer comes from a time when it was somewhat harder to get your hands on a compatible build of IfcOpenShell, and many windows users had asked for it... And we can't say no to users... 😅 |
don't we need to always match the occt and python versions? |
The typical way shape data is exchanged between ifcopenshell and other libs is through string serializations of the occt topology. So there isn't a strict requirement on matching occt versions. Somewhere recently (7.7? / 7.8?) a new version v3 of the occt serialization format is introduced though, so that might result in incompatibilities if one keeps using the statically linked ifcopenshell binaries with 7.5. But the scenarios of passing topology data from freecad to ifcopenshell are probably limited. |
Indeed, that does not happen. For that, we use the API to create IFC objects. Serialization to strings is only used for ifcopenshell -> freecad. |
To avoid incompatibility between serialized shapes from OCCT, you can explicitly use the v1 format, even with OCCT 7.8, so that it can be read with older versions of OCCT, too. |
True, but that requires a change in the IfcOpenShell C++ code, which is troublesome for most users. @martin-bernhard if you have the code ready a PR would be appreciated :)
|
I dont't have a running version, but you should mainly replace line 245 by the following line: BRepTools::Write(s, sstream, true, false, TopTools_FormatVersion_VERSION_1); The constant |
I get this error when trying to compile against occt 7.8:
this is because some occt libs have been reorginized, see https://dev.opencascade.org/doc/overview/html/occt__upgrade.html#upgrade_occt780
cc @bgbsww while this is not a hard dependency for freecad main we ship it in our bundles, I think it's required by some arch wb functionalities and/or some of the addons that will be combined into it (@yorikvanhavre would know better what it's used for). If you have some spare time it would be nice to get help in migrating this to occt 7.8 too
The text was updated successfully, but these errors were encountered: