can't import multilayer walls as parametric arch objects

This forum section is only for IFC-related issues
lambda
Posts: 91
Joined: Sat Feb 25, 2017 3:10 pm
Contact:

can't import multilayer walls as parametric arch objects

Post by lambda »

Hi!

I have a fairly straight forward IFC demo file, that I try to import into FreeCAD: https://friends.ccbib.org/lambda/EFHeinfach06.ifc

However, if I try to import with standard settings, I get this error output for each outer wall (made up by a concrete layer and insulation):

Code: Select all

    adding 2 object(s) to Wand-003
Width & OverrideWidth & base.getWidths() should not be all 0 or None or [] empty list 
Fehler: Ungültiges Basisobjekt
3D-view is missing these walls and the room objects are also displaced. See the attached file.

If I set IFC import setting to "Import as non-parametric arch objects" (translated from German), I can import the model successfully, but of course this comes with its own downsides. Eg I don't get any room objects at all.

At the moment I'm not yet sure, whether the file contains some illegal content or FreeCADs IFC importer is the problem. I guess I have multiple questions:
  • Are there any known limitations of IFC support in FreeCAD, that I should be aware of. (Better to ask than run off in the wrong direction.)
  • Can anybody recommend a tool useful for inspecting IFC files, to easier see what's going on. Maybe also for automatically or manually validating them.
  • Does anybody know what's going on and can point me in the right direction.
BTW, my ultimate goal is to write a tool (ideally FreeCAD module), that can extract surface information from a model and calculate building properties like power necessary for conditioning, surface temperatures on a hot/cold day etc. For this I will likely need access to lot's of less common object properties from the IFC file. Is the whole information from the IFC file available in the FreeCAD DOM, or only a subset that maps to concepts that FreeCAD understands natively? Any thoughts on my project are appreciated. :)

OS: Debian GNU/Linux bullseye/sid
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21088 (Git)
Build type: Unknown
Branch: master
Hash: f0e246f86d4add646e1b041022d54b690cb4065e
Python version: 3.8.3
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: German/Austria (de_AT)
Attachments
IFCImportParametric.png
IFCImportParametric.png (11.1 KiB) Viewed 2195 times
IFCImportNonParametric.png
IFCImportNonParametric.png (15.74 KiB) Viewed 2195 times
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: can't import multilayer walls as parametric arch objects

Post by yorik »

That's a regression introduced likely with @paullee's extensions. Arch Walls SHOULD work even with Width & OverrideWidth & base.getWidths() not be all 0 or None or [] empty list. I'll have a look at it
*EDIT* no, that error message shouldn't be printed ( git commit 146a175370) but it doesn't modify the wall functionality. I'll have a look at your file...
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: can't import multilayer walls as parametric arch objects

Post by yorik »

Okay there was indeed a regression there, the wall object was not working anymore when made of aggregates of other objects, this is now fixed in git commit 6945e37635.

Strange, it looks like all the walls from this model were made this way... I had never seen such an IFC file before. This is from ArchiCAD right? We get too few ArchiCAD files to test around here, please submit more if you find other issues!
lambda
Posts: 91
Joined: Sat Feb 25, 2017 3:10 pm
Contact:

Re: can't import multilayer walls as parametric arch objects

Post by lambda »

yorik wrote: Mon May 18, 2020 1:07 pm Okay there was indeed a regression there, the wall object was not working anymore when made of aggregates of other objects, this is now fixed in git commit 6945e37635.
Thanks for the quick fix! The wall objects work now, though the messages during importing persist. Also the space objects are still placed incorrectly.
Strange, it looks like all the walls from this model were made this way... I had never seen such an IFC file before. This is from ArchiCAD right? We get too few ArchiCAD files to test around here, please submit more if you find other issues!
Yes, it is from ArchiCAD, but also exported with very special settings to cater for the planned physics calculations. I'll happily submit more files as I run into issues. Though some of them I might not be allowed to share publicly.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: can't import multilayer walls as parametric arch objects

Post by bernd »

yorik wrote: Mon May 18, 2020 1:07 pm Strange, it looks like all the walls from this model were made this way... I had never seen such an IFC file before. This is from ArchiCAD right? We get too few ArchiCAD files to test around here, please submit more if you find other issues!
Never versions of Allplan do save multilayer walls the same way as well as Vectorworks. I have seen only one ArchiCAD file which does it before. Seams to be the future to save the multilayer walls this way. I like it because it is easy to extract building shell geometry. Very important for the structural engineers.

bernd
paullee
Veteran
Posts: 5119
Joined: Wed May 04, 2016 3:58 pm

Re: can't import multilayer walls as parametric arch objects

Post by paullee »

yorik wrote: Mon May 18, 2020 9:48 am That's a regression introduced likely with @paullee's extensions. Arch Walls SHOULD work even with Width & OverrideWidth & base.getWidths() not be all 0 or None or [] empty list. I'll have a look at it
*EDIT* no, that error message shouldn't be printed ( git commit 146a175370) but it doesn't modify the wall functionality. I'll have a look at your file...
ArchWall indeed is complicated enough :)

I have another test and it seems whether it is 0.18 or 0.19_pre, 'return none' resulted in 'Error: Invalid base object'. May have another look and test how this should be tackled if Wall is supposed to work if Width is 0, e.g. so Addition should works ...

BTW, there is some recent discussion about multi-material and wishlist. Problem is before that multi-width was introduced, I found it did not work with basewire > 1 and reported in the thread. So problem may be more nested to untangled :D Anyway, will have a look and would like to solve that when there is a gap.

https://github.com/FreeCAD/FreeCAD/blob ... l.py#L1078

Code: Select all

        length  = obj.Length.Value

        # TODO currently layers were not supported when len(basewires) > 0	##( or 1 ? )
        width = 0
Screenshot from 2020-05-18 23-20-45.png
Screenshot from 2020-05-18 23-20-45.png (205.39 KiB) Viewed 2134 times
Screenshot from 2020-05-18 23-22-39.png
Screenshot from 2020-05-18 23-22-39.png (186.86 KiB) Viewed 2134 times
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: can't import multilayer walls as parametric arch objects

Post by yorik »

Yes the wall tool is becoming increasingly a big messy thing :) but @carlopav is designing a really interesting new one... And I'm more and more wanting to separate all the IFC-generation stuff from Arch objects too, which would also simplify things a lot
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: can't import multilayer walls as parametric arch objects

Post by carlopav »

yorik wrote: Wed May 20, 2020 8:39 am And I'm more and more wanting to separate all the IFC-generation stuff from Arch objects too, which would also simplify things a lot
YES YES YES!
follow my experiments on BIM modelling for architecture design
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: can't import multilayer walls as parametric arch objects

Post by bernd »

carlopav wrote: Wed May 20, 2020 1:40 pm
yorik wrote: Wed May 20, 2020 8:39 am And I'm more and more wanting to separate all the IFC-generation stuff from Arch objects too, which would also simplify things a lot
YES YES YES!
+1
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: can't import multilayer walls as parametric arch objects

Post by carlopav »

bernd wrote: Thu May 21, 2020 6:45 pm
yorik wrote: Wed May 20, 2020 8:39 am And I'm more and more wanting to separate all the IFC-generation stuff from Arch objects too, which would also simplify things a lot
I made a little experiment already in this direction: see this commit in my branch of archwall object. It's very very rough.

What I tried to do is:
- remove the inheritance of the Ifc Product from wall object;
- transform the IfcRoot class into simple functions, so we are able to apply them to every FreeCAD object, not just to Arch ones.
- in this way properties are added on the fly calling

Code: Select all

IFCutils.set_ifc_properties(obj, ifc_type="IfcProduct")
IFCutils.setup_ifc_attributes(obj)
the bad is that in this way we lose the possibility to update Ifc Attributes when IfcType changes. So i did set IfcType property as read-only, and I was going to experiment another function (that could be activated from the taskpanel for example) that change the type and update the attributes. It's a bit more coumbersome than just changing it, but that could work. It could simply be:

Code: Select all

obj.IfcType = "Wall"
IFCutils.setup_ifc_attributes(obj)
No experiments yet on the way arch objects are exported to Ifc... (that is the most of the work of course :roll: )

What do you think?
follow my experiments on BIM modelling for architecture design
Post Reply