Ejemplo n.º 1
0
 def test_scale_idf(self, base_idf):
     # type: () -> None
     idf1 = base_idf
     idf2 = IDF()
     idf2.initreadtxt(idf1.idfstr())
     idf1.scale(10)
     idf1.scale(0.1)
     floor1 = Polygon3D(
         idf1.getsurfaces('floor')[0].coords).normalize_coords(None)
     floor2 = Polygon3D(
         idf2.getsurfaces('floor')[0].coords).normalize_coords(None)
     assert almostequal(floor1, floor2)
Ejemplo n.º 2
0
 def test_rotate_idf_360(self, base_idf):
     # type: () -> None
     idf1 = base_idf
     idf2 = IDF()
     idf2.initreadtxt(idf1.idfstr())
     idf1.rotate(360)
     floor1 = Polygon3D(
         idf1.getsurfaces('floor')[0].coords).normalize_coords(None)
     floor2 = Polygon3D(
         idf2.getsurfaces('floor')[0].coords).normalize_coords(None)
     assert almostequal(floor1, floor2)
     shade1 = Polygon3D(
         idf1.getshadingsurfaces()[0].coords).normalize_coords(None)
     shade2 = Polygon3D(
         idf1.getshadingsurfaces()[0].coords).normalize_coords(None)
     assert almostequal(shade1, shade2)