Problem with huge ifc file

This forum section is only for IFC-related issues
jureko
Posts: 21
Joined: Thu Oct 31, 2019 10:01 am

Problem with huge ifc file

Post by jureko »

Hi,
Im trying to import complicated and huge ifc file.
But I have problem: "access violation". What can I do with it?
Is it possible to import that file in FreeCad? I need to import it to other program finally, but FreeCad can export simple 'repaired' ifc files, who didn't want to import first directly.
File is here: https://www.dropbox.com/s/6vnfbb059z6uioi/cr.7z?dl=0



OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17505 (Git)
Build type: Release
Branch: master
Hash: 755536e9df94d2d39da1468420f1fd333c35da7a
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Polish/Poland (pl_PL)
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Problem with huge ifc file

Post by yorik »

There might be a number of reasons.. But thanks for providing the file, this always helps a lot.
I'll have a try with it...
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Problem with huge ifc file

Post by bernd »

I can confirm the crash.

Code: Select all

$ FreeCAD
FreeCAD 0.19, Libs: 0.19R18870 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2019
  #####                 ####  ###   ####  
  #                    #      # #   #   # 
  #     ##  #### ####  #     #   #  #   # 
  ####  # # #  # #  #  #     #####  #   # 
  #     #   #### ####  #    #     # #   # 
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

connect failed: Datei oder Verzeichnis nicht gefunden
Opening  /home/hugo/Desktop/EQUIPMENT12-CR-20191129.ifc ...done.
Building types and relationships table...done.
Parsing 1182 BIM objects...
1 / 1182 object #22 : IfcSite (arch) no brep : Site 
2 / 1182 object #26 : IfcBuilding (arch) no brep : Site 
3 / 1182 object #459 : IfcFlowController no layer found IfcFlowController (arch) 74k 15 solids : FlowController 
4 / 1182 object #601 : IfcFlowController no layer found IfcFlowController (arch) 74k 15 solids : FlowController 
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = FreeCAD path = /usr/local/bin pid = 13732
KCrash: Arguments: /usr/local/bin/FreeCAD 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit
5 / 1182 object #2545 : IfcFlowController no layer found IfcFlowController (arch)sock_file=/run/user/1000/kdeinit5__0
[2]   Exit 253                FreeCAD

[3]+  Angehalten              FreeCAD
hugo@Ahorn:~$ 
amazing geometry exported by Cadmatic. I have never had hands on a ifc from Cadmatic.

IFCpp can handle the file ...

Screenshot_20191211_180443.png
Screenshot_20191211_180443.png (774.86 KiB) Viewed 3513 times
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Problem with huge ifc file

Post by bernd »

ifcopenshell returns a segmentation fault ...

Code: Select all

import ifcopenshell
from ifcopenshell import geom
settings = ifcopenshell.geom.settings()
settings.set(settings.USE_BREP_DATA,True)
settings.set(settings.SEW_SHELLS,True)
settings.set(settings.USE_WORLD_COORDS,True)

ifcfile = '/home/hugo/Desktop/EQUIPMENT12-CR-20191129.ifc'
f = ifcopenshell.open(ifcfile)

p = f[2545]
print(p)
r = p.Representation

cr = ifcopenshell.geom.create_shape(settings, p)

Code: Select all

hugo@Ahorn:~$ python3
Python 3.7.3 (default, Apr  3 2019, 05:39:12) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> 
>>> 
>>> import ifcopenshell
>>> from ifcopenshell import geom
>>> settings = ifcopenshell.geom.settings()
>>> settings.set(settings.USE_BREP_DATA,True)
>>> settings.set(settings.SEW_SHELLS,True)
>>> settings.set(settings.USE_WORLD_COORDS,True)
>>> 
>>> ifcfile = '/home/hugo/Desktop/EQUIPMENT12-CR-20191129.ifc'
>>> f = ifcopenshell.open(ifcfile)
>>> 
>>> p = f[2545]
>>> print(p)
#2545=IfcFlowController('0fATcjTWP0sxix6lwwKpKC',#6,'',$,$,#2542,#2544,$)
>>> r = p.Representation
>>> 
>>> cr = ifcopenshell.geom.create_shape(settings, p)
Speicherzugriffsfehler
hugo@Ahorn:~$ 
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: Problem with huge ifc file

Post by paullee »

Similar result, IFC ++ open it, FreeCAD_0.19-18714-Linux-Conda_Py3Qt5_glibc2.12-x86_64.AppImage on Fedora 30 crash.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Problem with huge ifc file

Post by bernd »

there are lots of problem shapes ...

for example ...

Code: Select all

[2545, 10227, 17862, 20598, 21505, 22339]
IfcConvert crashes too ...

Code: Select all

hugo@Ahorn:~$ IfcConvert Desktop/EQUIPMENT12-CR-20191129.ifc 
IfcOpenShell IfcConvert 0.6.0b0 (OCC 7.3.0)
Scanning file...
Done scanning file   
Parsing input file took 5 seconds
Creating geometry...
[                                                  ]Speicherzugriffsfehler
hugo@Ahorn:~$ 
What what should not happen, even if IfcOpenShell returns segmentation fault FreeCAD should not crash.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Problem with huge ifc file

Post by bernd »

@jureko

debugging a 100 MB file does not make fun at all. Would it be possible to just save the objects from the screens in two ifc files, each for each screen ... all these objects make ifcopenshell crash.


#10227, #17862, #20598, #21505, #22339
Screenshot_20191211_210332.png
Screenshot_20191211_210332.png (80.3 KiB) Viewed 3474 times


#2545 (only the green box)
Screenshot_20191211_210717_1.png
Screenshot_20191211_210717_1.png (179.47 KiB) Viewed 3474 times
jureko
Posts: 21
Joined: Thu Oct 31, 2019 10:01 am

Re: Problem with huge ifc file

Post by jureko »

As a curiosity I will say that a Blender with importifc plugin is able to load such a file. Now trying to convert to another format for FreeCad.
I also don't know if you know such a browser with editing options: usBIM.viewer+ v.BIM ONE. It also loads these files.
I tried to divide the file with it into smaller ones but the results were mediocre
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Problem with huge ifc file

Post by bernd »

Does Blender load this file? really? Blender uses same software as FreeCAD dos. See my earlier post, this software, ifcopenshell, crashes standalone as IfcConvert too.

Anyway would it be possible to provide simpler files with much much less objects. We are interested to find and fix the problem.
jureko
Posts: 21
Joined: Thu Oct 31, 2019 10:01 am

Re: Problem with huge ifc file

Post by jureko »

bernd wrote: Thu Dec 12, 2019 11:29 am Does Blender load this file? really? Blender uses same software as FreeCAD dos. See my earlier post, this software, ifcopenshell, crashes standalone as IfcConvert too.
Anyway would it be possible to provide simpler files with much much less objects. We are interested to find and fix the problem.
No, I made a mistake, though. I've already tried several different ways and I'm confused about the models. I tried Sketchup and I think I could open the exported ifc file (>500MB) in Blender. However, the original one suspends the blender.
Unfortunately, I don't have any smaller files, I would like to have them myself then it would be easier.
Post Reply