honeybee-core 1.62.0__py3-none-any.whl → 1.62.2__py3-none-any.whl

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.
honeybee/model.py CHANGED
@@ -13,7 +13,7 @@ try: # check if we are in IronPython
13
13
  except ImportError: # wea are in cPython
14
14
  import pickle
15
15
 
16
- from ladybug_geometry.geometry3d import Plane, Face3D, Mesh3D
16
+ from ladybug_geometry.geometry3d import Vector3D, Point3D, Plane, Face3D, Mesh3D
17
17
  from ladybug_geometry.interop.stl import STL
18
18
 
19
19
  from ._base import _Base
@@ -2001,6 +2001,38 @@ class Model(_Base):
2001
2001
  self.tolerance = self.tolerance * scale_fac
2002
2002
  self.units = units
2003
2003
 
2004
+ def reset_coordinate_system(self, new_origin=None):
2005
+ """Set the origin of the coordinate system in which the model exists.
2006
+
2007
+ This is useful for resolving cases where the model geometry lies so
2008
+ far from the origin in its current coordinate system that it creates
2009
+ problems. For example, the model geometry might be so high above the
2010
+ origin that EnergyPlus models it in the conditions of the stratosphere.
2011
+ Another possibility is that the float values of the coordinates are so
2012
+ high that floating point tolerance interferes with the proper
2013
+ representation of the model's details.
2014
+
2015
+ In addition to moving the model such that the new_origin sets the
2016
+ coordinate values of the geometry, this method will also set the
2017
+ reference_vector of this object such that any models added into this
2018
+ one from the original source coordinate system respect the new system.
2019
+
2020
+ Args:
2021
+ new_origin: A Point3D in the model's current coordinate system that
2022
+ will become the origin of the new coordinate system. If unspecified,
2023
+ the minimum of the bounding box around the model geometry will
2024
+ be used and the average_height_above_ground will be used to
2025
+ set the Z coordinate. (Default: None).
2026
+ """
2027
+ # compute the new_origin from the bounding box around the geometry
2028
+ if new_origin is None:
2029
+ min_2d = self.min
2030
+ z_val = self.average_height - self.average_height_above_ground
2031
+ new_origin = Point3D(min_2d.x, min_2d.y, z_val)
2032
+ # move the geometry using a vector that is the inverse of the origin
2033
+ ref_vec = Vector3D(-new_origin.x, -new_origin.y, -new_origin.z)
2034
+ self.move(ref_vec)
2035
+
2004
2036
  def rooms_to_orphaned(self):
2005
2037
  """Convert all Rooms in this Model to orphaned geometry objects.
2006
2038
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: honeybee-core
3
- Version: 1.62.0
3
+ Version: 1.62.2
4
4
  Summary: A library to create 3D building geometry for various types of environmental simulation.
5
5
  Home-page: https://github.com/ladybug-tools/honeybee-core
6
6
  Author: Ladybug Tools
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: Implementation :: IronPython
18
18
  Classifier: Operating System :: OS Independent
19
19
  Description-Content-Type: text/markdown
20
20
  License-File: LICENSE
21
- Requires-Dist: ladybug-core==0.44.20
21
+ Requires-Dist: ladybug-core==0.44.21
22
22
  Requires-Dist: ladybug-geometry-polyskel==1.7.31
23
23
  Requires-Dist: honeybee-schema==1.59.1; python_version >= "3.7"
24
24
  Dynamic: author
@@ -16,7 +16,7 @@ honeybee/extensionutil.py,sha256=DDQYhM7tFD3avRSCOjwTzLqX9ldUxl5GzY79V3_sATE,964
16
16
  honeybee/face.py,sha256=j8ud3d-8Z8RvDomeiyYTqalu5czgiCMb08Xue_tFRGo,112287
17
17
  honeybee/facetype.py,sha256=vCtWZKHp21RH-Yzs8zsHJHuFhJvczNh0yFl8wDe_RWY,4489
18
18
  honeybee/logutil.py,sha256=2gn-6RcWqFLvwdFzBHPqUwFqTj_R3iwHKALrl-2eL7M,2564
19
- honeybee/model.py,sha256=_pWC-_jf8_8BzWUslzLdZFLw4AuwpeMNTD4uFS0i2GY,179279
19
+ honeybee/model.py,sha256=bN92hcE0UaTYMCds5QrEfkeuP8lsTrXU48bwE1TjNug,181093
20
20
  honeybee/orientation.py,sha256=GogGblASW9OU-fobfDaQ7w5yRbEAFdJJuHwg2fadhKI,5046
21
21
  honeybee/properties.py,sha256=ok976fbUdXzLDR2XiPNf8Q5ejfOM-PArqm5CVUbFiCc,34316
22
22
  honeybee/room.py,sha256=WrQuXHoomD_vbxF6Io8SIlUCpkXqh6j59N4yIR26mhM,156468
@@ -40,9 +40,9 @@ honeybee/writer/model.py,sha256=N7F_jksf-5TrdVecuxTaFWxnPVFLmQs7k8g27TsdB7Q,177
40
40
  honeybee/writer/room.py,sha256=kFghgStTU1SEJSLigXB0VjOWhZtgs4uXuAqdwd4yRQo,174
41
41
  honeybee/writer/shade.py,sha256=EpgX-vMc-s21TnMvNWvWTKyT8iAnxu1nFVXzjY1oyF8,177
42
42
  honeybee/writer/shademesh.py,sha256=Y41bLogJ7dwpvMe5cAWVRDRVqJEwo9e5hFJQjlt6UX8,189
43
- honeybee_core-1.62.0.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
44
- honeybee_core-1.62.0.dist-info/METADATA,sha256=DfCu2IeL7GV5gFrorkRctu8Fe8k9C9MtLlg-AYQLSkM,3729
45
- honeybee_core-1.62.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
- honeybee_core-1.62.0.dist-info/entry_points.txt,sha256=r3YqOm40goBroH3ccUhpwQjvTwu10JWLd0HIRHI1J8E,47
47
- honeybee_core-1.62.0.dist-info/top_level.txt,sha256=8ve7puCRLUA9XDEGc1Mcs-UX9sFjpPV8MeTaIMwQ_Tg,9
48
- honeybee_core-1.62.0.dist-info/RECORD,,
43
+ honeybee_core-1.62.2.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
44
+ honeybee_core-1.62.2.dist-info/METADATA,sha256=szXuQMf8Srxm_a5rD2yhIsfxFNxyLKNsadPJFE5KezU,3729
45
+ honeybee_core-1.62.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
46
+ honeybee_core-1.62.2.dist-info/entry_points.txt,sha256=r3YqOm40goBroH3ccUhpwQjvTwu10JWLd0HIRHI1J8E,47
47
+ honeybee_core-1.62.2.dist-info/top_level.txt,sha256=8ve7puCRLUA9XDEGc1Mcs-UX9sFjpPV8MeTaIMwQ_Tg,9
48
+ honeybee_core-1.62.2.dist-info/RECORD,,