IFC import

This forum section is only for IFC-related issues
User avatar
shoogen
Veteran
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: IFC import

Post by shoogen »

Have you tried to check if there are any other ShapeTypes in the Compound beside the Solids. (Like open shells)
with the new shape.childShapes() command or shape.dumpToString() ?
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: IFC import

Post by yorik »

Yes, there are a couple of shells too, that don't correspond to the solids either, and also don't correspond to the original solids.
childShapes() and dumpToString() give the same result, nothing that allows to extract the separate solids.

There is anyway something that is wrong with IfcOpenShell, I'll open a bug report with it on github. But I'm afraid it won't be easy for Thomas to help us here...
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: IFC import

Post by bernd »

yorik wrote:Hm indeed. At the moment, the geometry should come "ready" from IfcOpenShell... The strange thing is that in the example IfcHouse that comes with IfcOpenShell, there are halfspaces too, and those are correctly treated by it. ...
I did some investigation in the gable walls. IfcOpenHouse uses one plane for each side and makes an HalfSpaceSolid. Allplan uses IFCPOLYGONALBOUNDEDHALFSPACE for the gablewalls. I only have problems to import to FreeCAD if the wall has two slopes. If the wall only has one slope the import works fine. It seams related to IfcOpenShell. I attached two examples a single slope and a double slope. @Yorik, Whats your opinion?

Code: Select all

import IfcImport
import Part
i=IfcImport.open("/home/hugo/Desktop/gablewall-twoslopes.ifc")
ss=IfcImport.create_shape(i.by_id(202))
s=Part.Shape()
s.importBrepFromString(ss)
Part.show(s)
Attachments
gablewall-twoslopes.ifc
(7.56 KiB) Downloaded 85 times
gablewall-oneslope.ifc
(6.74 KiB) Downloaded 85 times
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: IFC import

Post by yorik »

Sorry for the delay Bernd, hard work ultimately, now I'm back to normal life :)
I just had a look at your 2 files, indeed the second one seems not understood by ifcopenshell. It's strange, both files appear to be constructed the same way (a boolean clipping operation between a solid and a halfspace)... Only the second file does that operation twice. But there must be some other problem, because I tried to remove the second operation (replace (#160) with (#140) in #102) but it still doesn't work.

Maybe ifcopenshell doesn't read the IfcPolygonalBoundedHalfSpace object?
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: IFC import

Post by bernd »

yorik wrote:Sorry for the delay Bernd, hard work ultimately, now I'm back to normal life :) ...
Glad you could finish the hard work. FreeCAD motto is "It's done when it's done". I like that one ...
yorik wrote:... Maybe ifcopenshell doesn't read the IfcPolygonalBoundedHalfSpace object?
Ahh, I see, thanks for your hints. Ahh, oneslope uses IFCHALFSPACESOLID and twoslopes uses IFCPOLYGONALBOUNDEDHALFSPACE.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: IFC import

Post by bernd »

attached a even simpler wall without slopes which uses ifcpolygonalboundedhalfspace for testing ...
Attachments
simple_polygonalboundedhalfspace.ifc
(7.43 KiB) Downloaded 91 times
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: IFC import

Post by yorik »

Yes, indeed same thing. Surely this is an entity that is not supported yet by ifcopenshell.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: IFC import

Post by bernd »

yorik wrote:Yes, indeed same thing. Surely this is an entity that is not supported yet by ifcopenshell.
Who is gone make a issue at github?

BTW: I have code running to import all IfcPropertySet and IfcElementQuantity into ProppertyMap or Maps. Not sure yet what fits better. It really makes fun changing colors of the whole model according Properties with just a few lines of python. Something Allplan is not capable of :D. Since Allplan exports the netvolume to the ifc it is easy to compare the exported volume and the FreeCAD volume. When I'll have a minute I'll post it to my github.
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: IFC import

Post by yorik »

Wow, excellent! I'm curious to have a look at that...
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: IFC import

Post by bernd »

yorik wrote:Wow, excellent! I'm curious to have a look at that...
The world cup swipes my time ... But it will be finished soon.

Thomas changed the module name from ifc_wrapper ...
Post Reply