If you're reading this, we've just migrated servers! If anything looks broken please email dion@thinkmoult.com :)

External Surface Extraction for BIPV

edited April 2022 in General

I am working on some BIPV calculations and was wondering if anyone is aware of a quick way for extracting only the external surfaces/faces (the image below indicates what I mean by this) of a selected geometry within Blender? I tried to mess around with "IFC Patch" and also "BlenderBIM Spreadsheet". Nice tools, allowed me to filter out most of what I did not need. But in order to get my surfaces I basically had to resort to converting the remaining geometry into meshes and deleting all the superfluous surfaces/faces. There should be a smarter workflow to achieve that.

Edit 2022-04-20:
I require these exterior surfaces for irradiance calculations for determining Building Integrated Photovoltaics (BIPV) efficacy around various areas of the façade (balconies, railings, and other viable façade elements).
There is a quick tool for irradiance simulations that does this directly with .ifc models – BIMSolar it is called (and it's cousin? PVSites). But those were some European Union (EU) grant projects and they currently seem to be no longer in development.

Comments

  • Good morning, I learned that if you use the "N" panel, in the quantities section, you can enter your geometry in object mode, select the faces you want to quantify and use the option to calculate areas, and it only takes you into count the selected.

  • It's an interesting challenge. I'm sure there are tools using the ifc schema to define these but unfortunately I don't know any.
    You can filter out the faces with their normal. On a straight-up wall the only faces which should have a normal with a Z component around 0 are the exterior and interior faces. Now the hard part is how to filter out the interior faces. After a quick search (might be a good idea to define what BIPV is to the newcomers :p) we're looking for solar irradiance so it makes sense to cast a bunch of rays and see what comes backs.

    It's not supposed to be a solution to your problem, but rather a nudge in a certain direction that you are welcome to follow, or not.
    I'm going to use a similar tool as the one I covered in the wiki article : https://wiki.osarch.org/index.php?title=Visualize_a_Line_of_Sight_in_Blender

    Using Geometry Nodes and Blender 3.1. (Might need 3.2 for some nodes, I don't know for sure)

    1. Get your wall geometry
    2. Realize the instances to work with "real" geometry
    3. The Dual Mesh node creates a mesh where every face center becomes a vertex. We use it to get the face centers.
    4. Get the geometry position
    5. Scale it by -1 to get a vector towards the object origin
    6. Add this vector to the position to offset very slightly the point from the geometry, otherwise we'll get false positive self-intersecting raycasts
    7. Cast a ray from the face center positions, to the object origin
    8. If the ray hits another wall, it means it is an interior wall or it shadowed by another wall
    9. Now only points that can directly be cast towards the object origin are kept
    10. If you check the proximity from the wall faces to the bunch of points you left out, you can delete the faces that are far away than a certain threshold
    11. Filter out horizontal faces
    12. Now delete faces according to the filter



      Now you can duplicate this little tool and approach something usable.

      If you know your way around python you can automate this.

    Cheers

    tlang
  • Isn't this all exactly the type of problem Sverchok Topology nodes are for? @topologic

    topologic
  • @duncan said:
    Isn't this all exactly the type of problem Sverchok Topology nodes are for? @topologic

    Yes, I think Topologic can help with BIPV calculations. Look up Face.FacingToward. It can tell you the incidence angle and True/False if a face is facing toward the incoming (sun) direction (or is it back-facing that is). It does NOT do full raytracing or face-to-face occlusion (but this can be added if needed). It just does a simple angle calculation between an incident ray and the normal to the face.
    Here is a test blender file and a couple of images. Please reach out if you would like to test it. Happy to help you get started with Topologic.
    https://cf-my.sharepoint.com/:u:/g/personal/jabiw_cardiff_ac_uk/ESQ_XRJ2GOxKgD91p__nRZsBtZyQUExwEBDi-iN66jKl-Q?e=Ev0f5e

    Gorgiousduncan
  • @Darth_Blender said:
    Good morning, I learned that if you use the "N" panel, in the quantities section, you can enter your geometry in object mode, select the faces you want to quantify and use the option to calculate areas, and it only takes you into count the selected.

    Good tip. It's just that most of the time the geometry is going to be a tad more complex. Therefore might need to look for some smart ways of selecting those external faces automatically and then bingo – Quantity Take-off all the Face areas.

  • @Saulius Topologic can handle complex geometry in the tens of thousands of faces. That was just an a simplified example to clarify the concept. What is your criteria for determining “external faces”? That is, how do you distinguish between the projected surfaces and the outer face of your building?

  • edited April 2022

    @topologic said:

    @duncan said:
    Isn't this all exactly the type of problem Sverchok Topology nodes are for? @topologic

    Yes, I think Topologic can help with BIPV calculations. Look up Face.FacingToward. It can tell you the incidence angle and True/False if a face is facing toward the incoming (sun) direction (or is it back-facing that is). It does NOT do full raytracing or face-to-face occlusion (but this can be added if needed). It just does a simple angle calculation between an incident ray and the normal to the face.
    Here is a test blender file and a couple of images. Please reach out if you would like to test it. Happy to help you get started with Topologic.
    https://cf-my.sharepoint.com/:u:/g/personal/jabiw_cardiff_ac_uk/ESQ_XRJ2GOxKgD91p__nRZsBtZyQUExwEBDi-iN66jKl-Q?e=Ev0f5e

    Thanks for a great lead. This can indeed help to extract the exterior surfaces of interest.
    Currently for quick'n'dirty solar irradiance estimates, we simply use a spreadsheet tool. Therefore we simply require the amount of area (m^2) per façade (element) in question and its corresponding azimuth (°).
    For advanced solar irradiance estimates (with shading taken into account) the current workflow is to use SketchUp + OpenStudio. From what I am aware OpenStudio is one of the few Building Performance Simulation tools that are extensively validated, and recommended by ASHRAE (The American Society of Heating, Refrigerating and Air-Conditioning Engineers). For this SketchUp + OpenStudio workflow also only the building "shell" (exterior surfaces for shading and irradiance Quantity Take-off) is required.
    In the longterm, it seems, that Blender + BlenderBIM + Ladybug can provide a more robust workflow that's easier to automate and also help the Open Source AEC (Architecture, Engineering & Construction) solutions along the way. As Ladybug uses the same daylight physics simulation engine as OpenStudio (Radiance) there should also be less concerns regarding validation of simulation results.
    Either way currently the focus is on extracting those exterior surfaces of interest from incoming .ifc files. Most architecture offices seems to work with their own BIM object naming conventions. Therefore there's quite some "unstructured data" from one project to another, so semi-automated solutions they will have to be.

    duncan
  • @topologic > @topologic said:

    @Saulius Topologic can handle complex geometry in the tens of thousands of faces. That was just an a simplified example to clarify the concept. What is your criteria for determining “external faces”? That is, how do you distinguish between the projected surfaces and the outer face of your building?

    Yeah, now this is primarily done manually. Filtering out the .ifc geometry of interest in Blender. Exporting to .stl file. Importing the .stl to SketchUp (SketchUp has issues handling large .ifc files, and in general there are issues exporting .ifc from Blender after filtering out everything that's not required). Manually deleting the surfaces that are "not-of-interest". You correctly pointed out, that in most cases (sigh) the “external faces” of interest are the ones that are parallel to the "global" façade. But like with the balcony geometry, the sides of the balcony slab are at an angle, so would have to deal with that manually...
    In general seems like creating a layered material with the exterior layer being a 0 thickness layer, applying this material to geometries of interest (where this new material also adjust to the thickness of the geometry of interest automatically), and extracting only this material's exterior layer surfaces would be most universal approach?

  • And just a shameless plug, regarding .ifc export issue/errors I keep getting. Just in case it's something quick and simple that I am missing.

    Python: Traceback (most recent call last):
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\bim\module\project\operator.py", line 761, in invoke
        return self.execute(context)
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\bim\module\project\operator.py", line 769, in execute
        return IfcStore.execute_ifc_operator(self, context)
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\bim\ifc.py", line 299, in execute_ifc_operator
        result = getattr(operator, "_execute")(context)
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\bim\module\project\operator.py", line 796, in _execute
        ifc_exporter.export()
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\bim\export_ifc.py", line 48, in export
        self.sync_all_objects()
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\bim\export_ifc.py", line 109, in sync_all_objects
        tool.Collector.sync(obj)
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\tool\collector.py", line 45, in sync
        object_collection = cls._get_collection(element, obj)
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\tool\collector.py", line 182, in _get_collection
        collection = bpy.data.collections.get(container_obj.name)
    AttributeError: 'NoneType' object has no attribute 'name'
    
    location: <unknown location>:-1
    
  • edited April 2022

    @Saulius said:
    And just a shameless plug, regarding .ifc export issue/errors I keep getting. Just in case it's something quick and simple that I am missing.

    Python: Traceback (most recent call last):
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\bim\module\project\operator.py", line 761, in invoke
        return self.execute(context)
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\bim\module\project\operator.py", line 769, in execute
        return IfcStore.execute_ifc_operator(self, context)
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\bim\ifc.py", line 299, in execute_ifc_operator
        result = getattr(operator, "_execute")(context)
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\bim\module\project\operator.py", line 796, in _execute
        ifc_exporter.export()
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\bim\export_ifc.py", line 48, in export
        self.sync_all_objects()
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\bim\export_ifc.py", line 109, in sync_all_objects
        tool.Collector.sync(obj)
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\tool\collector.py", line 45, in sync
        object_collection = cls._get_collection(element, obj)
      File "C:\Users\HP ZBook 15 G2\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\blenderbim\tool\collector.py", line 182, in _get_collection
        collection = bpy.data.collections.get(container_obj.name)
    AttributeError: 'NoneType' object has no attribute 'name'
    
    location: <unknown location>:-1
    

    Anything there look like a problem needing further research from the BBIM team? @Moult @aothms

  • I think it would be more suited to the issues tracker directly on the github page : https://github.com/IfcOpenShell/IfcOpenShell/issues

  • In case anyone is interested, this is how the Irradiance simulation looks like in BIMSolar. It seems to be primarily suitable for conceptual design:

Sign In or Register to comment.