FreeCad IfcOpenShell and Ubuntu

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
cobo
Posts: 2
Joined: Sun May 31, 2020 11:00 am

FreeCad IfcOpenShell and Ubuntu

Post by cobo »

I am having trouble to install FreeCad with IfcOpenShell on Ubuntu 18.04.

Reading IFC files is actually for me the main purpose why I installed FreeCAD at all, but opening an IFC file always fails with the message "IfcOpenShell was not found on this system: IFC support is disabled". (I had to do this many times until I could read it once because that message disappears always after less time than what it takes for me to read even half the sentence...).

The version of FreeCAD I have installed seems to be recent: 0.18.4.

It comes with an addon manager, but that does not mention anything about adding IFC support.

Then I followed some instructions to add some freecad-community package to the apt installation system. Doing so warns that this is obsolete because FreeCAD does have an addon manager now. Ok, I have seen that, but it does not give me what I need, so I added that package anyway.

With that I was able to install IFC Open Shell with "sudo apt install ifcopenshell0" (only adding a zero at the end!) successfully.

But anyway - FreeCAD gives me the same error message - and now I am a bit lost:

Is there some instructions how to get a working FreeCAD/IfcOpenShell combination running on Ubuntu 18.04?
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: FreeCad IfcOpenShell and Ubuntu

Post by chrisb »

Hi and welcome to the forum!

You can see the message permanently in View->Panels->Report view.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCad IfcOpenShell and Ubuntu

Post by sgrogan »

cobo wrote: Sun May 31, 2020 11:10 am Is there some instructions how to get a working FreeCAD/IfcOpenShell combination running on Ubuntu 18.04?
Download the version that matches your system from here: https://github.com/IfcOpenBot/IfcOpenSh ... f8b638436a (scroll to the bottom of the page)
and extract to /usr/lib/python3/dist-packages (I think you will need sudo)

You can uninstall ifcopenshell0 from the PPA.
"fight the good fight"
cobo
Posts: 2
Joined: Sun May 31, 2020 11:00 am

Re: FreeCad IfcOpenShell and Ubuntu

Post by cobo »

Thanks for the advice: worked perfectly now!

At the same time I learned that IfcOpenShell is basically just a Python module.
User avatar
FreecadVin
Posts: 2
Joined: Tue Sep 21, 2021 9:24 am

Re: FreeCad IfcOpenShell and Ubuntu

Post by FreecadVin »

Hi, Importing ifcOpenShell into Freecad 19 snap hasn't worked for me yet. Can anyone tell me how I can make this work please?

What I tried several is copying the ifcOpenShell folder (the linux 64bit, found on github(above) and the .org version v0.6.0) everywhere I could find a python 3.8 folder. But Freecad keeps telling me I'm not succeeding. :)
The message on the python console:

>>> import ifcOpenShell
Traceback (most recent call last):
File "<input>", line 1, in <module>
ModuleNotFoundError: No module named 'ifcOpenShell'

My system:

OS: Ubuntu Core 20 (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Unknown
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.0
Locale: English/United States (en_US)

Python console information:

>>> import sys
>>> print(sys.path)
['/snap/freecad/22/usr/lib/python3/dist-packages/git/ext/gitdb', '/home/vincent/snap/freecad/22/.FreeCAD/Mod/BIM', '/home/vincent/snap/freecad/22/.FreeCAD/Mod/BCFPlugin', '/home/vincent/snap/freecad/22/.FreeCAD/Mod/Reinforcement', '/home/vincent/snap/freecad/22/.FreeCAD/Mod/dxf-library', '/home/vincent/snap/freecad/22/.FreeCAD/Mod/BIMBots', '/home/vincent/snap/freecad/22/.FreeCAD/Mod/bimtester', '/home/vincent/snap/freecad/22/.FreeCAD/Mod/Glass', '/home/vincent/snap/freecad/22/.FreeCAD/Mod/CADExchanger', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Web', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Tux', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Test', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/TechDraw', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Surface', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Start', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Spreadsheet', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Sketcher', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Show', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Robot', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/ReverseEngineering', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Raytracing', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Points', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Path', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/PartDesign', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Part', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/OpenSCAD', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/MeshPart', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Mesh', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Measure', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Material', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Inspection', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Import', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Image', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Idf', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Fem', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Drawing', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Draft', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Cloud', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/Arch', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod/AddonManager', '/snap/freecad/22/opt/local/FreeCAD-0.19/Mod', '/snap/freecad/22/opt/local/FreeCAD-0.19/lib', '/snap/freecad/22/opt/local/FreeCAD-0.19/Ext', '/snap/freecad/22/opt/local/FreeCAD-0.19/bin', '/snap/freecad/22/usr/lib/python38.zip', '/snap/freecad/22/usr/lib/python3.8', '/snap/freecad/22/usr/lib/python3.8/lib-dynload', '/snap/freecad/22/usr/lib/python3/dist-packages', '/home/vincent/snap/freecad/22/.FreeCAD/Macro', '/snap/freecad/22/opt/local/FreeCAD-0.19/Macro', '/snap/freecad/22/usr/lib/python3/dist-packages/gitdb/ext/smmap']
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: FreeCad IfcOpenShell and Ubuntu

Post by Syres »

FreecadVin wrote: Tue Sep 21, 2021 9:47 am >>> import ifcOpenShell
Traceback (most recent call last):
File "<input>", line 1, in <module>
ModuleNotFoundError: No module named 'ifcOpenShell'
That would never work even if IFC is installed correctly (it's case sensitive), the correct test is:

Code: Select all

import ifcopenshell
The other two modules that I'm aware of are:

Code: Select all

import importIFCHelper
import importIFCmulticore
User avatar
FreecadVin
Posts: 2
Joined: Tue Sep 21, 2021 9:24 am

Re: FreeCad IfcOpenShell and Ubuntu

Post by FreecadVin »

Thank you for trying to help me. 8-)

>>> import ifcopenshell
Traceback (most recent call last):
File "<input>", line 1, in <module>
ModuleNotFoundError: No module named 'ifcopenshell'

Still no luck, the importIFCHelper and importIFCmulticore do nothing. No error message nothing.

Shouldn't the ifcopenshell be installed (copied) into the snap. Unfortunedly I can't do that. As I'm not the snap-owner.

So if I install Freecad weekly builds appimage from https://github.com/FreeCAD/FreeCAD-Bund ... kly-builds I could use ifcopenshell?
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: FreeCad IfcOpenShell and Ubuntu

Post by Syres »

FreecadVin wrote: Wed Sep 22, 2021 11:13 am So if I install Freecad weekly builds appimage from https://github.com/FreeCAD/FreeCAD-Bund ... kly-builds I could use ifcopenshell?
Yes, I believe ifcopenshell is part of the AppImage, it's a long while since I used it as I compile FC on my Linux partition.
bje
Posts: 4
Joined: Tue Sep 28, 2021 10:44 am

Re: FreeCad IfcOpenShell and Ubuntu

Post by bje »

FreecadVin wrote: Tue Sep 21, 2021 9:47 am Hi, Importing ifcOpenShell into Freecad 19 snap hasn't worked for me yet. Can anyone tell me how I can make this work please?
I got it working by putting the ifcopenshell directory under ~/snap/freecad/current/.FreeCAD/Mod/BIM. That directory is in the default Python module search path according to the Python console.
Last edited by bje on Tue Sep 28, 2021 11:04 am, edited 1 time in total.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FreeCad IfcOpenShell and Ubuntu

Post by bernd »

BTW: FreeCAD 0.18 is outdated. There have been hundreds of fixes in the regard of ifc export and import.

It is recommended to use latest version if you work with ifc.

BTW: If you are able to compile FreeCAD yourself, it is easy to compile ifcopenshell too.

Latest ifcopenshell can be downloaded here. https://github.com/IfcOpenBot/IfcOpenSh ... its/v0.6.0 search for the newest commit which has a comment. This comment will be the binary to download for various OS and python versions.

cheers bernd
Post Reply