| 1419 | } |
| 1420 | |
| 1421 | double Surface_Impl::windowToWallRatio() const { |
| 1422 | double result = 0.0; |
| 1423 | |
| 1424 | if (!istringEqual(this->surfaceType(), "Wall")) { |
| 1425 | return result; |
| 1426 | } |
| 1427 | |
| 1428 | double grossArea = this->grossArea(); |
| 1429 | |
| 1430 | if (grossArea == 0) { |
| 1431 | return result; |
| 1432 | } |
| 1433 | |
| 1434 | double roughOpeningArea = totalAreaOfSubSurfaces(); |
| 1435 | double wwr = roughOpeningArea / grossArea; |
| 1436 | |
| 1437 | return wwr; |
| 1438 | } |
| 1439 | |
| 1440 | // Calculates and returns the toital area of the subsurfaces |
| 1441 | // If any subsurface extends outside the parent surface or overlaps an adjacent subsurface |