Skip to content

GbXMLForwardTranslator uses map/set to save state, and that state isn't reset #4135

@jmarrec

Description

@jmarrec

Issue overview

Translating a single model to gbXML twice produces different results the second time.

Expected Behavior

There should be no differences

Steps to Reproduce

m = OpenStudio::Model::exampleModel()
ft = OpenStudio::GbXML::GbXMLForwardTranslator.new
ft.modelToGbXML(m, "test.xml")
ft.modelToGbXML(m, "test2.xml")

Then do a diff of test.xml and test2.xml, you'll see that surfaces aren't translated the second time.

$ diff -u test.xml test2.xml
--- test.xml	2020-11-02 12:16:35.527815587 +0100
+++ test2.xml	2020-11-02 12:16:37.191848743 +0100
@@ -48,958 +48,6 @@
         <Level>0.000000</Level>
       </BuildingStorey>
     </Building>
-    <Surface id="Surface_23" surfaceType="Air" constructionIdRef="Air_Wall">
-      <AdjacentSpaceId spaceIdRef="Space_4" />
-      <AdjacentSpaceId spaceIdRef="Space_2" />
-      <RectangularGeometry>
-        <Azimuth>180</Azimuth>
-        <CartesianPoint>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
[...]
**Click to expand full diff**
--- test.xml	2020-11-02 12:16:35.527815587 +0100
+++ test2.xml	2020-11-02 12:16:37.191848743 +0100
@@ -48,958 +48,6 @@
         <Level>0.000000</Level>
       </BuildingStorey>
     </Building>
-    <Surface id="Surface_23" surfaceType="Air" constructionIdRef="Air_Wall">
-      <AdjacentSpaceId spaceIdRef="Space_4" />
-      <AdjacentSpaceId spaceIdRef="Space_2" />
-      <RectangularGeometry>
-        <Azimuth>180</Azimuth>
-        <CartesianPoint>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>90</Tilt>
-        <Width>10.000000</Width>
-        <Height>3.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_22" surfaceType="ExteriorWall" constructionIdRef="Exterior_Wall">
-      <AdjacentSpaceId spaceIdRef="Space_4" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>20.000000</Coordinate>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>90</Tilt>
-        <Width>10.000000</Width>
-        <Height>3.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_20" surfaceType="Air" constructionIdRef="Air_Wall">
-      <AdjacentSpaceId spaceIdRef="Space_4" />
-      <AdjacentSpaceId spaceIdRef="Space_3" />
-      <RectangularGeometry>
-        <Azimuth>270</Azimuth>
-        <CartesianPoint>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>20.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>90</Tilt>
-        <Width>10.000000</Width>
-        <Height>3.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_19" constructionIdRef="Slab" surfaceType="SlabOnGrade">
-      <AdjacentSpaceId spaceIdRef="Space_4" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>20.000000</Coordinate>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>180</Tilt>
-        <Width>10.000000</Width>
-        <Height>10.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_17" surfaceType="Air" constructionIdRef="Air_Wall">
-      <AdjacentSpaceId spaceIdRef="Space_3" />
-      <AdjacentSpaceId spaceIdRef="Space_1" />
-      <RectangularGeometry>
-        <Azimuth>180</Azimuth>
-        <CartesianPoint>
-          <Coordinate>0.000000</Coordinate>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>90</Tilt>
-        <Width>10.000000</Width>
-        <Height>3.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_15" surfaceType="ExteriorWall" constructionIdRef="Exterior_Wall">
-      <AdjacentSpaceId spaceIdRef="Space_3" />
-      <RectangularGeometry>
-        <Azimuth>0</Azimuth>
-        <CartesianPoint>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>20.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>90</Tilt>
-        <Width>10.000000</Width>
-        <Height>3.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_14" surfaceType="ExteriorWall" constructionIdRef="Exterior_Wall">
-      <AdjacentSpaceId spaceIdRef="Space_3" />
-      <RectangularGeometry>
-        <Azimuth>270</Azimuth>
-        <CartesianPoint>
-          <Coordinate>0.000000</Coordinate>
-          <Coordinate>20.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>90</Tilt>
-        <Width>10.000000</Width>
-        <Height>3.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_1" constructionIdRef="Slab" surfaceType="SlabOnGrade">
-      <AdjacentSpaceId spaceIdRef="Space_1" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>180</Tilt>
-        <Width>10.000000</Width>
-        <Height>10.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_24" surfaceType="Roof" constructionIdRef="Exterior_Roof">
-      <AdjacentSpaceId spaceIdRef="Space_4" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>20.000000</Coordinate>
-          <Coordinate>20.000000</Coordinate>
-          <Coordinate>3.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>0</Tilt>
-        <Width>10.000000</Width>
-        <Height>10.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_2" surfaceType="ExteriorWall" constructionIdRef="Exterior_Wall">
-      <AdjacentSpaceId spaceIdRef="Space_1" />
-      <RectangularGeometry>
-        <Azimuth>270</Azimuth>
-        <CartesianPoint>
-          <Coordinate>0.000000</Coordinate>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>90</Tilt>
-        <Width>10.000000</Width>
-        <Height>3.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_4" surfaceType="Air" constructionIdRef="Air_Wall">
-      <AdjacentSpaceId spaceIdRef="Space_1" />
-      <AdjacentSpaceId spaceIdRef="Space_2" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>90</Tilt>
-        <Width>10.000000</Width>
-        <Height>3.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_10" surfaceType="ExteriorWall" constructionIdRef="Exterior_Wall">
-      <AdjacentSpaceId spaceIdRef="Space_2" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>20.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>90</Tilt>
-        <Width>10.000000</Width>
-        <Height>3.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-      <Opening id="Sub_Surface_2" windowTypeIdRef="Exterior_Window" openingType="FixedWindow">
-        <RectangularGeometry>
-          <Azimuth>90</Azimuth>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>2.000000</Coordinate>
-            <Coordinate>1.000000</Coordinate>
-          </CartesianPoint>
-          <Tilt>90</Tilt>
-          <Width>6.000000</Width>
-          <Height>1.000000</Height>
-        </RectangularGeometry>
-        <PlanarGeometry>
-          <PolyLoop>
-            <CartesianPoint>
-              <Coordinate>20.000000</Coordinate>
-              <Coordinate>2.000000</Coordinate>
-              <Coordinate>2.000000</Coordinate>
-            </CartesianPoint>
-            <CartesianPoint>
-              <Coordinate>20.000000</Coordinate>
-              <Coordinate>2.000000</Coordinate>
-              <Coordinate>1.000000</Coordinate>
-            </CartesianPoint>
-            <CartesianPoint>
-              <Coordinate>20.000000</Coordinate>
-              <Coordinate>8.000000</Coordinate>
-              <Coordinate>1.000000</Coordinate>
-            </CartesianPoint>
-            <CartesianPoint>
-              <Coordinate>20.000000</Coordinate>
-              <Coordinate>8.000000</Coordinate>
-              <Coordinate>2.000000</Coordinate>
-            </CartesianPoint>
-          </PolyLoop>
-        </PlanarGeometry>
-      </Opening>
-    </Surface>
-    <Surface id="Surface_5" surfaceType="ExteriorWall" constructionIdRef="Exterior_Wall">
-      <AdjacentSpaceId spaceIdRef="Space_1" />
-      <RectangularGeometry>
-        <Azimuth>180</Azimuth>
-        <CartesianPoint>
-          <Coordinate>0.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>90</Tilt>
-        <Width>10.000000</Width>
-        <Height>3.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-      <Opening id="Sub_Surface_1" constructionIdRef="Exterior_Door" openingType="NonSlidingDoor">
-        <RectangularGeometry>
-          <Azimuth>180</Azimuth>
-          <CartesianPoint>
-            <Coordinate>2.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <Tilt>90</Tilt>
-          <Width>2.000000</Width>
-          <Height>2.000000</Height>
-        </RectangularGeometry>
-        <PlanarGeometry>
-          <PolyLoop>
-            <CartesianPoint>
-              <Coordinate>2.000000</Coordinate>
-              <Coordinate>0.000000</Coordinate>
-              <Coordinate>2.000000</Coordinate>
-            </CartesianPoint>
-            <CartesianPoint>
-              <Coordinate>2.000000</Coordinate>
-              <Coordinate>0.000000</Coordinate>
-              <Coordinate>0.000000</Coordinate>
-            </CartesianPoint>
-            <CartesianPoint>
-              <Coordinate>4.000000</Coordinate>
-              <Coordinate>0.000000</Coordinate>
-              <Coordinate>0.000000</Coordinate>
-            </CartesianPoint>
-            <CartesianPoint>
-              <Coordinate>4.000000</Coordinate>
-              <Coordinate>0.000000</Coordinate>
-              <Coordinate>2.000000</Coordinate>
-            </CartesianPoint>
-          </PolyLoop>
-        </PlanarGeometry>
-      </Opening>
-    </Surface>
-    <Surface id="Surface_18" surfaceType="Roof" constructionIdRef="Exterior_Roof">
-      <AdjacentSpaceId spaceIdRef="Space_3" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>20.000000</Coordinate>
-          <Coordinate>3.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>0</Tilt>
-        <Width>10.000000</Width>
-        <Height>10.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_7" constructionIdRef="Slab" surfaceType="SlabOnGrade">
-      <AdjacentSpaceId spaceIdRef="Space_2" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>20.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>180</Tilt>
-        <Width>10.000000</Width>
-        <Height>10.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_21" surfaceType="ExteriorWall" constructionIdRef="Exterior_Wall">
-      <AdjacentSpaceId spaceIdRef="Space_4" />
-      <RectangularGeometry>
-        <Azimuth>0</Azimuth>
-        <CartesianPoint>
-          <Coordinate>20.000000</Coordinate>
-          <Coordinate>20.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>90</Tilt>
-        <Width>10.000000</Width>
-        <Height>3.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_11" surfaceType="ExteriorWall" constructionIdRef="Exterior_Wall">
-      <AdjacentSpaceId spaceIdRef="Space_2" />
-      <RectangularGeometry>
-        <Azimuth>180</Azimuth>
-        <CartesianPoint>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>90</Tilt>
-        <Width>10.000000</Width>
-        <Height>3.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_6" surfaceType="Roof" constructionIdRef="Exterior_Roof">
-      <AdjacentSpaceId spaceIdRef="Space_1" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>3.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>0</Tilt>
-        <Width>10.000000</Width>
-        <Height>10.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_13" constructionIdRef="Slab" surfaceType="SlabOnGrade">
-      <AdjacentSpaceId spaceIdRef="Space_3" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>180</Tilt>
-        <Width>10.000000</Width>
-        <Height>10.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Surface_12" surfaceType="Roof" constructionIdRef="Exterior_Roof">
-      <AdjacentSpaceId spaceIdRef="Space_2" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>20.000000</Coordinate>
-          <Coordinate>10.000000</Coordinate>
-          <Coordinate>3.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>0</Tilt>
-        <Width>10.000000</Width>
-        <Height>10.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>10.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>3.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Shading_Surface_3" surfaceType="Shade">
-      <AdjacentSpaceId spaceIdRef="Shading_Surface_Group_2" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>-30.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>90</Tilt>
-        <Width>20.000000</Width>
-        <Height>20.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>-30.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>-30.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>-30.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>-30.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>20.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Shading_Surface_2" surfaceType="Shade">
-      <AdjacentSpaceId spaceIdRef="Shading_Surface_Group_1" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>4.000000</Coordinate>
-          <Coordinate>0.000000</Coordinate>
-          <Coordinate>2.000000</Coordinate>
-        </CartesianPoint>
-        <Tilt>0</Tilt>
-        <Width>2.000000</Width>
-        <Height>1.000000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>2.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>2.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>2.000000</Coordinate>
-            <Coordinate>-1.000000</Coordinate>
-            <Coordinate>2.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>4.000000</Coordinate>
-            <Coordinate>-1.000000</Coordinate>
-            <Coordinate>2.000000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>4.000000</Coordinate>
-            <Coordinate>0.000000</Coordinate>
-            <Coordinate>2.000000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
-    <Surface id="Shading_Surface_1" surfaceType="Shade">
-      <AdjacentSpaceId spaceIdRef="Space_2" />
-      <RectangularGeometry>
-        <Azimuth>90</Azimuth>
-        <CartesianPoint>
-          <Coordinate>20.550000</Coordinate>
-          <Coordinate>8.100000</Coordinate>
-          <Coordinate>2.100000</Coordinate>
-        </CartesianPoint>
-        <Tilt>0</Tilt>
-        <Width>0.550000</Width>
-        <Height>6.200000</Height>
-      </RectangularGeometry>
-      <PlanarGeometry>
-        <PolyLoop>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>8.100000</Coordinate>
-            <Coordinate>2.100000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.000000</Coordinate>
-            <Coordinate>1.900000</Coordinate>
-            <Coordinate>2.100000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.550000</Coordinate>
-            <Coordinate>1.900000</Coordinate>
-            <Coordinate>2.100000</Coordinate>
-          </CartesianPoint>
-          <CartesianPoint>
-            <Coordinate>20.550000</Coordinate>
-            <Coordinate>8.100000</Coordinate>
-            <Coordinate>2.100000</Coordinate>
-          </CartesianPoint>
-        </PolyLoop>
-      </PlanarGeometry>
-    </Surface>
   </Campus>
   <Construction id="Interior_Partition">
     <Name>Interior Partition</Name>
@@ -1337,7 +385,7 @@
     <DesignCoolT unit="C">24.000000</DesignCoolT>
   </Zone>
   <DocumentHistory>
-    <CreatedBy programId="openstudio" date="2020-11-02T12:16:35+01:00" personId="unknown" />
+    <CreatedBy programId="openstudio" date="2020-11-02T12:16:37+01:00" personId="unknown" />
     <ProgramInfo id="openstudio">
       <ProductName>OpenStudio</ProductName>
       <Version>3.1.0</Version>

Possible Solution

These two are populated but never reset:

https://github.com/NREL/OpenStudio/blob/585e24973c863e2762788a90eb28fe556bb4479d/src/gbxml/ForwardTranslator.hpp#L113-L115

Details

Environment

Some additional details about your environment for this issue (if relevant):

  • Platform (Operating system, version): All
  • Version of OpenStudio (if using an intermediate build, include SHA): 3.1.0

Context

Found while addressing #4125

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions