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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: osut
3
- Version: 0.8.1
3
+ Version: 0.8.2
4
4
  Summary: OpenStudio SDK utilities for Python
5
5
  Author-email: Denis Bourgeois <denis@rd2.ca>
6
6
  Maintainer-email: Denis Bourgeois <denis@rd2.ca>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "osut"
3
- version = "0.8.1"
3
+ version = "0.8.2"
4
4
  description = "OpenStudio SDK utilities for Python"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.2"
@@ -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'.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: osut
3
- Version: 0.8.1
3
+ Version: 0.8.2
4
4
  Summary: OpenStudio SDK utilities for Python
5
5
  Author-email: Denis Bourgeois <denis@rd2.ca>
6
6
  Maintainer-email: Denis Bourgeois <denis@rd2.ca>
@@ -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