[SOLVED] IfcPlusPlus compiled on Gentoo - questions and alternatives?

This forum section is only for IFC-related issues
User avatar
Moult
Posts: 223
Joined: Sat Jan 05, 2019 11:46 am
Contact:

[SOLVED] IfcPlusPlus compiled on Gentoo - questions and alternatives?

Postby Moult » Sun Jan 06, 2019 12:06 pm

Good day all! I have compiled IfcPlusPlus on Gentoo Linux. First, I cloned the latest master of the https://github.com/ifcquery/ifcplusplus repo, and then I did simply

Code: Select all

cmake && make && make install
, which worked all without any issues at all. Before, I double checked that the following packages were already compiled on my system. I hope this information is useful for other Gentoo users :)

Code: Select all

dev-games/openscenegraph
x11-apps/xrandr
media-libs/tiff
app-text/poppler
gnome-base/librsvg
x11-libs/cairo
net-misc/curl
x11-libs/gtkglext
sci-libs/gdal
media-libs/libsdl
media-libs/gstreamer
media-libs/openjpeg
This is what I see when I run the program and load the example IFC file provided in the repo:
2019-01-06-224807_1060x661_scrot.png
2019-01-06-224807_1060x661_scrot.png (132.38 KiB) Viewed 843 times
I have a few questions:
  1. You will notice that some icons are not visible on the left toolbar. I noticed when I ran the program it says

    Code: Select all

    QIODevice::read (QFile, ":styles.css"): device not open
    . I have tried playing the styles.css file in the same dir as the executable, but that didn't help. Any ideas how to resolve this? The buttons function perfectly, just are missing icons.
  2. My compiled "SimpleViewerExample" does not look the same as the screenshot on https://github.com/ifcquery/ifcplusplus. I can confirm that the Windows downloadable binary looks like the screenshot, whereas mine looks rather lacking and is missing some vital features. For example I cannot see any attributes of the IFC elements, I cannot export, and nor can I filter, which are all available functions on the Windows version. Any ideas why?
  3. I got the example IFC test file from bernd's fork but was unable to find any other complex IFC files to test and open. I tried to download the King merged one but the link is broken it seems.
  4. Are there any other IFC viewers that are both open source and available for Linux apart from FreeCAD? I'd very much like to check them out. Even a simple graph / tree visualiser for the STEP code would be very useful.
Other than that, running smooth!
Last edited by Moult on Fri Feb 08, 2019 9:10 am, edited 1 time in total.
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.
paullee
Posts: 1842
Joined: Wed May 04, 2016 3:58 pm

Re: IfcPlusPlus compiled on Gentoo - questions and alternatives?

Postby paullee » Sun Jan 06, 2019 2:38 pm

Hi, there is a file with name below but couldn't find it at the moment, you may search the web if it is still available.

155MB 210_King_Merged.ifc

https://forum.freecadweb.org/viewtopic. ... 30#p204902
https://forum.freecadweb.org/viewtopic.php?f=39&t=5131
https://www.autodeskresearch.com/projec ... tal210king
User avatar
bernd
Posts: 8488
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: IfcPlusPlus compiled on Gentoo - questions and alternatives?

Postby bernd » Sun Jan 06, 2019 7:24 pm

@Moult:

thanks for sharing the informations ...

1. I noticed too, we solved this some years ago on Qt4 https://forum.freecadweb.org/viewtopic. ... =70#p54106 but it came back ... with Qt5 and lots of changes in cmake. Means on my Debian I have the same problem, but I never had a deep look at this.

2. Yes the downloadable windows viewer is not build with the github repo, it includes closed source code from Fabian Gerold (the founder and maintainer)

3. The Kings file seams no longer available on the origin site. Search the web, there are hundreds of ifc files. Even here on the ifc topics are dozens of files. Some simple ones ... https://github.com/IfcOpenShell/files

4. There seam to be a viewer in ifcopenshell (the library FreeCAD uses) but I do not know it it really works ... https://github.com/IfcOpenShell/IfcOpen ... c/qtviewer I do not know other than these too. There is a C# project which may run with mono, but I never used mono. http://docs.xbim.net/

Ahh welcome to FreeCAD forum. What do you do with ifc files?

cheers bernd
User avatar
Moult
Posts: 223
Joined: Sat Jan 05, 2019 11:46 am
Contact:

Re: IfcPlusPlus compiled on Gentoo - questions and alternatives?

Postby Moult » Mon Jan 07, 2019 12:33 pm

Ah ok :)

1. Ok. Purely aesthetic, so I'll live with it :)
2. Shame.
3. Thanks for the repo tip!
4. Nice, I will try out ifcopenshell :) I have used IfcConvert many times before on Windows :)

I am an architect in Sydney, used to do software dev, and currently have to use Revit at work. I'd like to learn FreeCAD and push IFC and OpenBIM further in the industry :) I might ask a lot of beginner questions here, so stay tuned!
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.
User avatar
yorik
Site Admin
Posts: 11585
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: IfcPlusPlus compiled on Gentoo - questions and alternatives?

Postby yorik » Mon Jan 07, 2019 1:02 pm

As the name "SimpleViewerExample" says, I believe this was just meant as an example of how to use the ifc++ library in an application...
But indeed it does the job really well. It's my favorite IFC viewer too (apart from being the only one on linux indeed...) but also it is really fast, and also because it is at the same time robust (will swallow just any ifc file, unlike many other serious bim apps) and will notify you of many errors found in the file. If my ifc files open in ifc++ without errors, i use to declare them good for the world (and the fault is on revit, not me :) )

I wish someone would take the simpleviewer example code, and add an additional panel to show the properties and quantities of selected items... That would not be too much work I think, and instantly turn it way more powerful...

About the icons, I have the same problem, but almost never needed to use these buttons anyway..
User avatar
bernd
Posts: 8488
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: IfcPlusPlus compiled on Gentoo - questions and alternatives?

Postby bernd » Mon Jan 07, 2019 1:05 pm

Moult wrote:
Mon Jan 07, 2019 12:33 pm
I am an architect in Sydney, used to do software dev, and currently have to use Revit at work. I'd like to learn FreeCAD and push IFC and OpenBIM further in the industry :) I might ask a lot of beginner questions here, so stay tuned!
Go on and come up with any question you have. Ahh for Revit there was an opensource ifc implementation too on sourceforge. https://sourceforge.net/projects/ifcexporter/ I have never met some one who actually uses this. Would be cool to know more about this.
User avatar
bernd
Posts: 8488
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: IfcPlusPlus compiled on Gentoo - questions and alternatives?

Postby bernd » Mon Jan 07, 2019 1:07 pm

yorik wrote:
Mon Jan 07, 2019 1:02 pm
I wish someone would take the simpleviewer example code, and add an additional panel to show the properties and quantities of selected items... That would not be too much work I think, and instantly turn it way more powerful...
+1 but we AFAIK gone share the same problem Yorik ... the FreeCAD ToDo list is just to long, to do development for ifc++ :mrgreen:
User avatar
yorik
Site Admin
Posts: 11585
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: IfcPlusPlus compiled on Gentoo - questions and alternatives?

Postby yorik » Tue Jan 08, 2019 2:15 pm

bernd wrote:
Mon Jan 07, 2019 1:05 pm
Go on and come up with any question you have. Ahh for Revit there was an opensource ifc implementation too on sourceforge. https://sourceforge.net/projects/ifcexporter/ I have never met some one who actually uses this. Would be cool to know more about this.
It is still there (now on github). That plugin works way better than the built-in IFC support (both for import and export), but the big limitations when importing IFC into revit are still there...
bernd wrote:
Mon Jan 07, 2019 1:07 pm
the FreeCAD ToDo list is just to long, to do development for ifc++
Indeed, no way on my side either... I hope more people appear!
User avatar
Moult
Posts: 223
Joined: Sat Jan 05, 2019 11:46 am
Contact:

Re: IfcPlusPlus compiled on Gentoo - questions and alternatives?

Postby Moult » Fri Jan 11, 2019 11:43 am

I have used the Revit open source IFC importer / exporter and it still has a lot of issues, especially with IFC4.

I asked Thomas, the main developer behind IfcOpenShell and he has this to say:
The source is here [0]. It’s a PyQt5-based viewer and also relies on PythonOCC for the graphical part. You can start it with:

from ifcopenshell.geom.app import application
application().start()

[0] https://github.com/IfcOpenShell/IfcOpen ... pp.py#L179

The C++ qtviewer in the repo is a bit of a tease unfortunately. Several people have mentioned they would like to contribute to it, but so far nothing concrete. So for the time being I leave it there.
I ran the code and I get this lovely viewer. Note you will first need to compile PythonOCC. It has a few bugs perhaps because my version of PythonOCC is more up to date than what it was built for but nothing I couldn't modify in the Python app to fix. Here's a screenshot for the curious! It works very well!
2019-01-11-223507_1020x769_scrot.png
2019-01-11-223507_1020x769_scrot.png (136.94 KiB) Viewed 708 times
I have found a lot of code examples on how to use IfcOpenShell to parse the IFC file quite easily (you will notice in that viewer there is a dynamic python console in it too!). This seems like a much more powerful tool (once the bugs are ironed!) than IfcPlusPlus.
I also blog about 3D rendering, architecture, software and other on thinkMoult.com. RSS / Atom feed available for your convenience.
User avatar
yorik
Site Admin
Posts: 11585
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: IfcPlusPlus compiled on Gentoo - questions and alternatives?

Postby yorik » Fri Jan 11, 2019 12:34 pm

Amazing, I had no idea they had such an advanced and complete viewer... Will have a look at it too