osut 0.8.1__tar.gz → 0.8.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {osut-0.8.1 → osut-0.8.2}/PKG-INFO +1 -1
- {osut-0.8.1 → osut-0.8.2}/pyproject.toml +1 -1
- {osut-0.8.1 → osut-0.8.2}/src/osut/osut.py +1 -1
- {osut-0.8.1 → osut-0.8.2}/src/osut.egg-info/PKG-INFO +1 -1
- {osut-0.8.1 → osut-0.8.2}/tests/test_osut.py +27 -0
- {osut-0.8.1 → osut-0.8.2}/LICENSE +0 -0
- {osut-0.8.1 → osut-0.8.2}/README.md +0 -0
- {osut-0.8.1 → osut-0.8.2}/setup.cfg +0 -0
- {osut-0.8.1 → osut-0.8.2}/src/osut/__init__.py +0 -0
- {osut-0.8.1 → osut-0.8.2}/src/osut.egg-info/SOURCES.txt +0 -0
- {osut-0.8.1 → osut-0.8.2}/src/osut.egg-info/dependency_links.txt +0 -0
- {osut-0.8.1 → osut-0.8.2}/src/osut.egg-info/requires.txt +0 -0
- {osut-0.8.1 → osut-0.8.2}/src/osut.egg-info/top_level.txt +0 -0
|
@@ -5554,7 +5554,7 @@ def spaceWidth(space=None) -> float:
|
|
|
5554
5554
|
polyg = list(polyg)
|
|
5555
5555
|
polyg.reverse()
|
|
5556
5556
|
|
|
5557
|
-
res = realignedFace(polyg)
|
|
5557
|
+
res = realignedFace(polyg, True)
|
|
5558
5558
|
if not res["box"]: return 0
|
|
5559
5559
|
|
|
5560
5560
|
# A bounded box's 'height', at its narrowest, is its 'width'.
|
|
@@ -5944,6 +5944,33 @@ class TestOSutModuleMethods(unittest.TestCase):
|
|
|
5944
5944
|
self.assertEqual(o.level(), DBG)
|
|
5945
5945
|
translator = openstudio.osversion.VersionTranslator()
|
|
5946
5946
|
|
|
5947
|
+
# Basic test: 'deep' space (vs X-axis).
|
|
5948
|
+
vtx = openstudio.Point3dVector()
|
|
5949
|
+
vtx.append(openstudio.Point3d(2,9,1))
|
|
5950
|
+
vtx.append(openstudio.Point3d(2,1,1))
|
|
5951
|
+
vtx.append(openstudio.Point3d(1,1,1))
|
|
5952
|
+
vtx.append(openstudio.Point3d(1,9,1))
|
|
5953
|
+
|
|
5954
|
+
model = openstudio.model.Model()
|
|
5955
|
+
space = openstudio.model.Space(model)
|
|
5956
|
+
floor = openstudio.model.Surface(vtx, model)
|
|
5957
|
+
floor.setSpace(space)
|
|
5958
|
+
self.assertAlmostEqual(osut.spaceWidth(space),1,3)
|
|
5959
|
+
|
|
5960
|
+
# Basic test: 'narrow' space (vs X-axis).
|
|
5961
|
+
vtx = openstudio.Point3dVector()
|
|
5962
|
+
vtx.append(openstudio.Point3d(9,2,1))
|
|
5963
|
+
vtx.append(openstudio.Point3d(9,1,1))
|
|
5964
|
+
vtx.append(openstudio.Point3d(1,1,1))
|
|
5965
|
+
vtx.append(openstudio.Point3d(1,2,1))
|
|
5966
|
+
|
|
5967
|
+
model = openstudio.model.Model()
|
|
5968
|
+
space = openstudio.model.Space(model)
|
|
5969
|
+
floor = openstudio.model.Surface(vtx, model)
|
|
5970
|
+
floor.setSpace(space)
|
|
5971
|
+
self.assertAlmostEqual(osut.spaceWidth(space),1,3)
|
|
5972
|
+
|
|
5973
|
+
# --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- #
|
|
5947
5974
|
path = openstudio.path("./tests/files/osms/in/warehouse.osm")
|
|
5948
5975
|
model = translator.loadModel(path)
|
|
5949
5976
|
self.assertTrue(model)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|