Extracting areas in m2 from IfcBuildingElementProxy
Hello guys, a complete beginner in ifcopenshell. I am trying to extract the areas and coordinated of 11 IfcBuildingElementProxy elements in my IFC, using python and ifcopenshell and possibly create a database for these building elements.
Can anyone point me in the right direction. Thank you
Tagged:
Comments
There's two approaches to this. 1) fetching precalcualted quantities, or 2) calculating it yourself.
If your model already contains quantity data, you can fetch its properties (or quantities) and one line of code is all it takes. See here for an example https://blenderbim.org/docs-python/ifcopenshell-python/code_examples.html#get-the-properties-of-a-wall-type or here https://blenderbim.org/docs-python/autoapi/ifcopenshell/util/element/index.html?highlight=get_pset#ifcopenshell.util.element.get_psets
If you want to calculate it yourself, you first need to extract the geometry, see https://blenderbim.org/docs-python/ifcopenshell-python/geometry_processing.html
Once you've extracted the geometry, you can fetch various statistics about the geometry using the util.shape module: https://blenderbim.org/docs-python/autoapi/ifcopenshell/util/shape/index.html so
get_footprint_area
is probably what you're after.