MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / translateConstructionBase

Method translateConstructionBase

src/sdd/MapEnvelope.cpp:517–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515 }
516
517 boost::optional<pugi::xml_node> ForwardTranslator::translateConstructionBase(const openstudio::model::ConstructionBase& constructionBase,
518 pugi::xml_node& root) {
519 boost::optional<pugi::xml_node> result;
520
521 if (constructionBase.optionalCast<model::LayeredConstruction>()) {
522 auto construction = constructionBase.cast<model::LayeredConstruction>();
523 model::StandardsInformationConstruction info = constructionBase.standardsInformation();
524
525 // TODO: unused
526 [[maybe_unused]] bool heated = false;
527 if (construction.optionalCast<model::Construction>()) {
528 heated = false;
529 } else if (construction.optionalCast<model::ConstructionWithInternalSource>()) {
530 heated = true;
531 } else {
532 return boost::none;
533 }
534
535 // check if any layer has not been translated, constructions using simple glazing material will
536 // be skipped here because the simple glazing material is not recorded as mapped
537 std::vector<model::Material> layers = construction.layers();
538 for (const model::Material& material : layers) {
539 if (m_translatedObjects.find(material.handle()) == m_translatedObjects.end()) {
540 return boost::none;
541 }
542 }
543
544 result = root.append_child("ConsAssm");
545
546 // name
547 std::string name = escapeName(construction.name().get());
548
549 pugi::xml_node subElement = result->append_child("Name");
550 subElement.text().set(name.c_str());
551
552 // DLM: prescribed, not input
553 // specification method
554 //pugi::xml_node specMthdElement = result->append_child("SpecMthd");
555 //specMthdElement.text().set("Layers");
556
557 // SDD:
558 // CompatibleSurfType - required, done
559 // ExtSolAbs - optional, done
560 // ExtThrmlAbs - optional, done
561 // ExtVisAbs - optional, done
562 // IntSolAbs - optional, done
563 // IntThrmlAbs - optional, done
564 // IntVisAbs - optional, done
565 // SlabType - optional, skipping until we better handle slabs
566 // SlabInsOrientation - optional, skipping until we better handle slabs
567 // SlabInsThrmlR - optional, skipping until we better handle slabs
568 // FieldAppliedCoating - optional, skipping
569 // CRRCInitialRefl - optional, skipping
570 // CRRCAgedRefl - optional, skipping
571 // CRRCInitialEmittance - optional, skipping
572 // CRRCAgedEmittance - optional, skipping
573 // CRRCInitialSRI - optional, skipping
574 // CRRCAgedSRI - optional, skipping

Callers

nothing calls this directly

Calls 15

istringEqualFunction · 0.85
layersMethod · 0.80
setMethod · 0.80
intendedSurfaceTypeMethod · 0.80
standardsInformationMethod · 0.45
findMethod · 0.45
handleMethod · 0.45
endMethod · 0.45
getMethod · 0.45
nameMethod · 0.45
sizeMethod · 0.45
roughnessMethod · 0.45

Tested by

no test coverage detected