Skip to contents

calculate_wall_width_02() and calculate_wall_width_03() are internal functions that calculate widths for walls.

Beware that walls sould be described in a data.frame with some expected columns:

  • building (only for calculate_wall_width_03())

  • storey

  • room

  • x

  • y

The ‘correct order’ of the walls means that the order of the lines should recreate the natural order in which the walls of a given room are arranged. The x and y co-ordinates only give the starting point of a wall, the end point of the wall is given by the co-ordinates of the next line.

Usage

calculate_wall_width_02(wall)

calculate_wall_width_03(wall)

Arguments

wall

data.frame of walls characteristics, supposed to be in a ‘correct order’. See details.

Value

vector of walls widths

Examples


data_table = extract_building_information(adu_t)
#> Extracting building information for 'adu_t'...
#> 	- extracted:
#>  		- parameter
#>  		- storey
#>  		- room
#>  		- wall
#>  		- opening
#>  		- coating
#>  		- furniture
#> 	- missing (not found):
#>  	... Informations successfully extracted for 'adu_t'

# Lazy
floodam.building:::calculate_wall_width_02(data_table[["wall"]])
#> storey.external_wall1 storey.external_wall2 storey.external_wall3 
#>                  12.8                   4.6                   4.1 
#> storey.external_wall4 storey.external_wall5 storey.external_wall6 
#>                   4.1                   4.6                   4.1 
#> storey.external_wall7 storey.external_wall8        storey.room_11 
#>                   4.1                   4.6                   4.0 
#>        storey.room_12        storey.room_13        storey.room_14 
#>                   4.0                   4.0                   4.0 
#>        storey.room_21        storey.room_22        storey.room_23 
#>                   4.0                   4.0                   4.0 
#>        storey.room_24        storey.room_31        storey.room_32 
#>                   4.0                   4.0                   4.0 
#>        storey.room_33        storey.room_34        storey.room_41 
#>                   4.0                   4.0                   4.0 
#>        storey.room_42        storey.room_43        storey.room_44 
#>                   4.0                   4.0                   4.0 

# Better
floodam.building:::calculate_wall_width_02(data_table[["wall"]][c("storey", "room", "x", "y")])
#> storey.external_wall1 storey.external_wall2 storey.external_wall3 
#>                  12.8                   4.6                   4.1 
#> storey.external_wall4 storey.external_wall5 storey.external_wall6 
#>                   4.1                   4.6                   4.1 
#> storey.external_wall7 storey.external_wall8        storey.room_11 
#>                   4.1                   4.6                   4.0 
#>        storey.room_12        storey.room_13        storey.room_14 
#>                   4.0                   4.0                   4.0 
#>        storey.room_21        storey.room_22        storey.room_23 
#>                   4.0                   4.0                   4.0 
#>        storey.room_24        storey.room_31        storey.room_32 
#>                   4.0                   4.0                   4.0 
#>        storey.room_33        storey.room_34        storey.room_41 
#>                   4.0                   4.0                   4.0 
#>        storey.room_42        storey.room_43        storey.room_44 
#>                   4.0                   4.0                   4.0