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

Method GltfUserData

src/gltf/GltfUserData.cpp:85–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 }
84
85 GltfUserData::GltfUserData(const model::PlanarSurface& planarSurface) {
86 std::string name = planarSurface.nameString();
87
88 m_handle = openstudio::removeBraces(planarSurface.handle());
89 m_name = planarSurface.nameString();
90
91 if (auto surface = planarSurface.optionalCast<model::Surface>()) {
92 m_surfaceName = surface->nameString();
93 m_surfaceHandle = openstudio::removeBraces(surface->handle());
94 m_surfaceType = surface->surfaceType();
95 m_sunExposure = surface->sunExposure();
96 m_windExposure = surface->windExposure();
97 m_outsideBoundaryCondition = surface->outsideBoundaryCondition();
98
99 boost::optional<model::Surface> adjacentSurface = surface->adjacentSurface();
100 if (adjacentSurface) {
101 m_outsideBoundaryConditionObjectName = adjacentSurface->nameString();
102 m_outsideBoundaryConditionObjectHandle = openstudio::removeBraces(adjacentSurface->handle());
103 }
104 } else if (auto shadingSurface = planarSurface.optionalCast<model::ShadingSurface>()) {
105
106 m_shadingHandle = openstudio::removeBraces(shadingSurface->handle());
107 m_shadingName = shadingSurface->nameString();
108
109 std::string shadingSurfaceType = "Building";
110 if (shadingSurface->shadingSurfaceGroup()) {
111 shadingSurfaceType = shadingSurface->shadingSurfaceGroup()->shadingSurfaceType();
112 }
113 std::string surfaceType = shadingSurfaceType + "Shading";
114 m_surfaceType = surfaceType;
115 m_sunExposure = "SunExposed";
116 m_windExposure = "WindExposed";
117 // m_outsideBoundaryCondition.clear();
118 // m_outsideBoundaryConditionObjectName.clear();
119 // m_outsideBoundaryConditionObjectHandle.clear();
120 } else if (auto interiorPartitionSurface = planarSurface.optionalCast<model::InteriorPartitionSurface>()) {
121 m_surfaceType = "InteriorPartitionSurface";
122 m_sunExposure = "NoSun";
123 m_windExposure = "NoWind";
124 // m_outsideBoundaryCondition.clear();
125 // m_outsideBoundaryConditionObjectName.clear();
126 // m_outsideBoundaryConditionObjectHandle.clear();
127 }
128
129 else if (auto subSurface = planarSurface.optionalCast<model::SubSurface>()) {
130 m_subSurfaceHandle = openstudio::removeBraces(subSurface->handle());
131 m_subSurfaceName = subSurface->nameString();
132 m_surfaceType = subSurface->subSurfaceType();
133
134 boost::optional<model::Surface> parentSurface = subSurface->surface();
135 if (parentSurface) {
136 m_outsideBoundaryCondition = parentSurface->outsideBoundaryCondition();
137 m_sunExposure = parentSurface->sunExposure();
138 m_windExposure = parentSurface->windExposure();
139 m_surfaceName = parentSurface->nameString();
140 m_surfaceHandle = openstudio::removeBraces(parentSurface->handle());
141 }
142

Callers

nothing calls this directly

Calls 15

removeBracesFunction · 0.85
toUUIDFunction · 0.85
circularEqualFunction · 0.85
reverseFunction · 0.85
nameStringMethod · 0.80
adjacentSurfaceMethod · 0.80
shadingSurfaceGroupMethod · 0.80
shadingSurfaceTypeMethod · 0.80
subSurfaceTypeMethod · 0.80
adjacentSubSurfaceMethod · 0.80
airLoopHVACsMethod · 0.80

Tested by

no test coverage detected