Skip to content

Compute wall net quantities#2086

Merged
Moult merged 2 commits intoIfcOpenShell:v0.7.0from
Gorgious56:compute_wall_net_quantities
Mar 14, 2022
Merged

Compute wall net quantities#2086
Moult merged 2 commits intoIfcOpenShell:v0.7.0from
Gorgious56:compute_wall_net_quantities

Conversation

@Gorgious56
Copy link
Copy Markdown
Contributor

@Gorgious56 Gorgious56 commented Mar 11, 2022

This aims to fix the wall quantities computation not taking into account modifiers (and by extension openings).

@Moult
Copy link
Copy Markdown
Contributor

Moult commented Mar 14, 2022

This is good except that gross vs net isn't as simple as "are modifiers applied". IfcOpenShell by default computes the net geometry. During editing, users selectively convert these baked net geometry into gross geometry + boolean modifiers if they choose to do so.

It's still better than giving a zero everywhere, so merging :)

@Moult Moult merged commit 3c26cb6 into IfcOpenShell:v0.7.0 Mar 14, 2022
@Gorgious56
Copy link
Copy Markdown
Contributor Author

@Moult Oh okay, then if I understand correctly, when the openings have been applied in Blender, the gross calculations will be off. Is it possible to get back the gross quantities from ifcopenshell or the ifc contents ? Should we be using ifcopenshell directly then to compute the quantities ?

@Moult
Copy link
Copy Markdown
Contributor

Moult commented Mar 14, 2022

when the openings have been applied in Blender, the gross calculations will be off.

Correct.

Is it possible to get back the gross quantities from ifcopenshell or the ifc contents ? Should we be using ifcopenshell directly then to compute the quantities ?

Yes, we can either recreate the geometry using IfcOpenShell, calculate using IfcOpenShell directly, or do some checks in Blender whether or not there are openings and make an informed decision. I'm also not sure how fast it is, or exactly what code it should be to calculate directly in IfcOpenShell unfortunately, hence the TODO.

aothms added a commit that referenced this pull request Mar 14, 2022
@aothms
Copy link
Copy Markdown
Member

aothms commented Mar 14, 2022

I think it was already possible with some low level trickery but I just mapped them to top level properties:

>>> import ifcopenshell
>>> import ifcopenshell.geom
>>> f = ifcopenshell.open("acad2010_walls.ifc")
>>> it = ifcopenshell.geom.iterator(ifcopenshell.geom.settings(), f)
>>> it.initialize()
True
>>> elem = it.get_native()
>>> elem.surface_area
10.220161925180994
>>> elem.volume
0.9425983811263172

@aothms
Copy link
Copy Markdown
Member

aothms commented Mar 14, 2022

There's also code to calcuate projected areas such as footprints. For that we'd need to supply a direction vector. But I think the current way of calculation is also wrong. We should probably just identify the bottom face somehow instead of accumulating dot products for every face, because the current approach will result in double counting for concave areas such as openings.

https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcgeom/IfcGeomRepresentation.cpp#L113-L193

@Gorgious56 Gorgious56 deleted the compute_wall_net_quantities branch July 5, 2022 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants