### ===================================================================================================================
### viia_find_building_elements
### ===================================================================================================================
# Copyright ©VIIA 2024
### ===================================================================================================================
### 1. Import modules
### ===================================================================================================================
# General imports
from __future__ import annotations
from typing import TYPE_CHECKING
# References for functions and classes in the viiaPackage
if TYPE_CHECKING:
from viiapackage.viiaStatus import ViiaProject
### ===================================================================================================================
### 2. Function to get the building elements
### ===================================================================================================================
[docs]def viia_find_building_elements(project: ViiaProject):
""" Function to collect the building mesh-elements."""
building_elem = []
building_nod = []
for shape in project.collections.shapes:
if shape not in project.collections.volumes + project.collections.reinforcements and shape.mesh:
building_elem.extend(shape.mesh.get_meshelements())
building_nod.extend(shape.mesh.get_meshnodes())
building_nod = list(set(building_nod))
return building_elem, building_nod
### ===================================================================================================================
### 3. End of script
### ===================================================================================================================