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

Method constructionWithSearchDistance

src/model/Surface.cpp:247–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245 }
246
247 boost::optional<std::pair<ConstructionBase, int>> Surface_Impl::constructionWithSearchDistance() const {
248 boost::optional<std::pair<ConstructionBase, int>> result;
249
250 boost::optional<ConstructionBase> construction =
251 getObject<ModelObject>().getModelObjectTarget<ConstructionBase>(OS_SurfaceFields::ConstructionName);
252 if (construction) {
253 return std::make_pair(*construction, 0);
254 }
255
256 boost::optional<Space> space = this->space();
257 if (space) {
258 result = space->getDefaultConstructionWithSearchDistance(this->getObject<Surface>());
259 }
260 return result;
261 }
262
263 bool Surface_Impl::isConstructionDefaulted() const {
264 return isEmpty(OS_SurfaceFields::ConstructionName);

Calls 2

spaceMethod · 0.95

Tested by 1

TEST_FFunction · 0.36