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!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: FreeCad IfcOpenShell and Ubuntu

Post by sgrogan »

bje wrote: Tue Sep 28, 2021 10:50 am 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.
FreecadVin wrote: Wed Sep 22, 2021 11:13 am Shouldn't the ifcopenshell be installed (copied) into the snap. Unfortunately I can't do that. As I'm not the snap-owner.
The problem is that snap and appimage are meant to be self contained packages. To get them to find any extras needs tricks alike @bge has posted.
The Conda based appimage that FreeCAD publishes tries to anticipate this and includes many extras, like ifc, in the package. Which makes the package size increasingly bigger.

I would encourage any Ubuntu or Ubuntu based (Mint for ex.) to use the FreeCAD-daily PPA. Compiling yourself is still the best.
"fight the good fight"
User avatar
proghettolab
Posts: 52
Joined: Sat Jun 27, 2020 3:09 pm

Re: FreeCad IfcOpenShell and Ubuntu

Post by proghettolab »

bje wrote: Tue Sep 28, 2021 10:50 am
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.
I don't have ~/snap/freecad/current/.FreeCAD/Mod/BIM directory but

/home/pmb/snap/freecad/common/Mod/BIM
and
home/pmb/snap/freecad/common/.FreeCAD/Mod/BIM.

I've put the ifcopenshell directory under both of them but nothing! :?:

Any ideas?
furgo
Posts: 65
Joined: Wed Apr 19, 2023 5:18 am

Re: FreeCad IfcOpenShell and Ubuntu

Post by furgo »

This is an old post, but I found myself in the same situation, and the following steps worked:

1. Open the OS's terminal
2. Install ifcopenshell by typing:

Code: Select all

freecad.pip install ifcopenshell
3. Install lark as an additional dependency by typing:

Code: Select all

freecad.pip install lark
Restart FreeCAD (I'm not sure if it's necessary, though), and export and importing IFC files should work.

Code: Select all

OS: Ubuntu Core 22 (ubuntu:GNOME/ubuntu-xorg)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.34291 (Git) Snap 773
Build type: Release
Branch: master
Hash: 71f1e6b09baa45812026832dfd74e59b5d4d1d35
Python 3.10.12, Qt 5.15.10, Coin 4.0.0, Vtk 7.1.1, OCC 7.7.1
Installed mods: 
  * A2plus 0.4.60n
  * fasteners 0.4.66
  * ExplodedAssembly
  * Assembly4 0.50.2
Post Reply