// 건축법 시행령 51조 (거실의 채광 등) 1항
check(EDBA_51_1){
IF CS THEN KS
}
CS{
getBuildingUsage() = "DetachedHouse.Room"
OR getBuildingUsage() = "MultiUnitHouse.Room"
OR getBuildingUsage() = "School.Classroom"
OR getBuildingUsage() = "MedicalFacility.Ward"
OR getBuildingUsage() = "LodgingFacility.GuestRoom"
}
KS{
hasElement(Window) = TRUE
}
|
target_bldg_uses = ['단독주택', '공동주택', '교육연구시설', '의료시설', '숙박시설']
target_space_codes = ['33202', '34310', '33201', '34404', '34409']
min_light_win_area = 0.5
min_light_area_ratio = 0.1
min_vent_area_ratio = 0.05
target_bldg_uses_label = '대상 건축물 용도'
target_space_codes_label = '대상 공간분류코드'
min_light_win_area_label = '최소 채광창 면적'
min_light_area_ratio_label = '최소 채광창/바닥 면적비'
min_vent_area_ratio_label = '최소 환기창/바닥 면적비'
def Check():
for building in SELECT('building'):
bldg_use = building.SELECT('building type').STRING()
if not bldg_use in target_bldg_uses:
continue
if bldg_use == '교육연구시설':
if building.SELECT('prop', '세부용도').STRING() != '학교':
continue
for space in building.SELECT('space'):
code = space.SELECT('class code').STRING()
if not code in target_space_codes:
continue
space_area = space.SELECT('area').UNIT('m2').NUMBER()
light_area_sum = 0.0
vent_area_sum = 0.0
for window in space.SELECT('window'):
area = window.SELECT('area-y').UNIT('m2').NUMBER()
vent_ratio = window.SELECT('prop', '환기가능면적비').NUMBER()
if area >= min_light_win_area:
light_area_sum += area
if vent_ratio > 0:
vent_area_sum += area * vent_ratio / 100;
if light_area_sum / space_area >= min_light_area_ratio:
space.SUCCESS('채광면적(' + str(light_area_sum) + ') / 바닥면적(' + str(space_area) + ') >= ' + str(min_light_area_ratio))
else:
space.ERROR('채광면적(' + str(light_area_sum) + ') / 바닥면적(' + str(space_area) + ') < ' + str(min_light_area_ratio))
if vent_area_sum / space_area >= min_vent_area_ratio:
space.SUCCESS('환기면적(' + str(vent_area_sum) + ') / 바닥면적(' + str(space_area) + ') >= ' + str(min_vent_area_ratio))
else:
if space.SELECT('prop', '공기조화설비설치여부').BOOL() == True:
space.SUCCESS('공기조화설비 설치')
else:
space.ERROR('환기면적(' + str(vent_area_sum) + ') / 바닥면적(' + str(space_area) + ') < ' + str(min_vent_area_ratio) + ', 공기조화설비 미설치')
|