Source code for viiapackage.reference_approach.reference_wall.current_wall

### ===================================================================================================================
###   CLASS: CurrentWall
### ===================================================================================================================
# Copyright ©VIIA 2024

### ===================================================================================================================
###   1. Import modules
### ===================================================================================================================

# General imports
from dataclasses import dataclass
from typing import Dict, Union


### ===================================================================================================================
###   2. Current wall class
### ===================================================================================================================

[docs]@dataclass class CurrentWall: """ Class for the inputs of the user for the wall. These are used to compare to.""" density: float height: float layer: str material: str object_part: str thickness: float wall_type: str width: float name: str = '-' z_top: float = False openings: float = False size_of_openings: list = False floor_spanning_direction: list = False roof_spanning_direction: list = False overburden_load: float = False
[docs] def to_report(self) -> Dict[str, Union[str, float]]: """ Method of 'CurrentWall' to convert data for the report.""" return { 'Object part': self.object_part, 'Wall name': self.name, 'Layer': self.layer, 'Wall ID': '-', 'Material': self.material, 'Density [kg/m3]': self.density, 'Thickness [mm]': self.thickness, 'Width [m]': self.width, 'Height [m]': self.height, 'Wall type': self.wall_type, 'Openings': self.openings, 'Size of Openings': self.size_of_openings, 'Floor Spanning': self.floor_spanning_direction, 'Roof Spanning': self.roof_spanning_direction, 'Overburden Load': self.overburden_load, 'Score: layer': 100, 'Score: thickness': 100, 'Score: width': 100, 'Score: height': 100, 'Score: wall type': 100, 'Score: density': 100, 'Score: material': 100, 'Score: openings': 100, 'Score: opening size': 100, 'Score: floor spanning': 100, 'Score: roof spanning': 100, 'Score: ov load': 100, 'Total Score': 100}
[docs] def to_table(self) -> Dict[str, Union[str, float]]: """ Method of 'CurrentWall' to convert data for a table.""" return { 'object_part': self.object_part, 'name': self.name, 'layer': self.layer, 'wall_ID': '-', 'material': self.material, 'density': self.density, 'thickness': self.thickness, 'width': self.width, 'height': self.height, 'wall_type': self.wall_type, 'openings': self.openings, 'size_of_openings': self.size_of_openings, 'floor_spanning_direction': self.floor_spanning_direction, 'roof_spanning_direction': self.roof_spanning_direction, 'overburden_load': self.overburden_load, }
### =================================================================================================================== ### 3. End of script ### ===================================================================================================================