coordinates=[(0, 0), (10, 0), (10, 5), (0, 5)], height=3) idf.add_block(name='comercio1', coordinates=[(0, 5), (10, 5), (10, 10), (0, 10)], height=3) idf.intersect_match() zones = idf.idfobjects["ZONE"] target_zone_names = ["vivienda0", "vivienda1", "comercio0", "comercio1"] initial_zone_names = [] for i in range(len(zones)): zones[i].Name = target_zone_names[i] initial_zone_names.append(zones[i].Name) srfs = idf.getsurfaces('') for srf in srfs: for index in range(len(initial_zone_names)): if target_zone_names[index] in srf.Zone_Name: srf.Zone_Name = target_zone_names[index] wwr_zones = {"vivienda": 0.2, "comercio": 0.7, "comun": 0.2} def _is_window(subsurface): if subsurface.key.lower() in {"window", "fenestrationsurface:detailed"}: return True def window_vertices_given_wall(wall, wwr): # type: (EpBunch, float) -> Polygon3D
idf.add_shading_block(name="Terrace{}_{}".format(i, j), coordinates=balconies_level[i][j], height=1.5) terrace_floor = idf.newidfobject('SHADING:SITE:DETAILED', Name="TerraceFloor{}_{}".format(i, j)) terrace_floor.setcoords(balconies_level[i][j]) idf.translate([0, 0, 3]) idf.translate([0, 0, -3]) zones = idf.idfobjects["ZONE"] for i in zones: a = i.Name.split()[1] a = a.upper() i.Name = a srfs = idf.getsurfaces() for i in srfs: name = (i.Zone_Name) name = name.split() i.Zone_Name = name[1] for zone in zones: i = zone.Name i = i.lower() add_electric_equipment(i) add_light(i) add_people(i) add_zone_infiltration(i) add_outdoor_air(i) add_hvac_thermostat(i) add_hvac_template(i)