Docs: Add IfcOpenShell to ThirdPartyLibraries
Closes #18650
This PR is still incomplete. It's missing a way to report the IfcOpenShell version and correcting whitespace uniformity.
Anybody available to advise how to check ifcopenshell version info ?
@luzpaz Like inside FC?
Open Python Console, run:
>>> import ifcopenshell
>>> ifcopenshell
>>> ifcopenshell.version
>>>
For me, after ifcopenshell.version it prints out: '0.8.1.post1'
@tetektoza thanks, I'm aware of this but the issue is there is a delay when opening ifcopenshell per @oursland's observations in
- https://github.com/FreeCAD/FreeCAD/issues/20837#issuecomment-2856750487
So i wonder if there is anyway around that? Maybe if ifcopenshell isn't loaded then we shouldn't load it and not show a version ? Thoughts?
Hi @oursland, what's your opinion on this given #20837 ?
@luzpaz All installed packages are included on the weekly releases and tagged releases in the file packages.txt (FreeCAD.app/Contents/packages.txt on macOS). This could be parsed to determine the version of ifcopenshell.
Alternatively, assuming that ifcopenshell is available at compile time and does not change, we can extract the version in CMake and place it in a #define within Version.h. This wouldn't capture updates that may take place after compilation, but this could be a compile time option used only for fixed-ifcopenshell releases.
@hyarion could you weigh in ?
ifcopenshell is LGPL3, not LGPL2.1+ so including it would probably not be a good idea. My understanding is that FreeCAD would have to be distributed as LGPL3.0/GPL3.0 if we include it.
We could improve the error message and create an addon that makes it easy to install latest ifcopenshell (would just be an empty package that tells FC to install it through pip)
fcopenshell is LGPL3, not LGPL2.1+ so including it would probably not be a good idea. My understanding is that FreeCAD would have to be distributed as LGPL3.0/GPL3.0 if we include it.
We could improve the error message and create an addon that makes it easy to install latest ifcopenshell (would just be an empty package that tells FC to install it through pip)
That is a whole separate plot twist. If that's true then the discussion needs to be reexamined. I'm not sure the BIM folk are aware of that.
That is a whole separate plot twist. If that's true then the discussion needs to be reexamined. I'm not sure the BIM folk are aware of that.
I think this is the reason why the library isn't included in the first place?
It is included (more exactly, distributed if that makes a difference) in the snap builds, and I believe in the weekly Appimages as well.
The snap build fetches the ifcopenshell package from PyPI, installs it in the staging area during the build, it and bundles it with the resulting .snap package.
Quoting https://wiki.freecad.org/IfcOpenShell:
For Windows and MacOS systems, FreeCAD distributions put together with the Conda package manager usually include IfcOpenShell already so no further installation is necessary. Get the appropriate distribution from the Download page.
The AppImage for Linux is also based on Conda, and it also includes IfcOpenShell.
We can remove them from future releases if there is a license-related concern.
I think we first have to establish whether there is a license incompatibility issue or not. Was there any research done back when ifcopenshell was included in the Conda builds? I did not do any additional research for the snap package inclusion, as I didn't even think it would be an issue. But my own ignorance is not an excuse :-)
@hyarion can you ellaborate on you concern?
No, I did not investigate license concerns when I included it into the builds. Given this is a fully open source project, it seemed like a non-issue. I am still unconvinced there is an issue, but in the case that there is a concern the fix is fairly straightforward.
To my understanding we cannot distribute freecad under lgpl2.1+ if we have lgpl3 code or hard dependencies in the project. We can distribute it under lgpl3 though (or even gpl3), even if we keep the source code as lgpl2.1+.
I'm not a lawyer but I've never seen anything that indicates that this would not be the case.
The most simple solution would be to distribute the build binaries as lgpl3.
Thank you. I'm not an expert, so I have more questions than answers:
if we have lgpl3 code
But we don't, do we? The FreeCAD repo does not have any portion of the ifcopenshell code. We fetch ifcopenshell as an external component and we bundle it in the binary package.
or hard dependencies in the project.
Would ifcopenshell constitute a hard dependency? FreeCAD does not require ifcopenshell to build. We are only using its Python API bindings by the BIM workbench at runtime, if that makes a difference.
Indeed I hadn't thought about that... (There might have been a relicensing somewhere... I didn't remember IfcOpenShell was LGPL3). In any case I believe @hyarion is right. We can provide LGPL3 libs together with FreeCAD (The LGPL2.1 license of FreeCAD allows that.), but then the provided bundle becomes LGPL3.
I don't think this is fundamentally a problem. We have taken good care in the last years to remove anything like pure GPL2 code that would prevent this kind of "automatic" relicensing. But, this needs to be agreed upon by the FreeCAD devs, and correctly documented and informed to the public.
I would say this is a good opportunity to assess the whole thing better, and make a list of everything we bundle together with FreeCAD, not in the source code but in the packages, and check for the licenses.
Let's debate this point at next devs meeting? I'll add to the agenda at https://github.com/FreeCAD/FreeCAD-developer-meetings/blob/main/Agendas/agenda-2025-06-01.md
I've dived deeper into the rabbit hole of license LGPL licenses and I was wrong at this specific case.
I found a nice compatibility matrix over at GNU, which states:
I want to license my code under LGPLv2.1 or later and I want to use a library under LGPLv3 is OK
This is contrary to: I want to license my code under LGPLv2.1 or later and I want to copy code under LGPLv3 is OK: Combination is under LGPLv3 with footnote If you have the ability to release the project under LGPLv2.1 or any later version, you can choose to release it under LGPLv3 or any later version—and once you do that, you'll be able to incorporate the code released under LGPLv3
The above only covers using LGPL3 in LGPL2.1, how this relates to combing LGPL2.1 with other (non-gnu) licenses is a bit of a gray area.
Sorry for the noise
Sorry for the noise
Not at all, glad we've had the discussion. Thanks!
Thanks for checking on that, @hyarion.
A proper SBOM should be added to automate compliance checks. I have created issue https://github.com/FreeCAD/FreeCAD/issues/21626 to track this.
We still haven't mentioned IfcOpenShell in ThirdPartyLibraries... is that problematic at all from a licensure POV ?
We still haven't mentioned IfcOpenShell in ThirdPartyLibraries... is that problematic at all from a licensure POV ?
The current understanding is that this is not an issue.
Should I close this PR then and link #18650 to #21626 ?