@@ -1835,6 +1835,40 @@ def assign_stories_by_floor_height(self, min_difference=2.0, overwrite=False):
1835
1835
room .story = None
1836
1836
return Room .stories_by_floor_height (self ._rooms , min_difference )
1837
1837
1838
+ def rooms_to_extrusions (self , tolerance = None , angle_tolerance = None ):
1839
+ """Convert all Rooms in the model to extruded floor plates with flat roofs.
1840
+
1841
+ Rooms that already extrusions will be left as they are. For non-extrusion
1842
+ rooms, all boundary conditions and windows applied to vertical walls will
1843
+ be preserved and the resulting Room should have a volume that matches the
1844
+ original Room. If adding back apertures to the room extrusion results in
1845
+ these apertures going past the parent wall Face, the windows of the Face
1846
+ will be reduced to a simple window ratio. Any Surface boundary conditions
1847
+ will be converted to Adiabatic (if honeybee-energy is installed) or
1848
+ Outdoors (if not).
1849
+
1850
+ This method is useful for exporting to platforms that cannot model Room
1851
+ geometry beyond simple extrusions. The fact that the resulting room has
1852
+ window areas and volumes that match the original detailed geometry
1853
+ should help ensure the results in these platforms are close to what they
1854
+ would be had the detailed geometry been modeled.
1855
+
1856
+ Args:
1857
+ tolerance: The maximum difference between point values for them to be
1858
+ considered equivalent. If None, the Model tolerance will be
1859
+ used. (Default: None).
1860
+ angle_tolerance: The max angle in degrees that the corners of the
1861
+ rectangle can differ from a right angle before it is not
1862
+ considered a rectangle. If None, the Model angle_tolerance will be
1863
+ used. (Default: None).
1864
+ """
1865
+ tol = tolerance if tolerance else self .tolerance
1866
+ a_tol = angle_tolerance if angle_tolerance else self .angle_tolerance
1867
+ extrusion_rooms = []
1868
+ for room in self ._rooms :
1869
+ extrusion_rooms .append (room .to_extrusion (tol , a_tol ))
1870
+ self ._rooms = extrusion_rooms
1871
+
1838
1872
def convert_to_units (self , units = 'Meters' ):
1839
1873
"""Convert all of the geometry in this model to certain units.
1840
1874
0 commit comments