dragonfly-doe2 0.12.4__tar.gz → 0.12.6__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.
Files changed (25) hide show
  1. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/PKG-INFO +2 -2
  2. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2/properties/model.py +22 -4
  3. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2.egg-info/PKG-INFO +2 -2
  4. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2.egg-info/requires.txt +1 -1
  5. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/requirements.txt +1 -1
  6. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/CODE_OF_CONDUCT.md +0 -0
  7. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/CONTRIBUTING.md +0 -0
  8. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/LICENSE +0 -0
  9. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/MANIFEST.in +0 -0
  10. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/README.md +0 -0
  11. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dev-requirements.txt +0 -0
  12. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2/__init__.py +0 -0
  13. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2/__main__.py +0 -0
  14. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2/_extend_dragonfly.py +0 -0
  15. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2/cli/__init__.py +0 -0
  16. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2/cli/translate.py +0 -0
  17. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2/properties/__init__.py +0 -0
  18. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2/properties/room2d.py +0 -0
  19. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2/writer.py +0 -0
  20. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2.egg-info/SOURCES.txt +0 -0
  21. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2.egg-info/dependency_links.txt +0 -0
  22. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2.egg-info/entry_points.txt +0 -0
  23. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/dragonfly_doe2.egg-info/top_level.txt +0 -0
  24. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/setup.cfg +0 -0
  25. {dragonfly_doe2-0.12.4 → dragonfly_doe2-0.12.6}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dragonfly-doe2
3
- Version: 0.12.4
3
+ Version: 0.12.6
4
4
  Summary: Dragonfly extension for the DOE-2 energy simulation engine.
5
5
  Home-page: https://github.com/ladybug-tools/dragonfly-doe2
6
6
  Author: Ladybug Tools
@@ -14,7 +14,7 @@ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
14
14
  Classifier: Operating System :: OS Independent
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
- Requires-Dist: honeybee-doe2==0.22.5
17
+ Requires-Dist: honeybee-doe2==0.22.6
18
18
  Requires-Dist: dragonfly-energy>=1.34.2
19
19
 
20
20
  ![Dragonfly](https://www.ladybug.tools/assets/img/dragonfly.png) ![DOE-2](https://doe2.com/DOE2/BldgDOE2.gif) ![eQuest](https://www.doe2.com/equest/eQcb_142.gif)
@@ -1,5 +1,8 @@
1
1
  # coding=utf-8
2
2
  """Model DOE-2 Properties."""
3
+ from ladybug_geometry.geometry3d import Face3D
4
+ from honeybee.units import parse_distance_string
5
+
3
6
  from honeybee_doe2.grouping import _grouped_floor_boundary
4
7
 
5
8
 
@@ -94,7 +97,7 @@ class ModelDoe2Properties(object):
94
97
  # set up defaults to ensure the method runs correctly
95
98
  detailed = False if raise_exception else detailed
96
99
  msgs = []
97
- # perform checks for specific energy simulation rules
100
+ # perform checks for specific doe-2 simulation rules
98
101
  msgs.append(self.check_room_2d_floor_plate_vertex_count(False, detailed))
99
102
  # output a final report of errors or raise an exception
100
103
  full_msgs = [msg for msg in msgs if msg]
@@ -123,7 +126,7 @@ class ModelDoe2Properties(object):
123
126
  detailed = False if raise_exception else detailed
124
127
  msgs = []
125
128
  tol = self.host.tolerance
126
- # perform checks for specific energy simulation rules
129
+ # perform checks for specific doe-2 simulation rules
127
130
  msgs.append(self.check_room_2d_floor_plate_vertex_count(False, detailed))
128
131
  msgs.append(self.check_no_room_2d_floor_plate_holes(False, detailed))
129
132
  msgs.append(self.check_no_story_courtyards(tol, False, detailed))
@@ -219,14 +222,29 @@ class ModelDoe2Properties(object):
219
222
  Returns:
220
223
  A string with the message or a list with a dictionary if detailed is True.
221
224
  """
225
+ # establish the tolerance and gap width at which point it is clearly a courtyard
222
226
  tolerance = self.host.tolerance if tolerance is None else tolerance
227
+ court_width = parse_distance_string('1ft', self.host.units)
228
+ # loop through the stories and identify any courtyards
223
229
  story_msgs = []
224
230
  for bldg in self.host.buildings:
225
231
  for story in bldg.unique_stories:
226
232
  floor_geos = [room.floor_geometry for room in story.room_2ds]
227
233
  joined_geos = _grouped_floor_boundary(floor_geos, tolerance)
228
- if any(geo.has_holes for geo in joined_geos):
229
- c_count = max(len(geo.holes) for geo in joined_geos if geo.has_holes)
234
+ c_count = 0
235
+ for geo in joined_geos:
236
+ if geo.has_holes:
237
+ for hole in geo.holes:
238
+ try:
239
+ h_geo = Face3D(hole)
240
+ h_geo = h_geo.remove_colinear_vertices(court_width)
241
+ max_len = max(s.length for s in h_geo.boundary_segments)
242
+ tol_area = max_len * court_width
243
+ if h_geo.area > tol_area:
244
+ c_count += 1
245
+ except (AssertionError, ValueError):
246
+ pass # gap is too small to be a true courtyard
247
+ if c_count != 0:
230
248
  hole_msg = 'a courtyard' if c_count == 1 \
231
249
  else '{} courtyards'.format(c_count)
232
250
  msg = 'The geometry of Story "{}" contains {}, which eQuest ' \
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dragonfly-doe2
3
- Version: 0.12.4
3
+ Version: 0.12.6
4
4
  Summary: Dragonfly extension for the DOE-2 energy simulation engine.
5
5
  Home-page: https://github.com/ladybug-tools/dragonfly-doe2
6
6
  Author: Ladybug Tools
@@ -14,7 +14,7 @@ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
14
14
  Classifier: Operating System :: OS Independent
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
- Requires-Dist: honeybee-doe2==0.22.5
17
+ Requires-Dist: honeybee-doe2==0.22.6
18
18
  Requires-Dist: dragonfly-energy>=1.34.2
19
19
 
20
20
  ![Dragonfly](https://www.ladybug.tools/assets/img/dragonfly.png) ![DOE-2](https://doe2.com/DOE2/BldgDOE2.gif) ![eQuest](https://www.doe2.com/equest/eQcb_142.gif)
@@ -1,2 +1,2 @@
1
- honeybee-doe2==0.22.5
1
+ honeybee-doe2==0.22.6
2
2
  dragonfly-energy>=1.34.2
@@ -1,2 +1,2 @@
1
- honeybee-doe2==0.22.5
1
+ honeybee-doe2==0.22.6
2
2
  dragonfly-energy>=1.34.2
File without changes