get visible transmittance (unitless) requires 'EnvelopeSummary' summary table
| 362 | /// get visible transmittance (unitless) |
| 363 | /// requires 'EnvelopeSummary' summary table |
| 364 | boost::optional<double> PlanarSurface_Impl::visibleTransmittance() const { |
| 365 | OptionalDouble result; |
| 366 | boost::optional<std::string> surfaceName = this->name(); |
| 367 | OptionalSqlFile sqlFile = model().sqlFile(); |
| 368 | OptionalConstructionBase oConstruction = this->construction(); |
| 369 | |
| 370 | if (oConstruction) { |
| 371 | // from input |
| 372 | OptionalDouble inputResult = oConstruction->visibleTransmittance(); |
| 373 | |
| 374 | // from output |
| 375 | OptionalDouble outputResult; |
| 376 | if (sqlFile) { |
| 377 | OptionalString surfaceName = this->name(); |
| 378 | //OptionalString constructionName = oConstruction->name(); |
| 379 | std::string query; |
| 380 | if (surfaceName) { |
| 381 | |
| 382 | if (!outputResult) { |
| 383 | std::string query = R"(SELECT Value from TabularDataWithStrings |
| 384 | WHERE ReportName = 'EnvelopeSummary' |
| 385 | AND ReportForString = 'Entire Facility' |
| 386 | AND TableName = 'Exterior Fenestration' |
| 387 | AND ColumnName = 'Glass Visible Transmittance' |
| 388 | AND RowName = ?;)"; |
| 389 | outputResult = sqlFile->execAndReturnFirstDouble(query, to_upper_copy(*surfaceName)); |
| 390 | } |
| 391 | |
| 392 | if (!outputResult) { |
| 393 | std::string query = R"(SELECT Value from TabularDataWithStrings |
| 394 | WHERE ReportName = 'EnvelopeSummary' |
| 395 | AND ReportForString = 'Entire Facility' |
| 396 | AND TableName = 'Interior Fenestration' |
| 397 | AND ColumnName = 'Glass Visible Transmittance' |
| 398 | AND RowName = ?;)"; |
| 399 | outputResult = sqlFile->execAndReturnFirstDouble(query, to_upper_copy(*surfaceName)); |
| 400 | } |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | if (inputResult) { |
| 405 | result = inputResult; |
| 406 | if (outputResult) { |
| 407 | compareInputAndOutput(*oConstruction, "visible transmittance", *inputResult, *outputResult, 1.0E-5); |
| 408 | } |
| 409 | } else { |
| 410 | result = outputResult; |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | return result; |
| 415 | } |
| 416 | |
| 417 | bool PlanarSurface_Impl::equalVertices(const PlanarSurface& other) const { |
| 418 | std::vector<Point3d> vertices1 = this->vertices(); |
nothing calls this directly
no test coverage detected