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

Method addTransitionZone

src/model/DaylightingDeviceTubular.cpp:137–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135 }
136
137 bool DaylightingDeviceTubular_Impl::addTransitionZone(const TransitionZone& transitionZone) {
138 bool result;
139
140 // Push an extensible group
141 auto eg = getObject<ModelObject>().pushExtensibleGroup().cast<WorkspaceExtensibleGroup>();
142 bool zone = eg.setPointer(OS_DaylightingDevice_TubularExtensibleFields::TransitionZoneName, transitionZone.thermalZone().handle());
143 bool length = eg.setDouble(OS_DaylightingDevice_TubularExtensibleFields::TransitionZoneLength, transitionZone.length());
144 if (zone && length) {
145 result = true;
146 } else {
147 // Something went wrong
148 // So erase the new extensible group
149 getObject<ModelObject>().eraseExtensibleGroup(eg.groupIndex());
150 result = false;
151 }
152 result = true;
153
154 return result;
155 }
156
157 bool DaylightingDeviceTubular_Impl::addTransitionZone(const ThermalZone& zone, double length) {
158 // Make a transition zone, and then call the above function

Callers 1

TEST_FFunction · 0.80

Calls 8

pushExtensibleGroupMethod · 0.80
eraseExtensibleGroupMethod · 0.80
groupIndexMethod · 0.80
setPointerMethod · 0.45
handleMethod · 0.45
thermalZoneMethod · 0.45
setDoubleMethod · 0.45
lengthMethod · 0.45

Tested by 1

TEST_FFunction · 0.64