A
by Arv on 27 Oct 2023, edited 28 Oct 2023
#
I was doing a comparison on the volume and area calculation between blenderbim and ifcopenshell on the demo model AC20-FZK-Haus.ifc
I am getting difference in the areas for NetSideArea
and NetFootprintArea
. The difference in NetFootprintArea
is almost 40% different

Am I doing anything wrong here?
M
by Massimo on 27 Oct 2023
#
@Arv hi... well, the quantities that are stored in the Pset called "BaseQuantities" are just float number properties, just like the others...i mean, you could manually edit a single property (for example BaseQuantities.Length) to, let's say, 4 and you would have the length property set to 4 and this would be obviously wrong ...
I said that just to help you understand that properties could come from every kind of source and so they could be wrong...
Said that, in order to better understand the problem, it would be helpful to know where the functions shape.get_volume(), shape.get_side_area() and shape.get_footprint_area() comes from ... in other words, could you copy also the line where shape is defined? thanks ...
C
by cvillagrasa on 27 Oct 2023
#
+1 votes
@Massimo I think shape should be ifcopenshell.util.shape
M
by Massimo on 27 Oct 2023
#
@cvillagrasa @Arv well so it uses this functions https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/util/shape.py ...
But the more precise quantities, in this case, are the ones in the BaseQuantities Pset and i don't know why the ifcopenshell.util.shape seems to return the wrong values ...
M
by Massimo on 27 Oct 2023
#
well but i tried to run the following script with the same wall selected
_import blenderbim.tool as tool
import ifcopenshell
obj = C.active_object
entity = tool.Ifc.get_entity(obj)
settings = ifcopenshell.geom.settings()
net_shape = ifcopenshell.geom.create_shape(settings, entity)
net_volume = ifcopenshell.util.shape.get_volume(netshape.geometry)
and net_volume is 6.42 so there is something wrong in your script ...
Try to select the wall with
_import blenderbim.tool as tool
model = tool.Ifc.get()
wall = model.byguid("25fsbPyk15VvuXI$yNKenK")
A
by Arv on 28 Oct 2023
#
@cvillagrasa said:
@Massimo I think shape should be ifcopenshell.util.shape
I have imported shape as from ifcopenshell.util import shape
@Massimo said:
and net_volume is 6.42 so there is something wrong in your script ...
I do get the net_volume same as yours which also matches the model . Its the shape.get_side_area
and shape.get_footprint_area
values which is different


M
by Moult on 28 Oct 2023, edited 28 Oct 2023
#
+4 votes
This is a little unfortunate, basically footprint area counts any faces projected onto the view direction, including overlapping faces (hence the double count). Therefore the faces of the window voids are also counted as a footprint. This is unintuitive and I'd say it's a bug, but hopefully this image explains it. Therefore if you supply a gross shape (i.e. without the window openings) you get a more sensible number.
Bug fixed: https://github.com/IfcOpenShell/IfcOpenShell/commit/f0028c00947508302cbb719d6959a4eb93581d79

M
by Massimo on 28 Oct 2023
#
@Arv well i guess i didn't pay the necessary attention to it :-)
Nice that this problem finished to a fixed bug
And of course thanks to @Moult :-)