설계품질검토 대상법규   |   조항단위 법규   |   문장단위 법규   |   KBimCode-Assess 연동모듈   |   KBimCode DB   |   주어부 - 객체,속성 DB   |   서술부 - 함수 DB   |   관계부 - 문장관계   |   룰셋생성모듈   |  
(2025-06-27 기준) 설계품질검토용 건축법 및 관련법규 - KBIMCode (분야/용도/단계별 체크리스트 단위)
      KBIMCode - KBimAssess Python Code     KBIMCode - 조항단위     KBIMCode - 문장단위    
  ◁prev 1   2   3   4   5   6   7   8   9   10   next▷ NEXT10▶
7 / 12 page Total 2500 / 4000 records   
Select
ALL
None
#
ID
Law
Usage


Field
under development
Process
under development
Search!
1
31646 건축법 시행령 제 61조 1 항 4호 가 목

가. 국토교통부령으로 정하는 화재위험이 적은 공장용도로 쓸 것





Check(EDBA_61_1_4_1){
KS}


KS{
getResult(REFB_24-2_1)= TRUE
} 




Python Code 변환 예정



Modify
2
31647 건축법 시행령 제 61조 1 항 4호 나 목

나. 화재 시 대피가 가능한 국토교통부령으로 정하는 출구를 갖출 것





Check(EDBA_61_1_4_2){
KS}


KS{
getResult(REFB_24-2_2)= TRUE 
} 




Python Code 변환 예정



Modify
3
31648 건축법 시행령 제 61조 1 항 4호 다 목

다. 국토교통부령으로 정하는 성능을 갖춘 복합자재[불연성인 재료와 불연성이 아닌 재료가 복합된 자재로서 양면 철판과 심재(心材)로 구성된 것을 말한다]를 내부 마감재료로 쓸 것





Check(EDBA_61_1_4_3){
KS}


KS{
getResult(REFB_24-2_3)=TRUE 
} 




Python Code 변환 예정



Modify
4
32206 건축법 시행령 제 39조 1 항 5호

5. 업무시설 중 국가 또는 지방자치단체의 청사





// 건축법 시행령 39조 (건축물 바깥쪽으로의 출구 설치) 1항 5호

Check(EDBA_39_1_5){     
KS
}

KS {
Building myBuilding{
getBuildingUsage() = “BusinessFacility.GovernmentOfficeBuilding”
}

isExist(myBuliding) = TRUE
}
 








target_bldg_type_1 = ['제2종 근린생활시설', '문화 및 집회시설', '종교시설', '판매시설', '업무시설', '창고시설', '교육연구시설', '장례시설', '승강기를 설치하여야하는 건축물']
target_bldg_sub_type_2 = ['판매시설']
max_route_length_stair_to_door = 30
max_route_length_space_to_door = 60
min_em_door_count = 2
min_em_door_h = 1.5
min_em_door_w = 0.75

target_bldg_types_1_label = '외부 출입구 방향 적용 대상 건출물 용도'
target_bldg_types_2_label = '외부 출입구 유효너비 대상 건출물 용도'

max_route_length_stair_to_door_label = '직통계단과 외부 출입구 간 최소거리'
max_route_length_space_to_door_label = '거실과 외부 출입구 간 최소거리'
min_em_door_count_label = '최소 비상구 개수'
min_em_door_h_label = '최소 비상구 높이'
min_em_door_w_label = '최소 비상구 유효너비'

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()
        if (bldg_type in target_bldg_type_1):
            if bldg_type == '제2종 근린생활시설' and sub_type in ['공연장', '종교집회장', '인터넷컴퓨터게임시설제공업소']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '문화 및 집회시설' and sub_type in ['전시장', '동물원', '식물원']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '업무시설' and sub_type == '청사':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '교육연구시설' and sub_type == '학교':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            message =  '검토 대상 건물입니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)

        else:
            message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)
            break



        evac_storey_exist = False
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('is evacuation storey').BOOL() == True:
                evac_storey_exist = True
                break

        if evac_storey_exist == False:
            ERROR('피난층이 존재하지 않습니다.')
            return

        for storey in stories:
            stairs = storey.SELECT('direct stair')

            if stairs.COUNT() == 0:
                storey.ERROR(storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
                continue

            exDoors = []
            for door in storey.SELECT('door'):
                if door.SELECT('is external').BOOL() == True:
                    exDoors.append(door)

            for stair in stairs:
                route_length = -1
                for route in stair.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_stair_to_door:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    stair.SUCCESS(stair.SELECT('name').STRING() + ' : ' + str(route_length))

            spaces = storey.SELECT('space')

            for space in spaces:
                route_length = -1
                for route in space.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_space_to_door:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    space.SUCCESS(space.SELECT('name').STRING() + ' : ' + str(route_length))

            if bldg_type in target_bldg_types_1:
                for door in exDoors:
                    if door.SELECT('is inward').BOOL():
                        door.ERROR('외부 출입구의 방향이 안여닫이입니다.')

                for space in spaces:
                    code = space.SELECT('class code').STRING()
                    if not code in theater_space_codes:
                        continue
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area < 300:
                        continue
                    emExits = []
                    for door in space.SELECT('space door'):
                        if door.SELECT('prop', '비상구').BOOL() or door.SELECT('prop', '보조출입구').BOOL():
                            emExits.append(door)
                    if len(emExits) < min_em_door_count:
                        space.ERROR('비상구(보조출입구) 개수:' + str(len(emExits)) + '(<' + str(min_em_door_count) + ')')
                        continue
                    em_exit_count = 0
                    for exit in emExits:
                        if exit.SELECT('clear opening').UNIT('m').NUMBER() >= min_em_door_w and exit.SELECT('height').UNIT('m').NUMBER() >= min_em_door_h:
                            em_exit_count += 1
                    if em_exit_count < min_em_door_count:
                        space.ERROR('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(<' + str(min_em_door_count) + ')')
                    else:
                        space.SUCCESS('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(>=' + str(min_em_door_count) + ')')

            if bldg_type in target_bldg_types_2:
                if storey.SELECT('is evacuation storey').BOOL() == False:
                    continue
                max_area = 0;
                for space in spaces:
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area > max_area:
                        max_area = area
                min_door_w = max_area / 100 * 0.6;

                for door in exDoors:
                    width = door.SELECT('clear opening').UNIT('m')
                    w = width.NUMBER()
                    if (w < min_door_w):
                        width.ERROR('출구 유효너비:' + str(w) + '(<' + str(min_door_w) + ')')
                    else:
                        width.SUCCESS('출구 유효너비:' + str(w) + '(>=' + str(min_door_w) + ')')
 





Modify
5
32211 건축법 시행령 제 39조 1 항 10호

10. 승강기를 설치하여야 하는 건축물





// 건축법 시행령 39조 (건축물 바깥쪽으로의 출구 설치) 1항 10호

Check(EDBA_39_1_10){     
KS
}


KS {
Building myBuilding{
hasObject(Building, Elevator)
}

isExist(myBuliding) = TRUE
}
 








target_bldg_type_1 = ['제2종 근린생활시설', '문화 및 집회시설', '종교시설', '판매시설', '업무시설', '창고시설', '교육연구시설', '장례시설', '승강기를 설치하여야하는 건축물']
target_bldg_sub_type_2 = ['판매시설']
max_route_length_stair_to_door = 30
max_route_length_space_to_door = 60
min_em_door_count = 2
min_em_door_h = 1.5
min_em_door_w = 0.75

target_bldg_types_1_label = '외부 출입구 방향 적용 대상 건출물 용도'
target_bldg_types_2_label = '외부 출입구 유효너비 대상 건출물 용도'

max_route_length_stair_to_door_label = '직통계단과 외부 출입구 간 최소거리'
max_route_length_space_to_door_label = '거실과 외부 출입구 간 최소거리'
min_em_door_count_label = '최소 비상구 개수'
min_em_door_h_label = '최소 비상구 높이'
min_em_door_w_label = '최소 비상구 유효너비'

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()
        if (bldg_type in target_bldg_type_1):
            if bldg_type == '제2종 근린생활시설' and sub_type in ['공연장', '종교집회장', '인터넷컴퓨터게임시설제공업소']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '문화 및 집회시설' and sub_type in ['전시장', '동물원', '식물원']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '업무시설' and sub_type == '청사':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '교육연구시설' and sub_type == '학교':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            message =  '검토 대상 건물입니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)

        else:
            message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)
            break



        evac_storey_exist = False
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('is evacuation storey').BOOL() == True:
                evac_storey_exist = True
                break

        if evac_storey_exist == False:
            ERROR('피난층이 존재하지 않습니다.')
            return

        for storey in stories:
            stairs = storey.SELECT('direct stair')

            if stairs.COUNT() == 0:
                storey.ERROR(storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
                continue

            exDoors = []
            for door in storey.SELECT('door'):
                if door.SELECT('is external').BOOL() == True:
                    exDoors.append(door)

            for stair in stairs:
                route_length = -1
                for route in stair.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_stair_to_door:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    stair.SUCCESS(stair.SELECT('name').STRING() + ' : ' + str(route_length))

            spaces = storey.SELECT('space')

            for space in spaces:
                route_length = -1
                for route in space.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_space_to_door:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    space.SUCCESS(space.SELECT('name').STRING() + ' : ' + str(route_length))

            if bldg_type in target_bldg_types_1:
                for door in exDoors:
                    if door.SELECT('is inward').BOOL():
                        door.ERROR('외부 출입구의 방향이 안여닫이입니다.')

                for space in spaces:
                    code = space.SELECT('class code').STRING()
                    if not code in theater_space_codes:
                        continue
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area < 300:
                        continue
                    emExits = []
                    for door in space.SELECT('space door'):
                        if door.SELECT('prop', '비상구').BOOL() or door.SELECT('prop', '보조출입구').BOOL():
                            emExits.append(door)
                    if len(emExits) < min_em_door_count:
                        space.ERROR('비상구(보조출입구) 개수:' + str(len(emExits)) + '(<' + str(min_em_door_count) + ')')
                        continue
                    em_exit_count = 0
                    for exit in emExits:
                        if exit.SELECT('clear opening').UNIT('m').NUMBER() >= min_em_door_w and exit.SELECT('height').UNIT('m').NUMBER() >= min_em_door_h:
                            em_exit_count += 1
                    if em_exit_count < min_em_door_count:
                        space.ERROR('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(<' + str(min_em_door_count) + ')')
                    else:
                        space.SUCCESS('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(>=' + str(min_em_door_count) + ')')

            if bldg_type in target_bldg_types_2:
                if storey.SELECT('is evacuation storey').BOOL() == False:
                    continue
                max_area = 0;
                for space in spaces:
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area > max_area:
                        max_area = area
                min_door_w = max_area / 100 * 0.6;

                for door in exDoors:
                    width = door.SELECT('clear opening').UNIT('m')
                    w = width.NUMBER()
                    if (w < min_door_w):
                        width.ERROR('출구 유효너비:' + str(w) + '(<' + str(min_door_w) + ')')
                    else:
                        width.SUCCESS('출구 유효너비:' + str(w) + '(>=' + str(min_door_w) + ')')
 





Modify
6
33160 건축법 시행령 제 41조 1 항 1호

1. 통로의 너비는 다음 각 목의 구분에 따른 기준에 따라 확보할 것





Check(EDBA_41_1_1){

getresult(EDBA_41_1_1_가) =True 
getresult(EDBA_41_1_1_나) =True 
getresult(EDBA_41_1_1_다) =True 
} 








target_bldg_uses_01 = ['단독주택']
target_bldg_uses_02 = ['문화 및 집회시설', '장례시설', '의료시설', '위락시설']

target_bldg_uses_01_label = '건축물 용도1'
target_bldg_uses_02_label = '건축물 용도2'

def Check():
    for building in SELECT('building'):
        bldg_use = building.SELECT('building type').STRING()
        min_corridor_w = 1.5
        min_area = 0.0

        if bldg_use in target_bldg_uses_01:
            min_corridor_w = 0.9
        elif bldg_use in target_bldg_uses_02:
            min_corridor_w = 3.0
            min_area = 500

        if min_area > 0:
            area = 0
            for space in building.SELECT('space'):
                area += space.SELECT('area').UNIT('m2').NUMBER()
            if area < min_area:
                building.SUCCESS('바닥면적의 합: ' + str(area) + ' < ' + str(min_area))
                continue

        base_storey = None
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('prop', '기준 지상층').BOOL() == True:
                base_storey = storey
                break

        if base_storey is None:
            building.ERROR('기준 지상층이 존재하지 않습니다.')
            break

        stairs = base_storey.SELECT('direct stair')

        if stairs.COUNT() == 0:
            base_storey.ERROR(base_storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
            continue

        exDoors = []
        for door in base_storey.SELECT('door'):
            if door.SELECT('is external').BOOL() == True:
                exDoors.append(door)

        for stair in stairs:
            for route in stair.SELECT('escape route', exDoors):
                for space in route.SELECT('passing space'):
                    width = space.SELECT('min clear width').UNIT('m')
                    w = width.NUMBER()
                    if w < min_corridor_w:
                        width.ERROR('통로 너비: ' + str(w) + ' < ' + str(min_corridor_w))
                    else:
                        width.SUCCESS('통로 너비: ' + str(w) + ' >= ' + str(min_corridor_w)) 





Modify
7
33161 건축법 시행령 제 41조 1 항 1호 가 목

가. 단독주택: 유효 너비 0.9미터 이상





Check(EDBA_41_1_1){

  IF (CS) THEN KS END IF 

}

CS{

getObjectProperty(Building.usage)="DetachedHouse"

}

KS{

  getObjectProperty(Passage.effectiveWidth)> 0.9M

} 








def Check():
    if SELECT("building type").STRING() == "DetachedHouse":
        passage = SELECT("passage")
        if passage.SELECT("clear width").UNIT("m").NUMBER()> 0.9:
            passage.SUCCESS("pass")
        else:
            passage.ERROR("fail")
 





Modify
8
33163 건축법 시행령 제 41조 1 항 1호 다 목

다. 그 밖의 용도로 쓰는 건축물: 유효 너비 1.5미터 이상





Check(EDBA_41_1_3){

IF (CS) THEN KS END IF

}

CS{

Building.usage !="DetachedHouse"

OR   Building.usage !="CulturalAndAssemblyFacility"

   OR Building.usage !="ReligiousFacility" 

   OR  Building.usage !="MedicalFacility" 

   OR Building.usage !="AmusementFacility" 

   OR Building.usage !="FuneralParlor"  
}

KS{

 getObjectProperty(Passage.effectiveWidth)> 1.5m ;

} 








target_bldg_uses_01 = ['단독주택']
target_bldg_uses_02 = ['문화 및 집회시설', '장례시설', '의료시설', '위락시설']

target_bldg_uses_01_label = '건축물 용도1'
target_bldg_uses_02_label = '건축물 용도2'

def Check():
    for building in SELECT('building'):
        bldg_use = building.SELECT('building type').STRING()
        min_corridor_w = 1.5
        min_area = 0.0

        if bldg_use in target_bldg_uses_01:
            min_corridor_w = 0.9
        elif bldg_use in target_bldg_uses_02:
            min_corridor_w = 3.0
            min_area = 500

        if min_area > 0:
            area = 0
            for space in building.SELECT('space'):
                area += space.SELECT('area').UNIT('m2').NUMBER()
            if area < min_area:
                building.SUCCESS('바닥면적의 합: ' + str(area) + ' < ' + str(min_area))
                continue

        base_storey = None
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('prop', '기준 지상층').BOOL() == True:
                base_storey = storey
                break

        if base_storey is None:
            building.ERROR('기준 지상층이 존재하지 않습니다.')
            break

        stairs = base_storey.SELECT('direct stair')

        if stairs.COUNT() == 0:
            base_storey.ERROR(base_storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
            continue

        exDoors = []
        for door in base_storey.SELECT('door'):
            if door.SELECT('is external').BOOL() == True:
                exDoors.append(door)

        for stair in stairs:
            for route in stair.SELECT('escape route', exDoors):
                for space in route.SELECT('passing space'):
                    width = space.SELECT('min clear width').UNIT('m')
                    w = width.NUMBER()
                    if w < min_corridor_w:
                        width.ERROR('통로 너비: ' + str(w) + ' < ' + str(min_corridor_w))
                    else:
                        width.SUCCESS('통로 너비: ' + str(w) + ' >= ' + str(min_corridor_w)) 





Modify
9
33195 건축법 시행령 제 51조 2 항 1호 가 목

가. 제2종 근린생활시설 중 공연장, 종교집회장, 인터넷컴퓨터게임시설제공업소 및 다중생활시설(공연장, 종교집회장 및 인터넷컴퓨터게임시설제공업소는 해당 용도로 쓰는 바닥면적의 합계가 각각 300제곱미터 이상인 경우만 해당한다)





//건축법 시행령 51조 (거실의 채광 등) 2항 1호
Check(EDBA_51_2_1){
	KS1 OR KS2
}	
KS1{
	Space mySpace{
		getBuildingUsage() = "ClassIINeighborhoodLivingFacility.PerformanceHall"
		OR getBuildingUsage() = "ClassIINeighborhoodLivingFacility.ReligiousAssemblyFacility"
		OR getBuildingUsage() = "ClassIINeighborhoodLivingFacility.FacilityForProvidingInternetComputerGameService"	
	}

	getFloorArea(mySpace) >= 300 m2
}

KS2{
	getBuildingUsage() = "ClassIINeighborhoodLivingFacility.CommunalLivingFacilities"
}
 




Python Code 변환 예정



Modify
10
33196 건축법 시행령 제 51조 2 항 1호 나 목

나. 문화 및 집회시설





//건축법 시행령 51조 (거실의 채광 등) 2항 2호
Check(EDBA_51_2_2){
	getBuildingUsage() = "CulturalAndAssemblyFacility"
} 




Python Code 변환 예정



Modify
11
33197 건축법 시행령 제 51조 2 항 1호 다 목

다. 종교시설





//건축법 시행령 51조 (거실의 채광 등) 2항 3호
Check(EDBA_51_2_3){
	getBuildingUsage() = "ReligiousFacility"
} 




Python Code 변환 예정



Modify
12
33198 건축법 시행령 제 51조 2 항 1호 라 목

라. 판매시설





Check(EDBA_51_2_4){

  getBuildingUsage()="CommercialFacility"

} 




Python Code 변환 예정



Modify
13
33199 건축법 시행령 제 51조 2 항 1호 마 목

마. 운수시설





//건축법 시행령 51조 (거실의 채광 등) 2항 5호
Check(EDBA_51_2_5){
	getBuildingUsage() = "TransportationFacility"
} 




Python Code 변환 예정



Modify
14
33200 건축법 시행령 제 51조 2 항 1호 바 목

바. 의료시설(요양병원 및 정신병원은 제외한다)





//건축법 시행령 51조 (거실의 채광 등) 2항 6호
Check(EDBA_51_2_6){
	getBuildingUsage() = "MedicalFacility"
} 




Python Code 변환 예정



Modify
15
33201 건축법 시행령 제 51조 2 항 1호 사 목

사. 교육연구시설 중 연구소





//건축법 시행령 51조 (거실의 채광 등) 2항 7호
Check(EDBA_51_2_7){
	getBuildingUsage() = "EducationAndResearchFacility.Laboratory"
} 




Python Code 변환 예정



Modify
16
33202 건축법 시행령 제 51조 2 항 1호 아 목

아. 노유자시설 중 아동 관련 시설, 노인복지시설(노인요양시설은 제외한다)





//건축법 시행령 51조 (거실의 채광 등) 2항 8호
Check(EDBA_51_2_8){
	getBuildingUsage() = "FacilitiesForTheAgedAndChildren.ChildrenRelatedFacilities"
	OR getBuildingUsage() = "FacilitiesForTheAgedAndChildren.WelfareFacilitiesForTheAged"
} 




Python Code 변환 예정



Modify
17
33203 건축법 시행령 제 51조 2 항 1호 자 목

자. 수련시설 중 유스호스텔





//건축법 시행령 51조 (거실의 채광 등) 2항 9호
Check(EDBA_51_2_9){
	getBuildingUsage() = "Trainingfacility.YouthHostels"
} 




Python Code 변환 예정



Modify
18
33204 건축법 시행령 제 51조 2 항 1호 차 목

차. 운동시설





//건축법 시행령 51조 (거실의 채광 등) 2항 10호
Check(EDBA_51_2_10){
	getBuildingUsage() = "SportsFacility"
} 




Python Code 변환 예정



Modify
19
33205 건축법 시행령 제 51조 2 항 1호 카 목

카. 업무시설





//건축법 시행령 51조 (거실의 채광 등) 2항 11호
Check(EDBA_51_2_11){
	getBuildingUsage() = "BusinessFacility"
} 




Python Code 변환 예정



Modify
20
33206 건축법 시행령 제 51조 2 항 1호 타 목

타. 숙박시설





//건축법 시행령 51조 (거실의 채광 등) 2항 12호
Check(EDBA_51_2_12){
	getBuildingUsage() = "LodgingFacility"
} 




Python Code 변환 예정



Modify
21
33207 건축법 시행령 제 51조 2 항 1호 파 목

파. 위락시설





//건축법 시행령 51조 (거실의 채광 등) 2항 13호
Check(EDBA_51_2_13){
	getBuildingUsage() = "AmusementFacility"
} 




Python Code 변환 예정



Modify
22
33208 건축법 시행령 제 51조 2 항 1호 하 목

하. 관광휴게시설





//건축법 시행령 51조 (거실의 채광 등) 2항 14호
Check(EDBA_51_2_14){
	getBuildingUsage() = "FacilityForTourismAndRelaxation"
} 




Python Code 변환 예정



Modify
23
33216 건축법 시행령 제 53조 1 항

① 법 제49조제3항에 따라 다음 각 호의 어느 하나에 해당하는 건축물의 경계벽은 국토교통부령으로 정하는 기준에 따라 설치하여야 한다. <개정 2010.8.17, 2013.3.23, 2014.3.24, 2014.11.28, 2015.9.22>





// 건축법 시행령 53조 (경계벽 등의 설치) 1항



check(EDBA_53_1){

	IF CS THEN KS

}



CS{

	getResult(EDBA_53_1_1) = TRUE

	OR getResult(EDBA_53_1_2) = TRUE

	OR getResult(EDBA_53_1_3) = TRUE

	OR getResult(EDBA_53_1_4) = TRUE

}



KS{

	getResult(REFB_19_1)=True	

        getResult(REFB_19_2)=True

} 




Python Code 변환 예정



Modify
24
33217 건축법 시행령 제 53조 1 항 1호

1. 단독주택 중 다가구주택의 각 가구 간 또는 공동주택(기숙사는 제외한다)의 각 세대 간 경계벽(제2조제14호 후단에 따라 거실·침실 등의 용도로 쓰지 아니하는 발코니 부분은 제외한다)





// 건축법 시행령 53조 (경계벽 등의 설치) 1항 1호



check(EDBA_53_1_1){

	KS

}




KS{



Zone myZone1{

Zone.Building.usage = “DetachedHouse.MultiFamilyHouse ”

}



Zone myZone2{

Zone.Building.usage = “MultiUnitHouse”

}



Balcony myBalcony{

Balcony.usage != “BedRoom”

Balcony.usage != “LivingRoom”

}



Wall myWall1{

isObjectProperty(Wall.isPartitionWall)=TRUE

hasObject(myZone1.Household, Wall) =TRUE

hasObject(myBalcony,Wall) =FALSE

}



Wall myWall1{

isObjectProperty(Wall.isPartitionWall)=TRUE

hasObject(myZone2.Household, Wall) =TRUE

hasObject(myBalcony,Wall) =FALSE

}





isExist(myWall1)=TRUE

isExist(myWall2)=TRUE



} 




Python Code 변환 예정



Modify
25
33221 건축법 시행령 제 53조 1 항 5호

5. 노유자시설 중 노인요양시설의 호실 간 경계벽





test 




Python Code 변환 예정



Modify
26
33230 건축법 시행령 제 61조 1 항 1호

1. 단독주택 중 다중주택·다가구주택





Check(EDBA_61_1_1){

IF CS THEN KS

}



Floor myfloor1 {  

isObjectProperty(ClassIINeighborhoodLivingFacility.PerformanceHall)=TRUE

OR isObjectProperty(ClassIINeighborhoodLivingFacility.ReligiousAssemblyFacility)=TRUE

OR isObjectProperty(ClassIINeighborhoodLivingFacility.ReligiousAssemblyFacility)=TRUE

AND getFloorArea()>=300

}



CS{

isExist(myfloor1)=TRUE

OR(getBuildingUsage()= "CulturalAndAssemblyFacility"

AND getBuildingUsage()!= "CulturalAndAssemblyFacility.WeddingHall")

OR getBuildingUsage()= "ReligiousFacility"

OR getBuildingUsage()= "CommercialFacility"

OR getBuildingUsage()= "TransportationFacility"

OR (getBuildingUsage()= "AmusementFacility"

OR (getBuildingUsage()!= "AmusementFacility.Pubs"

AND getBuildingUsage()!= "AmusementFacility.BarBusiness")

}





KS{

getFloorArea(Room)>=200m2

OR (isObjectProperty(MainStructuralPart.isFireResistantStructure)=TRUE

OR isObjectProperty(MainStructuralPart.Material.nonCombustibility)=TRUE

getFloorArea(Room)>=400m2

} 




Python Code 변환 예정



Modify
27
33232 건축법 시행령 제 61조 1 항 2호

2. 제2종 근린생활시설 중 공연장·종교집회장·인터넷컴퓨터게임시설제공업소·학원·독서실·당구장·다중생활시설의 용도로 쓰는 건축물





Check(EDBA_61_1_2){

IF CS THEN KS1 OR KS2}



Building myBuilding{

getBuildingUsage()="DetachedHouse.Multi-userHouses"

OR getBuildingUsage()="DetachedHouse.Multi-familyHouses" 

OR getBuildingUsage()="ClassIINeighborhoodLivingFacility.EducationalInstitute"

OR getBuildingUsage()="ClassIINeighborhoodLivingFacility.ReadingRooms

OR getBuildingUsage()="ClassIINeighborhoodLivingFacility.CommunalLivingFacility 

OR getBuildingUsage()="ClassIINeighborhoodLivingFacility.LodgingFacility"

OR getBuildingUsage()="ClassIINeighborhoodLivingFacility.MedicalFacility"

OR getBuildingUsage()="EducationAndResearchFacility.EducationalInstitute"

OR getBuildingUsage()="BusinessFacility.Oofficetels"

OR getBuildingUsage()="FuneralParlors"

}



MBU = getObjectUsage(myBuilding)



CS{

getBuildingUsage() = MBU



Floor myfloor{

Floor.number>=3

}



KS1{

(Floor.number>=3

AND getTotalfloorarea(Room)>=200m2)





KS2{isObjectProperty(MainStructuralPart.isFireResistantStructure)=TRUE

OR isObjectProperty(MainStructuralPart.Material.nonCombustibility)=TRUE

AND Floor.number>=3

getTotalfloorarea(Room)>=200m2

} 




Python Code 변환 예정



Modify
28
33241 건축법 시행령 제 61조 2 항

② 법 제52조제2항에서 "대통령령으로 정하는 건축물"이란 다음 각 호의 어느 하나에 해당하는 것을 말한다. <신설 2010.12.13, 2011.12.30, 2013.3.23, 2015.9.22>





//건축법 시행령 61조 (건축물의 마감재료) 2항



Check(EDBA_61_2){
     KS
}

KS{
   getResult(EDBA_61_2_1)=TRUE
   OR getResult(EDBA_61_2_2)=TRUE
} 




Python Code 변환 예정



Modify
29
33243 건축법 시행령 제 61조 2 항 1호 가 목

가. 제1종 근린생활시설, 제2종 근린생활시설, 문화 및 집회시설, 종교시설, 판매시설, 의료시설, 교육연구시설, 노유자시설, 운동시설 및 위락시설의 용도로 쓰는 건축물로서 그 용도로 쓰는 바닥면적의 합계가 2천제곱미터 이상인 건축물





//건축법 시행령 61조 (건축물의 마감재료) 2항 1호 가목

Check(EDBA_61_2_1_가){
            KS 
}



KS{
   Building myBuilding{
    getResult(SASP_2_1_1)=True
   }

  FloorSlab myFloorSlab{

     //   getFloorUsage()=myBuilding.usage
  }
  
   getObjectArea(myFloorSlab)>2000 m2

   
} 




Python Code 변환 예정



Modify
30
33245 건축법 시행령 제 61조 2 항 2호

2. 6층 이상 또는 높이 22미터 이상인 건축물





//  건축법 시행령 61조 (건축물의 마감재료) 2항 2호
Check(EDBA_61_2_2){
	KS
}

KS{
	getObjectProperty(Building.isHighriseBuilding) = TRUE
	OR getObjectProperty(Building.isQuasiHighriseBuilding) = TRUE
} 




Python Code 변환 예정



Modify
31
34203 건축법 시행령 제 53조 2 항

② 법 제49조제3항에 따라 다음 각 호의 어느 하나에 해당하는 건축물의 층간바닥(화장실의 바닥은 제외한다)은 국토교통부령으로 정하는 기준에 따라 설치하여야 한다. <신설 2014.11.28, 2016.8.11>





//건축법 시행령 53조 (경계벽 등의 설치) 2항 

Check(EDBA_53_2){
    IF CS THEN KS
}

CS{
   getResult(EDBA_53_2_1)=True
   OR getResult(EDBA_53_2_2)=True
   OR getResult(EDBA_53_2_3)=True
   OR getResult(EDBA_53_2_4)=True
   OR getResult(EDBA_53_2_5)=True
 }

KS{
    getResult(REFB_19_3)=True
} 




Python Code 변환 예정



Modify
32
34205 건축법 시행령 제 53조 2 항 2호

2. 공동주택(「주택법」 제15조에 따른 주택건설사업계획승인 대상은 제외한다)





//건축법 시행령 53조 (경계벽 등의 설치) 2항 2호

Check(EDBA_53_2_2){
   KS
}

KS{
   getBuildingUsage()="MultiUnitHouse"
   getResult(Unimplemented_HA_16)=False
}  




Python Code 변환 예정



Modify
33
34605 건축법 시행령 제 41조 1 항

①건축물의 대지 안에는 그 건축물 바깥쪽으로 통하는 주된 출구와 지상으로 통하는 피난계단 및 특별피난계단으로부터 도로 또는 공지(공원, 광장, 그 밖에 이와 비슷한 것으로서 피난 및 소화를 위하여 해당 대지의 출입에 지장이 없는 것을 말한다. 이하 이 조에서 같다)로 통하는 통로를 다음 각 호의 기준에 따라 설치하여야 한다. <개정 2010.12.13, 2015.9.22, 2016.5.17, 2017.2.3>





Check(EDBA_41_1){

    KS

}







KS{



   Door  myDoor {
getObjectProperty(Door.functionType) = "Main"
   }

   Stair myStair{
isAccessible(Stair, Ground) = TRUE
isObjectProperty(Stair.isEscape) = TRUE

       OR isObjectProperty(Stair.isSpecialEscape) = TRUE



   }

   Passage  myPassage{

       isGoThrough(myStair, Road, Passage)=True

       OR isGoThrough(myStair, OpenSpace, Passage )=True

   }



   isExist(myDoor)=True

   isExist(myPassage)=True

   getResult(EDBA_41_1_1)=True

   getResult(EDBA_41_1_2)=True

   getResult(EDBA_41_1_3)=True

} 








target_bldg_uses_01 = ['단독주택']
target_bldg_uses_02 = ['문화 및 집회시설', '장례시설', '의료시설', '위락시설']

target_bldg_uses_01_label = '건축물 용도1'
target_bldg_uses_02_label = '건축물 용도2'

def Check():
    for building in SELECT('building'):
        bldg_use = building.SELECT('building type').STRING()
        min_corridor_w = 1.5
        min_area = 0.0

        if bldg_use in target_bldg_uses_01:
            min_corridor_w = 0.9
        elif bldg_use in target_bldg_uses_02:
            min_corridor_w = 3.0
            min_area = 500

        if min_area > 0:
            area = 0
            for space in building.SELECT('space'):
                area += space.SELECT('area').UNIT('m2').NUMBER()
            if area < min_area:
                building.SUCCESS('바닥면적의 합: ' + str(area) + ' < ' + str(min_area))
                continue

        base_storey = None
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('prop', '기준 지상층').BOOL() == True:
                base_storey = storey
                break

        if base_storey is None:
            building.ERROR('기준 지상층이 존재하지 않습니다.')
            break

        stairs = base_storey.SELECT('direct stair')

        if stairs.COUNT() == 0:
            base_storey.ERROR(base_storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
            continue

        exDoors = []
        for door in base_storey.SELECT('door'):
            if door.SELECT('is external').BOOL() == True:
                exDoors.append(door)

        for stair in stairs:
            for route in stair.SELECT('escape route', exDoors):
                for space in route.SELECT('passing space'):
                    width = space.SELECT('min clear width').UNIT('m')
                    w = width.NUMBER()
                    if w < min_corridor_w:
                        width.ERROR('통로 너비: ' + str(w) + ' < ' + str(min_corridor_w))
                    else:
                        width.SUCCESS('통로 너비: ' + str(w) + ' >= ' + str(min_corridor_w)) 





Modify
34
34608 건축법 시행령 제 41조 1 항 1호 나 목

나. 바닥면적의 합계가 500제곱미터 이상인 문화 및 집회시설, 종교시설, 의료시설, 위락시설 또는 장례시설: 유효 너비 3미터 이상





Check(EDBA_41_1_2){

   IF (CS) THEN  KS END IF

}



CS{

FloorSlab.area> 500 m2 

   Building.usage="CulturalAndAssemblyFacility"

   OR Building.usage="ReligiousFacility" 

   OR  Building.usage="MedicalFacility" 

   OR Building.usage="AmusementFacility" 

   OR Building.usage="FuneralParlor"  

}



KS{

  Passage.effectiveWidth> 3m ;

} 








target_bldg_uses_01 = ['단독주택']
target_bldg_uses_02 = ['문화 및 집회시설', '장례시설', '의료시설', '위락시설']

target_bldg_uses_01_label = '건축물 용도1'
target_bldg_uses_02_label = '건축물 용도2'

def Check():
    for building in SELECT('building'):
        bldg_use = building.SELECT('building type').STRING()
        min_corridor_w = 1.5
        min_area = 0.0

        if bldg_use in target_bldg_uses_01:
            min_corridor_w = 0.9
        elif bldg_use in target_bldg_uses_02:
            min_corridor_w = 3.0
            min_area = 500

        if min_area > 0:
            area = 0
            for space in building.SELECT('space'):
                area += space.SELECT('area').UNIT('m2').NUMBER()
            if area < min_area:
                building.SUCCESS('바닥면적의 합: ' + str(area) + ' < ' + str(min_area))
                continue

        base_storey = None
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('prop', '기준 지상층').BOOL() == True:
                base_storey = storey
                break

        if base_storey is None:
            building.ERROR('기준 지상층이 존재하지 않습니다.')
            break

        stairs = base_storey.SELECT('direct stair')

        if stairs.COUNT() == 0:
            base_storey.ERROR(base_storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
            continue

        exDoors = []
        for door in base_storey.SELECT('door'):
            if door.SELECT('is external').BOOL() == True:
                exDoors.append(door)

        for stair in stairs:
            for route in stair.SELECT('escape route', exDoors):
                for space in route.SELECT('passing space'):
                    width = space.SELECT('min clear width').UNIT('m')
                    w = width.NUMBER()
                    if w < min_corridor_w:
                        width.ERROR('통로 너비: ' + str(w) + ' < ' + str(min_corridor_w))
                    else:
                        width.SUCCESS('통로 너비: ' + str(w) + ' >= ' + str(min_corridor_w)) 





Modify
35
34664 건축법 시행령 제 51조 2 항 1호 거 목

거. 장례시설





//건축법 시행령 51조 (거실의 채광 등) 2항 15호
Check(EDBA_51_2_15){
	getBuildingUsage() = "FuneralParlors"
}
 




Python Code 변환 예정



Modify
36
34679 건축법 시행령 제 61조 1 항

①법 제52조제1항에서 "대통령령으로 정하는 용도 및 규모의 건축물"이란 다음 각 호의 어느 하나에 해당하는 건축물을 말한다. 다만, 그 주요구조부가 내화구조 또는 불연재료로 되어 있고 그 거실의 바닥면적(스프링클러나 그 밖에 이와 비슷한 자동식 소화설비를 설치한 바닥면적을 뺀 면적으로 한다. 이하 이 조에서 같다) 200제곱미터 이내마다 방화구획이 되어 있는 건축물은 제외한다. <개정 2009.7.16, 2010.2.18, 2010.12.13, 2013.3.23, 2014.3.24, 2014.8.27, 2014.10.14, 2015.9.22, 2017.2.3>





//건축법 시행령 61조 (건축물의 마감재료) 1항

Check(EDBA_61_1){

   IF !CS THEN  KS

}



CS{

 (isObjectProperty(MainStructuralPart.isFireResistantStructure)=TRUE

 OR isObjectProperty(MainStructuralPart.Material.nonCombustibility)=TRUE)

 

 isFirePartition(Room.Floor, a, 200)=TRUE



 

}



KS{

    getResult(EDBA_61_1_1)=TRUE

    OR getResult(EDBA_61_1_2)=TRUE

    OR getResult(EDBA_61_1_3)=TRUE

    OR getResult(EDBA_61_1_4)=TRUE

    OR getResult(EDBA_61_1_5)=TRUE

    OR getResult(EDBA_61_1_6)=TRUE

    OR getResult(EDBA_61_1_7)=TRUE

} 




Python Code 변환 예정



Modify
37
34689 건축법 시행령 제 61조 1 항 6호

6. 문화 및 집회시설, 종교시설, 판매시설, 운수시설, 의료시설, 교육연구시설 중 학교(초등학교만 해당한다)·학원, 노유자시설, 수련시설, 업무시설 중 오피스텔, 숙박시설, 위락시설(단란주점 및 유흥주점은 제외한다), 장례시설, 「다중이용업소의 안전관리에 관한 특별법 시행령」 제2조에 따른 다중이용업(단란주점영업 및 유흥주점영업은 제외한다)의 용도로 쓰는 건축물





Check(EDBA_61_1_6){
KS}


KS{
(getBuildingUsage()="ClassIINeighborhoodLivingFacility.PerformanceHall"
OR getBuildingUsage()="ClassIINeighborhoodLivingFacility.BilliardRoom")
OR getBuildingUsage()="CulturalAndAssemblyFacility.WeddingHall"
OR getBuildingUsage()="EducationAndResearchFacility.ElementarySchool"
OR getBuildingUsage()="Trainingfacility"
OR (getBuildingUsage()="AmusementFacility.BarBusiness"
OR  getResult(ERSASP_2)= TRUE)
}
 




Python Code 변환 예정



Modify
38
35549 건축법 시행령 제 8조 3 항 4호

4. 숙박시설





//건축법 시행령 8조 (건축허가) 3항 4호

Check(EDBA_8_3_4){
     KS
}
KS{
	getBuildingUsage() = "LodgingFacility"
} 








def Check():
    typ = SELECT('typology').STRING().lower()
    if typ == "LodgingFacility":
        building.SUCCESS("Building Usage is LodgingFacility")
    else:
        building.ERROR("Building Usage is not LodgingFacility") 
 





Modify
39
35870 건축법 시행령 제 39조 1 항 7호

7. 교육연구시설 중 학교





// 건축법 시행령 39조 (건축물 바깥쪽으로의 출구 설치) 1항 7호

Check(EDBA_39_1_7){     
KS
}


KS {
Building myBuilding{
getBuildingUsage() = “Warehouse”
Building.grossFloorArea >= 5000 m2
}

isExist(myBuliding) = TRUE
}
 








target_bldg_type_1 = ['제2종 근린생활시설', '문화 및 집회시설', '종교시설', '판매시설', '업무시설', '창고시설', '교육연구시설', '장례시설', '승강기를 설치하여야하는 건축물']
target_bldg_sub_type_2 = ['판매시설']
max_route_length_stair_to_door = 30
max_route_length_space_to_door = 60
min_em_door_count = 2
min_em_door_h = 1.5
min_em_door_w = 0.75

target_bldg_types_1_label = '외부 출입구 방향 적용 대상 건출물 용도'
target_bldg_types_2_label = '외부 출입구 유효너비 대상 건출물 용도'

max_route_length_stair_to_door_label = '직통계단과 외부 출입구 간 최소거리'
max_route_length_space_to_door_label = '거실과 외부 출입구 간 최소거리'
min_em_door_count_label = '최소 비상구 개수'
min_em_door_h_label = '최소 비상구 높이'
min_em_door_w_label = '최소 비상구 유효너비'

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()
        if (bldg_type in target_bldg_type_1):
            if bldg_type == '제2종 근린생활시설' and sub_type in ['공연장', '종교집회장', '인터넷컴퓨터게임시설제공업소']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '문화 및 집회시설' and sub_type in ['전시장', '동물원', '식물원']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '업무시설' and sub_type == '청사':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '교육연구시설' and sub_type == '학교':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            message =  '검토 대상 건물입니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)

        else:
            message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)
            break



        evac_storey_exist = False
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('is evacuation storey').BOOL() == True:
                evac_storey_exist = True
                break

        if evac_storey_exist == False:
            ERROR('피난층이 존재하지 않습니다.')
            return

        for storey in stories:
            stairs = storey.SELECT('direct stair')

            if stairs.COUNT() == 0:
                storey.ERROR(storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
                continue

            exDoors = []
            for door in storey.SELECT('door'):
                if door.SELECT('is external').BOOL() == True:
                    exDoors.append(door)

            for stair in stairs:
                route_length = -1
                for route in stair.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_stair_to_door:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    stair.SUCCESS(stair.SELECT('name').STRING() + ' : ' + str(route_length))

            spaces = storey.SELECT('space')

            for space in spaces:
                route_length = -1
                for route in space.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_space_to_door:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    space.SUCCESS(space.SELECT('name').STRING() + ' : ' + str(route_length))

            if bldg_type in target_bldg_types_1:
                for door in exDoors:
                    if door.SELECT('is inward').BOOL():
                        door.ERROR('외부 출입구의 방향이 안여닫이입니다.')

                for space in spaces:
                    code = space.SELECT('class code').STRING()
                    if not code in theater_space_codes:
                        continue
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area < 300:
                        continue
                    emExits = []
                    for door in space.SELECT('space door'):
                        if door.SELECT('prop', '비상구').BOOL() or door.SELECT('prop', '보조출입구').BOOL():
                            emExits.append(door)
                    if len(emExits) < min_em_door_count:
                        space.ERROR('비상구(보조출입구) 개수:' + str(len(emExits)) + '(<' + str(min_em_door_count) + ')')
                        continue
                    em_exit_count = 0
                    for exit in emExits:
                        if exit.SELECT('clear opening').UNIT('m').NUMBER() >= min_em_door_w and exit.SELECT('height').UNIT('m').NUMBER() >= min_em_door_h:
                            em_exit_count += 1
                    if em_exit_count < min_em_door_count:
                        space.ERROR('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(<' + str(min_em_door_count) + ')')
                    else:
                        space.SUCCESS('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(>=' + str(min_em_door_count) + ')')

            if bldg_type in target_bldg_types_2:
                if storey.SELECT('is evacuation storey').BOOL() == False:
                    continue
                max_area = 0;
                for space in spaces:
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area > max_area:
                        max_area = area
                min_door_w = max_area / 100 * 0.6;

                for door in exDoors:
                    width = door.SELECT('clear opening').UNIT('m')
                    w = width.NUMBER()
                    if (w < min_door_w):
                        width.ERROR('출구 유효너비:' + str(w) + '(<' + str(min_door_w) + ')')
                    else:
                        width.SUCCESS('출구 유효너비:' + str(w) + '(>=' + str(min_door_w) + ')')
 





Modify
40
35895 건축법 시행령 제 46조 4 항 1호

1. 대피공간은 바깥의 공기와 접할 것





//건축법 시행령 46조 (방화구획의 설치) 4항 1호

check(EDBA_46_4_1){

KS

}



KS{
Space mySpace{
isObjectProperty(Space.isEscape) = TRUE
}
isConnectedToExternal(mySpace)=TRUE

} 




Python Code 변환 예정



Modify
41
35896 건축법 시행령 제 46조 4 항 2호

2. 대피공간은 실내의 다른 부분과 방화구획으로 구획될 것





//건축법 시행령 46조 (방화구획의 설치) 4항 2호

check(EDBA_46_4_2){

KS

}



KS{
Space mySpace{
isObjectProperty(Space.isEscape) = TRUE
}
isObjectProperty(mySpace.isFirePartition)=TRUE

} 




Python Code 변환 예정



Modify
42
36281 건축법 시행령 제 8조 3 항

③ 법 제11조제2항제2호에서 "위락시설과 숙박시설 등 대통령령으로 정하는 용도에 해당하는 건축물"이란 다음 각 호의 건축물을 말한다. <개정 2008.10.29>





//건축법 시행령 8조 (건축허가) 3항

Check(EDBA_8_3){
     KS
}

KS{
    getResult(EDBA_8_3_1)=True
    OR getResult(EDBA_8_3_2)=True
    OR getResult(EDBA_8_3_3)=True
    OR getResult(EDBA_8_3_4)=True
    OR getResult(EDBA_8_3_5)=True
   
} 




Python Code 변환 예정



Modify
43
36283 건축법 시행령 제 8조 3 항 2호

2. 제2종 근린생활시설(일반음식점만 해당한다)





//건축법 시행령 8조 (건축허가) 3항 2호

Check(EDBA_8_3_2){
     KS
}
KS{
	getBuildingUsage() = "ClassIINeighborhoodLivingFacility.Restaurant"
} 








def Check():
    typ = SELECT('typology').STRING().lower()
    if typ == "ClassIINeighborhoodLivingFacility.Restaurant":
        building.SUCCESS("Building Usage is Restaurant of ClassIINeighborhoodLivingFacility")
    else:
        building.ERROR("Building Usage is not Restaurant of ClassIINeighborhoodLivingFacility")  





Modify
44
36284 건축법 시행령 제 8조 3 항 3호

3. 업무시설(일반업무시설만 해당한다)





//건축법 시행령 8조 (건축허가) 3항 3호

Check(EDBA_8_3_3){
     KS
}
KS{
	getBuildingUsage() = "BusinessFacility.GeneralBusinessFacility"
} 








def Check():
    typ = SELECT('typology').STRING().lower()
    if typ == "BusinessFacility.GeneralBusinessFacility":
        building.SUCCESS("Building Usage is GeneralBusinessFacility of BusinessFacility")
    else:
        building.ERROR("Building Usage is not GeneralBusinessFacility of BusinessFacility")  





Modify
45
36574 건축법 시행령 제 34조 2 항 3호

3. 공동주택(층당 4세대 이하인 것은 제외한다) 또는 업무시설 중 오피스텔의 용도로 쓰는 층으로서 그 층의 해당 용도로 쓰는 거실의 바닥면적의 합계가 300제곱미터 이상인 것





//건축법 시행령 34조 (직통계단의 설치) 2항3호

Check(EDBA_34_2_3){



	Floor myFloor{

		 getFloorUsage()= “MultiUnitHouse”

		getObjectProperty(Floor.numberOfHousehold)>=4 



		OR getFloorUsage() = “BusinessFacility.Officetel”

	}	



				getTotalFloorArea(myFloor.Room)>=300 m2



} 




Python Code 변환 예정



Modify
46
36575 건축법 시행령 제 34조 2 항 4호

4. 제1호부터 제3호까지의 용도로 쓰지 아니하는 3층 이상의 층으로서 그 층 거실의 바닥면적의 합계가 400제곱미터 이상인 것





//건축법 시행령 34조 (직통계단의 설치) 2항4호
check(EDBA_34_2_4){

     IF getResult(EDBA_34_2_1)=FALSE
        OR getResult(EDBA_34_2_2)=FALSE
	OR getResult(EDBA_34_2_3)=FALSE
	   THEN getTotalFloorNumber(myFloor.Room)>=400 m2
     END IF
} 




Python Code 변환 예정



Modify
47
36576 건축법 시행령 제 34조 2 항 5호

5. 지하층으로서 그 층 거실의 바닥면적의 합계가 200제곱미터 이상인 것





//건축법 시행령 34조 (직통계단의 설치) 2항5호
check(EDBA_34_2_5){
	Floor myFloor {
		getFloorNumber()<0
	}
		
	getTotalFloorArea(myFloor.Room)>= 200 m2
}
 




Python Code 변환 예정



Modify
48
36578 건축법 시행령 제 35조 1 항

① 법 제49조제1항에 따라 5층 이상 또는 지하 2층 이하인 층에 설치하는 직통계단은 국토해양부령으로 정하는 기준에 따라 피난계단 또는 특별피난계단으로 설치하여야 한다. 다만, 건축물의 주요구조부가 내화구조 또는 불연재료로 되어 있는 경우로서 다음 각 호의 어느 하나에 해당하는 경우에는 그러하지 아니하다. <개정 2008.10.29>





//건축법 시행령 35조(피난계단의 설치) 1항
Check(EDBA_35_1){
	IF (!CS1 AND !CS2 AND CS3) THEN KS
}

CS1 {
     isFireProofStructure(MainStructuralPart) = TRUE
     OR isObjectProperty(MainStructuralPart.Material.nonCombustibility) = TRUE
}

CS2 {
     getResult(EDBA_35_1_1) = TRUE
     OR getResult(EDBA_35_1_2) = TRUE
}

CS3{
     Floor myFloor {
          Floor.number > 5
		OR Floor.number <= -2
	}

	Stair myStair {	
		isObjectProperty(Stair.isDirect) = TRUE
	}

	hasElement(myFloor, myStair) = TRUE
}

KS {
	isObjectProperty(myStair.isEscape) = TRUE
	OR isObjectProperty(myStair.isSpecialEscape) = TRUE
} 




Python Code 변환 예정



Modify
49
36579 건축법 시행령 제 35조 1 항 1호

1. 5층 이상인 층의 바닥면적의 합계가 200제곱미터 이하인 경우





//건축법 시행령 35조(피난계단의 설치) 1항1호

Check(EDBA_35_1_1){
	KS
}



KS { 
	Floor myFloor { 
	getObjectProperty(Floor.number) >= 5 
	} 

	getTotalFloorArea(myFloor) <= 200m2 

} 








min_floor_area = 200
min_floor_area_label = "Minimum total floor area"

def Check():
    num = 0
    for storey in SELECT('storey'):
        if num >= 5:
            area_sum = 0
            for space in storey.SELECT('space'):      
                area_sum += space.SELECT('area').UNIT('m2').NUMBER() 
            if area_sum >= min_floor_area:
                storey.SUCCESS("Total floor area:"+ str(area_sum)  + 'm2')
            else:
                storey.FAIL("Total floor area:"+ str(area_sum) + 'm2')
        num += 1 





Modify
50
36580 건축법 시행령 제 35조 1 항 2호

2. 5층 이상인 층의 바닥면적 200제곱미터 이내마다 방화구획이 되어 있는 경우





//건축법 시행령 35조(피난계단의 설치) 1항2호

Check(EDBA_35_1_2){

	KS

}



KS { 

	Floor myFloor { 

	 	Floor.number >= 5 

	} 



	isFirePartition(myFloor, a, 200) = TRUE 

} 




Python Code 변환 예정



Modify
51
36581 건축법 시행령 제 35조 2 항

② 건축물(갓복도식 공동주택은 제외한다)의 11층(공동주택의 경우에는 16층) 이상인 층(바닥면적이 400제곱미터 미만인 층은 제외한다) 또는 지하 3층 이하인 층(바닥면적이 400제곱미터미만인 층은 제외한다)으로부터 피난층 또는 지상으로 통하는 직통계단은 제1항에도 불구하고 특별피난계단으로 설치하여야 한다. <개정 2008.10.29>





//건축법 시행령 35조 (피난계단의 설치) 2항
check(EDBA_35_2){
	IF (CS1 AND CS2) THEN KS
}

CS1{
	Building.usage != "MultiUnitHouse.SideCorridorTypeMultiUnitHouse"
}

CS2{
	Floor myFloor{
 		IF (Building.usage = "MultiUnitHouse“) 
			THEN getFloorNumber(Floor) >= 16
     		ELSE 		
			getFloorNumber(Floor) >= 11
     		ENDIF

 		OR getFloorNumber(Floor) < -3
		getFloorArea(Floor) >= 400m2
	}

	Stair myStair {
		(isAccessible(Stair, Floor.isEscape) = TRUE
		 OR isAccessible(Stair, Ground) = TRUE)
                        isObjectProperty(Stair.isDirect) = TRUE
	}

	hasObject(myFloor, myStair) = TRUE
}

KS{
	isObjectProperty(myStair.isSpecialEscape) = TRUE
}
 




Python Code 변환 예정



Modify
52
36582 건축법 시행령 제 35조 3 항

③ 제1항에서 판매시설의 용도로 쓰는 층으로부터의 직통계단은 그 중 1개소 이상을 특별피난계단으로 설치하여야 한다. <개정 2008.10.29>





//건축법 시행령 35조 (피난계단의 설치) 3항
check(EDBA_35_3){
	IF (CS) THEN KS
CS{
	getResult(EDBA_35_1) = TRUE

	Floor myFloor {
		Floor.usage = “CommercialFacility”
	}

	Stair myStair{
		isObjectProperty(Stair.isDirect) = TRUE
	}

	isAccessible(myFloor, myStair) = TRUE
}

KS{
	isObjectProperty(one.myStair.isSpecialEscape) = TRUE
}
 




Python Code 변환 예정



Modify
53
36586 건축법 시행령 제 36조

제36조 (옥외 피난계단의 설치) 건축물의 3층 이상인 층(피난층은 제외한다)으로서 다음 각 호의 어느 하나에 해당하는 용도로 쓰는 층에는 제34조에 따른 직통계단 외에 그 층으로부터 지상으로 통하는 옥외피난계단을 따로 설치하여야 한다.





//건축법 시행령 36조 (옥외 피난계단의 설치)

Check(EDBA_36){
    IF CS THEN KS
}

CS{
   getBuildingStoriesCount()>=3
   getResult(EDBA_36_0_1)=True
   OR getResult(EDBA_36_0_2)=True
}

KS{
   Stair myStair1{
       isObjectProperty(Stair.isDirect)=True
   }
   
   Stair myStair2{
       isObjectProperty(Stair.isEscape)=True
       isAccessible(Stair, Ground)=True
   }
  
   isExist(myStair1)=True
   isExist(myStair2)=True
} 




Python Code 변환 예정



Modify
54
36587 건축법 시행령 제 37조

제37조 (지하층과 피난층 사이의 개방공간 설치) 바닥면적의 합계가 3천 제곱미터 이상인 공연장·집회장·관람장 또는 전시장을 지하층에 설치하는 경우에는 각 실에 있는 자가 지하층 각 층에서 건축물 밖으로 피난하여 옥외 계단 또는 경사로 등을 이용하여 피난층으로 대피할 수 있도록 천장이 개방된 외부 공간을 설치하여야 한다.





Check(EDBA_37){

  IF (CS) THEN KS END IF

  Space mySpace{

        Space.Floor.area > 3000 M2;

        Space.usage="PerformanceHall"

        OR Space.usage="AssemblyHall"

        OR Space.usage="Auditorium"

        OR Space.usage="ExhibitionHall"

  }

}



CS{

    

    mySpace.Floor.number< 0 

    

}



KS{

Stair myStair{
Stair.isOutdoor = TRUE
}
Floor myFloor{
Floor.isEscape = TRUE
}
Space mySpace{
hasObject(Space, Ceiling) != TRUE
}
     (isGoThrough(mySpace, myStair, myFloor)=True

     OR isGoThrough(mySpace, Ramp, myFloor)=True)

     AND isExternal(mySpace)=True

    

} 








std_area = 3000
std_area_label = '기준 바닥면적 합계'

def Check():
    for building in SELECT('building'):
        bldg_use = building.SELECT('building type').STRING()
        sub_use = building.SELECT('prop', '세부용도').STRING()
        if not (bldg_use == '문화 및 집회시설' and sub_use in ['공연장', '집회장', '관람장', '전시장']):
            continue

        base_storey_exist = False
        under_stories = []

        for storey in building.SELECT('storey'):
            if storey.SELECT('prop', '기준 지상층').BOOL():
                base_storey_exist = True
                break
            under_stories.append(storey)

        if base_storey_exist == False:
            building.ERROR('지상층이 존재하지 않습니다.')
            continue

        if len(under_stories) == 0:
            continue

        area_sum = 0.0
        ex_spaces = []

        for storey in under_stories:
            for space in storey.SELECT('space'):
                area_sum += space.SELECT('area').UNIT('m2').NUMBER()
                if space.SELECT('is external').BOOL():
                    ex_spaces.append(space)

        if area_sum < std_area:
            building.SUCCESS('지하공간 바닥면적 합: ' + str(area_sum) + ' < ' + str(std_area))
            continue

        if len(ex_spaces) == 0:
            building.ERROR('지하에 천장이 개방된 외부 공간이 없습니다.')
            continue

        for space in ex_spaces:
            for stair in space.SELECT('stair'):
                if stair.SELECT('is direct').BOOL():
                    space.SUCCESS('피난층으로 대피할 수 있는 외부 공간이 존재합니다.')
                    return

        ex_spaces[0].ERROR('피난층으로 대피할 수 없습니다.') 





Modify
55
36588 건축법 시행령 제 38조

제38조 (관람석 등으로부터의 출구 설치) 법 제49조제1항에 따라 다음 각 호의 어느 하나에 해당하는 건축물에는 국토해양부령으로 정하는 기준에 따라 관람석 또는 집회실로부터의 출구를 설치하여야 한다.





//건축법 시행령 38조(관람석 등으로부터의 출구 설치)

Check(EDBA_38){

  IF (CS) THEN  KS ENDIF

}



CS{

    getResult(EDBA_38_0_1) = TRUE

    OR getResult(EDBA_38_0_2) = TRUE

    OR getResult(EDBA_38_0_3) = TRUE

    OR getResult(EDBA_38_0_4) = TRUE

    OR getResult(EDBA_38_0_5) = TRUE

}



KS {

    Space mySpace = getSpace("Auditorium")+getSpace("AssemblyHall")



    Door myExit {

        isObjectProperty(Door.isEntrance) = TRUE

        isAccessible(mySpace, Door) = TRUE

        getResult(REFB_10_1) = TRUE

    }



    hasElement(mySpace, myExit)=TRUE 

} 








identified_space_codes =['33703', '33708']
min_area = 300
min_door_width = 1.5
min_door_count = 2
identified_space_codes_label ='해당 공간 명칭'
min_area_label = '바닥면적이 다음 미만일 경우 제외(m2)'
min_door_width_label = '출구 유효너비'
min_door_count_label = '유효너비 이상 최소 출구 개수'

def Check():
    for space in SELECT('space'):
        name = space.SELECT('name').STRING()
        code = space.SELECT('class code').STRING()

        if not code in identified_space_codes:
            continue
                
        area = space.SELECT('area').UNIT('m2').NUMBER()
        if area >= min_area:
            exitCnt = 0
            door_width_sum = 0
            inward_exist = False

            for door in space.SELECT('space door'):
                if door.SELECT('is inward', space).BOOL() == False:
                    door_width = door.SELECT('width').UNIT('m2').NUMBER()
                    if door_width >= min_door_width:
                        exitCnt += 1
                        door_width_sum += door_width
                else:
                    door.ERROR('안여닫이 출구')
                    inward_exist = True
                    
            if inward_exist == True:
                continue

            if exitCnt >= min_door_count:
                if door_width_sum >= (area / 100) * 0.6:
                    space.SUCCESS(name)
                else:
                    space.ERROR(name + ', 출구유효너비 합: ' + str(door_width_sum) + 'm, 바닥면적: ' + str(area) + 'm2')
            else:
                space.ERROR(name + ', 출구 수 : ' + str(exitCnt) + '( < ' + str(min_door_count) + ')')
        else:
            space.SUCCESS('바닥면적:' + str(area) + '㎡ ( < ' + str(min_area) + '㎡)') 





Modify
56
36590 건축법 시행령 제 39조 1 항

① 법 제49조제1항에 따라 다음 각 호의 어느 하나에 해당하는 건축물에는 국토해양부령으로 정하는 기준에 따라 그 건축물로부터 바깥쪽으로 나가는 출구를 설치하여야 한다.





// 건축법 시행령 39조 (건축물 바깥쪽으로의 출구 설치) 1항 

Check(EDBA_39_1){     
IF  CS THEN KS
}

CS {
getResult(EDBA_39_1_1) = TRUE
OR getResult(EDBA_39_1_2) = TRUE
OR getResult(EDBA_39_1_3) = TRUE
OR getResult(EDBA_39_1_4) = TRUE
OR getResult(EDBA_39_1_5) = TRUE
OR getResult(EDBA_39_1_6) = TRUE
OR getResult(EDBA_39_1_7) = TRUE
OR getResult(EDBA_39_1_8) = TRUE
OR getResult(EDBA_39_1_9) = TRUE
OR getResult(EDBA_39_1_10) = TRUE
}

KS {
Door myDoor{
 isObjectProperty(Door.isEntrance)=TRUE
}

isExist(myDoor)=TRUE

getResult(REFB_11_1)=TRUE
getResult(REFB_11_2)=TRUE
getResult(REFB_11_3)=TRUE
getResult(REFB_11_4)=TRUE
getResult(REFB_11_5)=TRUE
getResult(REFB_11_6)=TRUE

}

 








target_bldg_type_1 = ['제2종 근린생활시설', '문화 및 집회시설', '종교시설', '판매시설', '업무시설', '창고시설', '교육연구시설', '장례시설', '승강기를 설치하여야하는 건축물']
target_bldg_sub_type_2 = ['판매시설']
max_route_length_stair_to_door = 30
max_route_length_space_to_door = 60
min_em_door_count = 2
min_em_door_h = 1.5
min_em_door_w = 0.75

target_bldg_types_1_label = '외부 출입구 방향 적용 대상 건출물 용도'
target_bldg_types_2_label = '외부 출입구 유효너비 대상 건출물 용도'

max_route_length_stair_to_door_label = '직통계단과 외부 출입구 간 최소거리'
max_route_length_space_to_door_label = '거실과 외부 출입구 간 최소거리'
min_em_door_count_label = '최소 비상구 개수'
min_em_door_h_label = '최소 비상구 높이'
min_em_door_w_label = '최소 비상구 유효너비'

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()
        if (bldg_type in target_bldg_type_1):
            if bldg_type == '제2종 근린생활시설' and sub_type in ['공연장', '종교집회장', '인터넷컴퓨터게임시설제공업소']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '문화 및 집회시설' and sub_type in ['전시장', '동물원', '식물원']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '업무시설' and sub_type == '청사':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '교육연구시설' and sub_type == '학교':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            message =  '검토 대상 건물입니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)

        else:
            message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)
            break



        evac_storey_exist = False
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('is evacuation storey').BOOL() == True:
                evac_storey_exist = True
                break

        if evac_storey_exist == False:
            ERROR('피난층이 존재하지 않습니다.')
            return

        for storey in stories:
            stairs = storey.SELECT('direct stair')

            if stairs.COUNT() == 0:
                storey.ERROR(storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
                continue

            exDoors = []
            for door in storey.SELECT('door'):
                if door.SELECT('is external').BOOL() == True:
                    exDoors.append(door)

            for stair in stairs:
                route_length = -1
                for route in stair.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_stair_to_door:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    stair.SUCCESS(stair.SELECT('name').STRING() + ' : ' + str(route_length))

            spaces = storey.SELECT('space')

            for space in spaces:
                route_length = -1
                for route in space.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_space_to_door:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    space.SUCCESS(space.SELECT('name').STRING() + ' : ' + str(route_length))

            if bldg_type in target_bldg_types_1:
                for door in exDoors:
                    if door.SELECT('is inward').BOOL():
                        door.ERROR('외부 출입구의 방향이 안여닫이입니다.')

                for space in spaces:
                    code = space.SELECT('class code').STRING()
                    if not code in theater_space_codes:
                        continue
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area < 300:
                        continue
                    emExits = []
                    for door in space.SELECT('space door'):
                        if door.SELECT('prop', '비상구').BOOL() or door.SELECT('prop', '보조출입구').BOOL():
                            emExits.append(door)
                    if len(emExits) < min_em_door_count:
                        space.ERROR('비상구(보조출입구) 개수:' + str(len(emExits)) + '(<' + str(min_em_door_count) + ')')
                        continue
                    em_exit_count = 0
                    for exit in emExits:
                        if exit.SELECT('clear opening').UNIT('m').NUMBER() >= min_em_door_w and exit.SELECT('height').UNIT('m').NUMBER() >= min_em_door_h:
                            em_exit_count += 1
                    if em_exit_count < min_em_door_count:
                        space.ERROR('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(<' + str(min_em_door_count) + ')')
                    else:
                        space.SUCCESS('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(>=' + str(min_em_door_count) + ')')

            if bldg_type in target_bldg_types_2:
                if storey.SELECT('is evacuation storey').BOOL() == False:
                    continue
                max_area = 0;
                for space in spaces:
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area > max_area:
                        max_area = area
                min_door_w = max_area / 100 * 0.6;

                for door in exDoors:
                    width = door.SELECT('clear opening').UNIT('m')
                    w = width.NUMBER()
                    if (w < min_door_w):
                        width.ERROR('출구 유효너비:' + str(w) + '(<' + str(min_door_w) + ')')
                    else:
                        width.SUCCESS('출구 유효너비:' + str(w) + '(>=' + str(min_door_w) + ')')
 





Modify
57
36591 건축법 시행령 제 39조 1 항 1호

1. 문화 및 집회시설(전시장 및 동·식물원은 제외한다)





// 건축법 시행령 39조 (건축물 바깥쪽으로의 출구 설치) 1항 1호

Check(EDBA_39_1_1){     
KS}

KS {

Building myBuilding{
getBuildingUsage() = “PerformanceHall”
OR getBuildingUsage() = “ReligiousAssemblyFacility ”
OR getBuildingUsage() = “FacilityForProvidingInternetComputerGameService”
}

Space mySpace{
Space.usage = “PerformanceHall”
OR Space.usage = “ReligiousAssemblyFacility ”
OR Space.usage = “FacilityForProvidingInternetComputerGameService”
}

IF isExist(myBuilding) THEN mySpace.FloorSlab.area >= 300 m2

}
 








target_bldg_type_1 = ['제2종 근린생활시설', '문화 및 집회시설', '종교시설', '판매시설', '업무시설', '창고시설', '교육연구시설', '장례시설', '승강기를 설치하여야하는 건축물']
target_bldg_sub_type_2 = ['판매시설']
max_route_length_stair_to_door = 30
max_route_length_space_to_door = 60
min_em_door_count = 2
min_em_door_h = 1.5
min_em_door_w = 0.75

target_bldg_types_1_label = '외부 출입구 방향 적용 대상 건출물 용도'
target_bldg_types_2_label = '외부 출입구 유효너비 대상 건출물 용도'

max_route_length_stair_to_door_label = '직통계단과 외부 출입구 간 최소거리'
max_route_length_space_to_door_label = '거실과 외부 출입구 간 최소거리'
min_em_door_count_label = '최소 비상구 개수'
min_em_door_h_label = '최소 비상구 높이'
min_em_door_w_label = '최소 비상구 유효너비'

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()
        if (bldg_type in target_bldg_type_1):
            if bldg_type == '제2종 근린생활시설' and sub_type in ['공연장', '종교집회장', '인터넷컴퓨터게임시설제공업소']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '문화 및 집회시설' and sub_type in ['전시장', '동물원', '식물원']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '업무시설' and sub_type == '청사':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '교육연구시설' and sub_type == '학교':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            message =  '검토 대상 건물입니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)

        else:
            message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)
            break



        evac_storey_exist = False
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('is evacuation storey').BOOL() == True:
                evac_storey_exist = True
                break

        if evac_storey_exist == False:
            ERROR('피난층이 존재하지 않습니다.')
            return

        for storey in stories:
            stairs = storey.SELECT('direct stair')

            if stairs.COUNT() == 0:
                storey.ERROR(storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
                continue

            exDoors = []
            for door in storey.SELECT('door'):
                if door.SELECT('is external').BOOL() == True:
                    exDoors.append(door)

            for stair in stairs:
                route_length = -1
                for route in stair.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_stair_to_door:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    stair.SUCCESS(stair.SELECT('name').STRING() + ' : ' + str(route_length))

            spaces = storey.SELECT('space')

            for space in spaces:
                route_length = -1
                for route in space.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_space_to_door:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    space.SUCCESS(space.SELECT('name').STRING() + ' : ' + str(route_length))

            if bldg_type in target_bldg_types_1:
                for door in exDoors:
                    if door.SELECT('is inward').BOOL():
                        door.ERROR('외부 출입구의 방향이 안여닫이입니다.')

                for space in spaces:
                    code = space.SELECT('class code').STRING()
                    if not code in theater_space_codes:
                        continue
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area < 300:
                        continue
                    emExits = []
                    for door in space.SELECT('space door'):
                        if door.SELECT('prop', '비상구').BOOL() or door.SELECT('prop', '보조출입구').BOOL():
                            emExits.append(door)
                    if len(emExits) < min_em_door_count:
                        space.ERROR('비상구(보조출입구) 개수:' + str(len(emExits)) + '(<' + str(min_em_door_count) + ')')
                        continue
                    em_exit_count = 0
                    for exit in emExits:
                        if exit.SELECT('clear opening').UNIT('m').NUMBER() >= min_em_door_w and exit.SELECT('height').UNIT('m').NUMBER() >= min_em_door_h:
                            em_exit_count += 1
                    if em_exit_count < min_em_door_count:
                        space.ERROR('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(<' + str(min_em_door_count) + ')')
                    else:
                        space.SUCCESS('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(>=' + str(min_em_door_count) + ')')

            if bldg_type in target_bldg_types_2:
                if storey.SELECT('is evacuation storey').BOOL() == False:
                    continue
                max_area = 0;
                for space in spaces:
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area > max_area:
                        max_area = area
                min_door_w = max_area / 100 * 0.6;

                for door in exDoors:
                    width = door.SELECT('clear opening').UNIT('m')
                    w = width.NUMBER()
                    if (w < min_door_w):
                        width.ERROR('출구 유효너비:' + str(w) + '(<' + str(min_door_w) + ')')
                    else:
                        width.SUCCESS('출구 유효너비:' + str(w) + '(>=' + str(min_door_w) + ')')
 





Modify
58
36592 건축법 시행령 제 39조 1 항 2호

2. 종교시설





// 건축법 시행령 39조 (건축물 바깥쪽으로의 출구 설치) 1항 2호

Check(EDBA_39_1_2){     
KS
}

KS {

Building myBuilding{
getBuildingUsage() = “CulturalAndAssemblyFacility”
getBuildingUsage() != “ExhibitionHall”
getBuildingUsage() != “ZoologicalAndBotanicalGarden”
}

isExist(myBuliding) = TRUE

}
 








target_bldg_type_1 = ['제2종 근린생활시설', '문화 및 집회시설', '종교시설', '판매시설', '업무시설', '창고시설', '교육연구시설', '장례시설', '승강기를 설치하여야하는 건축물']
target_bldg_sub_type_2 = ['판매시설']
max_route_length_stair_to_door = 30
max_route_length_space_to_door = 60
min_em_door_count = 2
min_em_door_h = 1.5
min_em_door_w = 0.75

target_bldg_types_1_label = '외부 출입구 방향 적용 대상 건출물 용도'
target_bldg_types_2_label = '외부 출입구 유효너비 대상 건출물 용도'

max_route_length_stair_to_door_label = '직통계단과 외부 출입구 간 최소거리'
max_route_length_space_to_door_label = '거실과 외부 출입구 간 최소거리'
min_em_door_count_label = '최소 비상구 개수'
min_em_door_h_label = '최소 비상구 높이'
min_em_door_w_label = '최소 비상구 유효너비'

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()
        if (bldg_type in target_bldg_type_1):
            if bldg_type == '제2종 근린생활시설' and sub_type in ['공연장', '종교집회장', '인터넷컴퓨터게임시설제공업소']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '문화 및 집회시설' and sub_type in ['전시장', '동물원', '식물원']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '업무시설' and sub_type == '청사':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '교육연구시설' and sub_type == '학교':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            message =  '검토 대상 건물입니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)

        else:
            message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)
            break



        evac_storey_exist = False
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('is evacuation storey').BOOL() == True:
                evac_storey_exist = True
                break

        if evac_storey_exist == False:
            ERROR('피난층이 존재하지 않습니다.')
            return

        for storey in stories:
            stairs = storey.SELECT('direct stair')

            if stairs.COUNT() == 0:
                storey.ERROR(storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
                continue

            exDoors = []
            for door in storey.SELECT('door'):
                if door.SELECT('is external').BOOL() == True:
                    exDoors.append(door)

            for stair in stairs:
                route_length = -1
                for route in stair.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_stair_to_door:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    stair.SUCCESS(stair.SELECT('name').STRING() + ' : ' + str(route_length))

            spaces = storey.SELECT('space')

            for space in spaces:
                route_length = -1
                for route in space.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_space_to_door:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    space.SUCCESS(space.SELECT('name').STRING() + ' : ' + str(route_length))

            if bldg_type in target_bldg_types_1:
                for door in exDoors:
                    if door.SELECT('is inward').BOOL():
                        door.ERROR('외부 출입구의 방향이 안여닫이입니다.')

                for space in spaces:
                    code = space.SELECT('class code').STRING()
                    if not code in theater_space_codes:
                        continue
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area < 300:
                        continue
                    emExits = []
                    for door in space.SELECT('space door'):
                        if door.SELECT('prop', '비상구').BOOL() or door.SELECT('prop', '보조출입구').BOOL():
                            emExits.append(door)
                    if len(emExits) < min_em_door_count:
                        space.ERROR('비상구(보조출입구) 개수:' + str(len(emExits)) + '(<' + str(min_em_door_count) + ')')
                        continue
                    em_exit_count = 0
                    for exit in emExits:
                        if exit.SELECT('clear opening').UNIT('m').NUMBER() >= min_em_door_w and exit.SELECT('height').UNIT('m').NUMBER() >= min_em_door_h:
                            em_exit_count += 1
                    if em_exit_count < min_em_door_count:
                        space.ERROR('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(<' + str(min_em_door_count) + ')')
                    else:
                        space.SUCCESS('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(>=' + str(min_em_door_count) + ')')

            if bldg_type in target_bldg_types_2:
                if storey.SELECT('is evacuation storey').BOOL() == False:
                    continue
                max_area = 0;
                for space in spaces:
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area > max_area:
                        max_area = area
                min_door_w = max_area / 100 * 0.6;

                for door in exDoors:
                    width = door.SELECT('clear opening').UNIT('m')
                    w = width.NUMBER()
                    if (w < min_door_w):
                        width.ERROR('출구 유효너비:' + str(w) + '(<' + str(min_door_w) + ')')
                    else:
                        width.SUCCESS('출구 유효너비:' + str(w) + '(>=' + str(min_door_w) + ')')
 





Modify
59
36593 건축법 시행령 제 39조 1 항 3호

3. 판매시설





// 건축법 시행령 39조 (건축물 바깥쪽으로의 출구 설치) 1항 3호

Check(EDBA_39_1_3){     
KS
}

KS {
Building myBuilding{
getBuildingUsage() = “ReligiousFacility”
}

isExist(myBuliding) = TRUE
}
 








target_bldg_type_1 = ['제2종 근린생활시설', '문화 및 집회시설', '종교시설', '판매시설', '업무시설', '창고시설', '교육연구시설', '장례시설', '승강기를 설치하여야하는 건축물']
target_bldg_sub_type_2 = ['판매시설']
max_route_length_stair_to_door = 30
max_route_length_space_to_door = 60
min_em_door_count = 2
min_em_door_h = 1.5
min_em_door_w = 0.75

target_bldg_types_1_label = '외부 출입구 방향 적용 대상 건출물 용도'
target_bldg_types_2_label = '외부 출입구 유효너비 대상 건출물 용도'

max_route_length_stair_to_door_label = '직통계단과 외부 출입구 간 최소거리'
max_route_length_space_to_door_label = '거실과 외부 출입구 간 최소거리'
min_em_door_count_label = '최소 비상구 개수'
min_em_door_h_label = '최소 비상구 높이'
min_em_door_w_label = '최소 비상구 유효너비'

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()
        if (bldg_type in target_bldg_type_1):
            if bldg_type == '제2종 근린생활시설' and sub_type in ['공연장', '종교집회장', '인터넷컴퓨터게임시설제공업소']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '문화 및 집회시설' and sub_type in ['전시장', '동물원', '식물원']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '업무시설' and sub_type == '청사':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '교육연구시설' and sub_type == '학교':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            message =  '검토 대상 건물입니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)

        else:
            message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)
            break



        evac_storey_exist = False
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('is evacuation storey').BOOL() == True:
                evac_storey_exist = True
                break

        if evac_storey_exist == False:
            ERROR('피난층이 존재하지 않습니다.')
            return

        for storey in stories:
            stairs = storey.SELECT('direct stair')

            if stairs.COUNT() == 0:
                storey.ERROR(storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
                continue

            exDoors = []
            for door in storey.SELECT('door'):
                if door.SELECT('is external').BOOL() == True:
                    exDoors.append(door)

            for stair in stairs:
                route_length = -1
                for route in stair.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_stair_to_door:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    stair.SUCCESS(stair.SELECT('name').STRING() + ' : ' + str(route_length))

            spaces = storey.SELECT('space')

            for space in spaces:
                route_length = -1
                for route in space.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_space_to_door:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    space.SUCCESS(space.SELECT('name').STRING() + ' : ' + str(route_length))

            if bldg_type in target_bldg_types_1:
                for door in exDoors:
                    if door.SELECT('is inward').BOOL():
                        door.ERROR('외부 출입구의 방향이 안여닫이입니다.')

                for space in spaces:
                    code = space.SELECT('class code').STRING()
                    if not code in theater_space_codes:
                        continue
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area < 300:
                        continue
                    emExits = []
                    for door in space.SELECT('space door'):
                        if door.SELECT('prop', '비상구').BOOL() or door.SELECT('prop', '보조출입구').BOOL():
                            emExits.append(door)
                    if len(emExits) < min_em_door_count:
                        space.ERROR('비상구(보조출입구) 개수:' + str(len(emExits)) + '(<' + str(min_em_door_count) + ')')
                        continue
                    em_exit_count = 0
                    for exit in emExits:
                        if exit.SELECT('clear opening').UNIT('m').NUMBER() >= min_em_door_w and exit.SELECT('height').UNIT('m').NUMBER() >= min_em_door_h:
                            em_exit_count += 1
                    if em_exit_count < min_em_door_count:
                        space.ERROR('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(<' + str(min_em_door_count) + ')')
                    else:
                        space.SUCCESS('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(>=' + str(min_em_door_count) + ')')

            if bldg_type in target_bldg_types_2:
                if storey.SELECT('is evacuation storey').BOOL() == False:
                    continue
                max_area = 0;
                for space in spaces:
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area > max_area:
                        max_area = area
                min_door_w = max_area / 100 * 0.6;

                for door in exDoors:
                    width = door.SELECT('clear opening').UNIT('m')
                    w = width.NUMBER()
                    if (w < min_door_w):
                        width.ERROR('출구 유효너비:' + str(w) + '(<' + str(min_door_w) + ')')
                    else:
                        width.SUCCESS('출구 유효너비:' + str(w) + '(>=' + str(min_door_w) + ')')
 





Modify
60
36594 건축법 시행령 제 39조 1 항 4호

4. 업무시설 중 국가 또는 지방자치단체의 청사





// 건축법 시행령 39조 (건축물 바깥쪽으로의 출구 설치) 1항 4호

Check(EDBA_39_1_4){     
KS
}

KS {
Building myBuilding{
getBuildingUsage() = “CommercialFacility”
}

isExist(myBuliding) = TRUE
}
 








target_bldg_type_1 = ['제2종 근린생활시설', '문화 및 집회시설', '종교시설', '판매시설', '업무시설', '창고시설', '교육연구시설', '장례시설', '승강기를 설치하여야하는 건축물']
target_bldg_sub_type_2 = ['판매시설']
max_route_length_stair_to_door = 30
max_route_length_space_to_door = 60
min_em_door_count = 2
min_em_door_h = 1.5
min_em_door_w = 0.75

target_bldg_types_1_label = '외부 출입구 방향 적용 대상 건출물 용도'
target_bldg_types_2_label = '외부 출입구 유효너비 대상 건출물 용도'

max_route_length_stair_to_door_label = '직통계단과 외부 출입구 간 최소거리'
max_route_length_space_to_door_label = '거실과 외부 출입구 간 최소거리'
min_em_door_count_label = '최소 비상구 개수'
min_em_door_h_label = '최소 비상구 높이'
min_em_door_w_label = '최소 비상구 유효너비'

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()
        if (bldg_type in target_bldg_type_1):
            if bldg_type == '제2종 근린생활시설' and sub_type in ['공연장', '종교집회장', '인터넷컴퓨터게임시설제공업소']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '문화 및 집회시설' and sub_type in ['전시장', '동물원', '식물원']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '업무시설' and sub_type == '청사':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '교육연구시설' and sub_type == '학교':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            message =  '검토 대상 건물입니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)

        else:
            message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)
            break



        evac_storey_exist = False
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('is evacuation storey').BOOL() == True:
                evac_storey_exist = True
                break

        if evac_storey_exist == False:
            ERROR('피난층이 존재하지 않습니다.')
            return

        for storey in stories:
            stairs = storey.SELECT('direct stair')

            if stairs.COUNT() == 0:
                storey.ERROR(storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
                continue

            exDoors = []
            for door in storey.SELECT('door'):
                if door.SELECT('is external').BOOL() == True:
                    exDoors.append(door)

            for stair in stairs:
                route_length = -1
                for route in stair.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_stair_to_door:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    stair.SUCCESS(stair.SELECT('name').STRING() + ' : ' + str(route_length))

            spaces = storey.SELECT('space')

            for space in spaces:
                route_length = -1
                for route in space.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_space_to_door:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    space.SUCCESS(space.SELECT('name').STRING() + ' : ' + str(route_length))

            if bldg_type in target_bldg_types_1:
                for door in exDoors:
                    if door.SELECT('is inward').BOOL():
                        door.ERROR('외부 출입구의 방향이 안여닫이입니다.')

                for space in spaces:
                    code = space.SELECT('class code').STRING()
                    if not code in theater_space_codes:
                        continue
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area < 300:
                        continue
                    emExits = []
                    for door in space.SELECT('space door'):
                        if door.SELECT('prop', '비상구').BOOL() or door.SELECT('prop', '보조출입구').BOOL():
                            emExits.append(door)
                    if len(emExits) < min_em_door_count:
                        space.ERROR('비상구(보조출입구) 개수:' + str(len(emExits)) + '(<' + str(min_em_door_count) + ')')
                        continue
                    em_exit_count = 0
                    for exit in emExits:
                        if exit.SELECT('clear opening').UNIT('m').NUMBER() >= min_em_door_w and exit.SELECT('height').UNIT('m').NUMBER() >= min_em_door_h:
                            em_exit_count += 1
                    if em_exit_count < min_em_door_count:
                        space.ERROR('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(<' + str(min_em_door_count) + ')')
                    else:
                        space.SUCCESS('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(>=' + str(min_em_door_count) + ')')

            if bldg_type in target_bldg_types_2:
                if storey.SELECT('is evacuation storey').BOOL() == False:
                    continue
                max_area = 0;
                for space in spaces:
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area > max_area:
                        max_area = area
                min_door_w = max_area / 100 * 0.6;

                for door in exDoors:
                    width = door.SELECT('clear opening').UNIT('m')
                    w = width.NUMBER()
                    if (w < min_door_w):
                        width.ERROR('출구 유효너비:' + str(w) + '(<' + str(min_door_w) + ')')
                    else:
                        width.SUCCESS('출구 유효너비:' + str(w) + '(>=' + str(min_door_w) + ')')
 





Modify
61
36596 건축법 시행령 제 39조 1 항 6호

6. 연면적이 5천 제곱미터 이상인 창고시설





// 건축법 시행령 39조 (건축물 바깥쪽으로의 출구 설치) 1항 6호

Check(EDBA_39_1_6){     
KS
}


KS {
Building myBuilding{
getBuildingUsage() = “AmusementFacility”
}

isExist(myBuliding) = TRUE
}
 








target_bldg_type_1 = ['제2종 근린생활시설', '문화 및 집회시설', '종교시설', '판매시설', '업무시설', '창고시설', '교육연구시설', '장례시설', '승강기를 설치하여야하는 건축물']
target_bldg_sub_type_2 = ['판매시설']
max_route_length_stair_to_door = 30
max_route_length_space_to_door = 60
min_em_door_count = 2
min_em_door_h = 1.5
min_em_door_w = 0.75

target_bldg_types_1_label = '외부 출입구 방향 적용 대상 건출물 용도'
target_bldg_types_2_label = '외부 출입구 유효너비 대상 건출물 용도'

max_route_length_stair_to_door_label = '직통계단과 외부 출입구 간 최소거리'
max_route_length_space_to_door_label = '거실과 외부 출입구 간 최소거리'
min_em_door_count_label = '최소 비상구 개수'
min_em_door_h_label = '최소 비상구 높이'
min_em_door_w_label = '최소 비상구 유효너비'

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()
        if (bldg_type in target_bldg_type_1):
            if bldg_type == '제2종 근린생활시설' and sub_type in ['공연장', '종교집회장', '인터넷컴퓨터게임시설제공업소']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '문화 및 집회시설' and sub_type in ['전시장', '동물원', '식물원']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '업무시설' and sub_type == '청사':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '교육연구시설' and sub_type == '학교':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            message =  '검토 대상 건물입니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)

        else:
            message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)
            break



        evac_storey_exist = False
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('is evacuation storey').BOOL() == True:
                evac_storey_exist = True
                break

        if evac_storey_exist == False:
            ERROR('피난층이 존재하지 않습니다.')
            return

        for storey in stories:
            stairs = storey.SELECT('direct stair')

            if stairs.COUNT() == 0:
                storey.ERROR(storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
                continue

            exDoors = []
            for door in storey.SELECT('door'):
                if door.SELECT('is external').BOOL() == True:
                    exDoors.append(door)

            for stair in stairs:
                route_length = -1
                for route in stair.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_stair_to_door:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    stair.SUCCESS(stair.SELECT('name').STRING() + ' : ' + str(route_length))

            spaces = storey.SELECT('space')

            for space in spaces:
                route_length = -1
                for route in space.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_space_to_door:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    space.SUCCESS(space.SELECT('name').STRING() + ' : ' + str(route_length))

            if bldg_type in target_bldg_types_1:
                for door in exDoors:
                    if door.SELECT('is inward').BOOL():
                        door.ERROR('외부 출입구의 방향이 안여닫이입니다.')

                for space in spaces:
                    code = space.SELECT('class code').STRING()
                    if not code in theater_space_codes:
                        continue
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area < 300:
                        continue
                    emExits = []
                    for door in space.SELECT('space door'):
                        if door.SELECT('prop', '비상구').BOOL() or door.SELECT('prop', '보조출입구').BOOL():
                            emExits.append(door)
                    if len(emExits) < min_em_door_count:
                        space.ERROR('비상구(보조출입구) 개수:' + str(len(emExits)) + '(<' + str(min_em_door_count) + ')')
                        continue
                    em_exit_count = 0
                    for exit in emExits:
                        if exit.SELECT('clear opening').UNIT('m').NUMBER() >= min_em_door_w and exit.SELECT('height').UNIT('m').NUMBER() >= min_em_door_h:
                            em_exit_count += 1
                    if em_exit_count < min_em_door_count:
                        space.ERROR('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(<' + str(min_em_door_count) + ')')
                    else:
                        space.SUCCESS('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(>=' + str(min_em_door_count) + ')')

            if bldg_type in target_bldg_types_2:
                if storey.SELECT('is evacuation storey').BOOL() == False:
                    continue
                max_area = 0;
                for space in spaces:
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area > max_area:
                        max_area = area
                min_door_w = max_area / 100 * 0.6;

                for door in exDoors:
                    width = door.SELECT('clear opening').UNIT('m')
                    w = width.NUMBER()
                    if (w < min_door_w):
                        width.ERROR('출구 유효너비:' + str(w) + '(<' + str(min_door_w) + ')')
                    else:
                        width.SUCCESS('출구 유효너비:' + str(w) + '(>=' + str(min_door_w) + ')')
 





Modify
62
36598 건축법 시행령 제 39조 1 항 8호

8. 장례식장





// 건축법 시행령 39조 (건축물 바깥쪽으로의 출구 설치) 1항 8호



Check(EDBA_39_1_8){
 

KS


}







KS {

Building myBuilding{

getBuildingUsage() = “EducationAndResearchFacility.School”

}



isExist(myBuliding) = TRUE

} 








target_bldg_type_1 = ['제2종 근린생활시설', '문화 및 집회시설', '종교시설', '판매시설', '업무시설', '창고시설', '교육연구시설', '장례시설', '승강기를 설치하여야하는 건축물']
target_bldg_sub_type_2 = ['판매시설']
max_route_length_stair_to_door = 30
max_route_length_space_to_door = 60
min_em_door_count = 2
min_em_door_h = 1.5
min_em_door_w = 0.75

target_bldg_types_1_label = '외부 출입구 방향 적용 대상 건출물 용도'
target_bldg_types_2_label = '외부 출입구 유효너비 대상 건출물 용도'

max_route_length_stair_to_door_label = '직통계단과 외부 출입구 간 최소거리'
max_route_length_space_to_door_label = '거실과 외부 출입구 간 최소거리'
min_em_door_count_label = '최소 비상구 개수'
min_em_door_h_label = '최소 비상구 높이'
min_em_door_w_label = '최소 비상구 유효너비'

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()
        if (bldg_type in target_bldg_type_1):
            if bldg_type == '제2종 근린생활시설' and sub_type in ['공연장', '종교집회장', '인터넷컴퓨터게임시설제공업소']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '문화 및 집회시설' and sub_type in ['전시장', '동물원', '식물원']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '업무시설' and sub_type == '청사':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '교육연구시설' and sub_type == '학교':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            message =  '검토 대상 건물입니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)

        else:
            message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)
            break



        evac_storey_exist = False
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('is evacuation storey').BOOL() == True:
                evac_storey_exist = True
                break

        if evac_storey_exist == False:
            ERROR('피난층이 존재하지 않습니다.')
            return

        for storey in stories:
            stairs = storey.SELECT('direct stair')

            if stairs.COUNT() == 0:
                storey.ERROR(storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
                continue

            exDoors = []
            for door in storey.SELECT('door'):
                if door.SELECT('is external').BOOL() == True:
                    exDoors.append(door)

            for stair in stairs:
                route_length = -1
                for route in stair.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_stair_to_door:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    stair.SUCCESS(stair.SELECT('name').STRING() + ' : ' + str(route_length))

            spaces = storey.SELECT('space')

            for space in spaces:
                route_length = -1
                for route in space.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_space_to_door:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    space.SUCCESS(space.SELECT('name').STRING() + ' : ' + str(route_length))

            if bldg_type in target_bldg_types_1:
                for door in exDoors:
                    if door.SELECT('is inward').BOOL():
                        door.ERROR('외부 출입구의 방향이 안여닫이입니다.')

                for space in spaces:
                    code = space.SELECT('class code').STRING()
                    if not code in theater_space_codes:
                        continue
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area < 300:
                        continue
                    emExits = []
                    for door in space.SELECT('space door'):
                        if door.SELECT('prop', '비상구').BOOL() or door.SELECT('prop', '보조출입구').BOOL():
                            emExits.append(door)
                    if len(emExits) < min_em_door_count:
                        space.ERROR('비상구(보조출입구) 개수:' + str(len(emExits)) + '(<' + str(min_em_door_count) + ')')
                        continue
                    em_exit_count = 0
                    for exit in emExits:
                        if exit.SELECT('clear opening').UNIT('m').NUMBER() >= min_em_door_w and exit.SELECT('height').UNIT('m').NUMBER() >= min_em_door_h:
                            em_exit_count += 1
                    if em_exit_count < min_em_door_count:
                        space.ERROR('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(<' + str(min_em_door_count) + ')')
                    else:
                        space.SUCCESS('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(>=' + str(min_em_door_count) + ')')

            if bldg_type in target_bldg_types_2:
                if storey.SELECT('is evacuation storey').BOOL() == False:
                    continue
                max_area = 0;
                for space in spaces:
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area > max_area:
                        max_area = area
                min_door_w = max_area / 100 * 0.6;

                for door in exDoors:
                    width = door.SELECT('clear opening').UNIT('m')
                    w = width.NUMBER()
                    if (w < min_door_w):
                        width.ERROR('출구 유효너비:' + str(w) + '(<' + str(min_door_w) + ')')
                    else:
                        width.SUCCESS('출구 유효너비:' + str(w) + '(>=' + str(min_door_w) + ')')
 





Modify
63
36599 건축법 시행령 제 39조 1 항 9호

9. 승강기를 설치하여야 하는 건축물





// 건축법 시행령 39조 (건축물 바깥쪽으로의 출구 설치) 1항 9호

Check(EDBA_39_1_9){     
KS}

KS {
Building myBuilding{
getBuildingUsage() = “FuneralParlor”
}

isExist(myBuliding) = TRUE
}


 








target_bldg_type_1 = ['제2종 근린생활시설', '문화 및 집회시설', '종교시설', '판매시설', '업무시설', '창고시설', '교육연구시설', '장례시설', '승강기를 설치하여야하는 건축물']
target_bldg_sub_type_2 = ['판매시설']
max_route_length_stair_to_door = 30
max_route_length_space_to_door = 60
min_em_door_count = 2
min_em_door_h = 1.5
min_em_door_w = 0.75

target_bldg_types_1_label = '외부 출입구 방향 적용 대상 건출물 용도'
target_bldg_types_2_label = '외부 출입구 유효너비 대상 건출물 용도'

max_route_length_stair_to_door_label = '직통계단과 외부 출입구 간 최소거리'
max_route_length_space_to_door_label = '거실과 외부 출입구 간 최소거리'
min_em_door_count_label = '최소 비상구 개수'
min_em_door_h_label = '최소 비상구 높이'
min_em_door_w_label = '최소 비상구 유효너비'

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()
        if (bldg_type in target_bldg_type_1):
            if bldg_type == '제2종 근린생활시설' and sub_type in ['공연장', '종교집회장', '인터넷컴퓨터게임시설제공업소']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '문화 및 집회시설' and sub_type in ['전시장', '동물원', '식물원']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '업무시설' and sub_type == '청사':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '교육연구시설' and sub_type == '학교':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            message =  '검토 대상 건물입니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)

        else:
            message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)
            break



        evac_storey_exist = False
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('is evacuation storey').BOOL() == True:
                evac_storey_exist = True
                break

        if evac_storey_exist == False:
            ERROR('피난층이 존재하지 않습니다.')
            return

        for storey in stories:
            stairs = storey.SELECT('direct stair')

            if stairs.COUNT() == 0:
                storey.ERROR(storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
                continue

            exDoors = []
            for door in storey.SELECT('door'):
                if door.SELECT('is external').BOOL() == True:
                    exDoors.append(door)

            for stair in stairs:
                route_length = -1
                for route in stair.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_stair_to_door:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    stair.SUCCESS(stair.SELECT('name').STRING() + ' : ' + str(route_length))

            spaces = storey.SELECT('space')

            for space in spaces:
                route_length = -1
                for route in space.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_space_to_door:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    space.SUCCESS(space.SELECT('name').STRING() + ' : ' + str(route_length))

            if bldg_type in target_bldg_types_1:
                for door in exDoors:
                    if door.SELECT('is inward').BOOL():
                        door.ERROR('외부 출입구의 방향이 안여닫이입니다.')

                for space in spaces:
                    code = space.SELECT('class code').STRING()
                    if not code in theater_space_codes:
                        continue
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area < 300:
                        continue
                    emExits = []
                    for door in space.SELECT('space door'):
                        if door.SELECT('prop', '비상구').BOOL() or door.SELECT('prop', '보조출입구').BOOL():
                            emExits.append(door)
                    if len(emExits) < min_em_door_count:
                        space.ERROR('비상구(보조출입구) 개수:' + str(len(emExits)) + '(<' + str(min_em_door_count) + ')')
                        continue
                    em_exit_count = 0
                    for exit in emExits:
                        if exit.SELECT('clear opening').UNIT('m').NUMBER() >= min_em_door_w and exit.SELECT('height').UNIT('m').NUMBER() >= min_em_door_h:
                            em_exit_count += 1
                    if em_exit_count < min_em_door_count:
                        space.ERROR('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(<' + str(min_em_door_count) + ')')
                    else:
                        space.SUCCESS('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(>=' + str(min_em_door_count) + ')')

            if bldg_type in target_bldg_types_2:
                if storey.SELECT('is evacuation storey').BOOL() == False:
                    continue
                max_area = 0;
                for space in spaces:
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area > max_area:
                        max_area = area
                min_door_w = max_area / 100 * 0.6;

                for door in exDoors:
                    width = door.SELECT('clear opening').UNIT('m')
                    w = width.NUMBER()
                    if (w < min_door_w):
                        width.ERROR('출구 유효너비:' + str(w) + '(<' + str(min_door_w) + ')')
                    else:
                        width.SUCCESS('출구 유효너비:' + str(w) + '(>=' + str(min_door_w) + ')')
 





Modify
64
36600 건축법 시행령 제 39조 2 항

② 법 제49조제1항에 따라 건축물의 출입구에 설치하는 회전문은 국토해양부령으로 정하는 기준에 적합하여야 한다.





// 건축법 시행령 39조 (건축물 바깥쪽으로의 출구 설치) 2항

Check(EDBA_39_2){     
IF  CS THEN KS
}

CS {
Door myDoor {
isObjectProperty(Door.isEntrance) = TRUE
Door.panelOperationType=“RevolvingDoor”
}
isExist(myDoor) = TRUE
}

KS {
getResult(REFB_11_2)=TRUE
}
 




Python Code 변환 예정



Modify
65
36602 건축법 시행령 제 40조 1 항

① 옥상광장 또는 2층 이상인 층에 있는 노대(露臺)나 그 밖에 이와 비슷한 것의 주위에는 높이 1.2미터 이상의 난간을 설치하여야 한다. 다만, 그 노대 등에 출입할 수 없는 구조인 경우에는 그러하지 아니하다.





//건축법 시행령 40조 (옥상광장 등의 설치) 1항

check(EDBA_40_1){

	IF (CS) THEN KS

}



CS{

	Space myBalcony {

		getSpace(“Balconly”)

		Space.Floor.number >= 2

	}



	Space mySpace{

		getSpace(“RoofTopPlaza”) + getSpace(myBalcony)

	}



	isAccessible(mySpace) = TRUE

}



KS{

	hasElement(mySpace, Railing) = TRUE

	mySpace.Rail.height >= 1.2m

} 








target_space_names = ['옥상광장', '노대']
drop_h = 2.0
barrier_h = 1.2

target_space_names_label = '대상 공간 이름'
drop_h_label = '최소 추락 높이'
barrier_h_label = '최소 난간 높이'

def Check():
    for space in SELECT('space'):
        if space.SELECT('is name in', target_space_names).BOOL() == False:
            continue
        if space.SELECT('space door').COUNT() + space.SELECT('opening').COUNT() == 0:
            space.SUCCESS('출입 불가능')
            continue

        for edge in space.SELECT('edge'):
            drop = edge.SELECT('drop').UNIT('m')
            if drop.COUNT() == 0 or drop.LTE(drop_h): 
                continue

            safetybarrier = edge.SELECT('safety barrier')   
            if safetybarrier.COUNT() == 0 : 
                drop.ERROR('난간 미설치')
                continue
                    
            height = safetybarrier.SELECT('height').UNIT('m')
            height_val = height.NUMBER()
                
            if height_val < barrier_h:
                height.ERROR('난간 높이: ' +  str(height_val) + ' < ' + str(barrier_h))
            else:
                height.SUCCESS('난간 높이: ' +  str(height_val) + ' >= ' + str(barrier_h)) 





Modify
66
36603 건축법 시행령 제 40조 2 항

② 5층 이상인 층이 문화 및 집회시설(전시장 및 동·식물원은 제외한다), 종교시설, 판매시설, 위락시설 중 주점영업 또는 장례식장의 용도로 쓰는 경우에는 피난 용도로 쓸 수 있는 광장을 옥상에 설치하여야 한다.





//건축법 시행령 40조 (옥상광장 등의 설치) 2항

Check(EDBA_40_2){

 IF (CS) THEN KS

}



CS{

	Floor myFloor{

		getObjectUsage(Floor) = “ClassIINeighborhoodLivingFacility.PerformanceHall“

		OR getObjectUsage(Floor) = "ClassIINeighborhoodLivingFacility.ReligiousAssemblyFacility"

   	OR getObjectUsage(Floor)= "ClassIINeighborhoodLivingFacility.FacilityForProvidingInternetComputerGameService“ 




Python Code 변환 예정



Modify
67
36606 건축법 시행령 제 44조

제44조 (피난 규정의 적용례) 건축물이 창문, 출입구, 그 밖의 개구부(開口部)(이하 "창문등"이라 한다)가 없는 내화구조의 바닥 또는 벽으로 구획되어 있는 경우에는 그 구획된 각 부분을 각각 별개의 건축물로 보아 제34조부터 제41조까지를 적용한다.





//건축법 시행령 44조 (피난 규정의 적용례)



Check(EDBA_44){

   IF CS THEN KS

}



CS{

   Door myDoor{

      isObjectProperty(Door.isEntrance)=True

   }



   Object  myElement {

        getObject(Window)

        getObject(Opening)

        getObject(myDoor)

   }

   

   FloorSlab myFloorSlab{



        getObjectProperty(FloorSlab.isFireResistantStructure)=True

   }



     Wall myWall{

        getObjectProperty(FloorSlab.isFireResistantStructure)=True

        hasObject(Wall, myElement) =False

   }



   isFirePartition(Building, myFloorSlab)=True

   OR  isFirePartition(Building, myWall)=True

   



}



KS{

   getResult(EDBA_34)=True

   getResult(EDBA_35)=True

   getResult(EDBA_36)=True

   getResult(EDBA_37)=True

   getResult(EDBA_38)=True

   getResult(EDBA_39)=True

   getResult(EDBA_40)=True

   getResult(EDBA_41)=True

} 




Python Code 변환 예정



Modify
68
36608 건축법 시행령 제 46조 1 항

① 법 제49조제2항에 따라 주요구조부가 내화구조 또는 불연재료로 된 건축물로서 연면적이 1천 제곱미터를 넘는 것은 국토해양부령으로 정하는 기준에 따라 내화구조로 된 바닥·벽 및 제64조에 따른 갑종 방화문(국토해양부장관이 정하는 기준에 적합한 자동방화셔텨를 포함한다. 이하 이 조에서 같다)으로 구획(이하 "방화구획"이라 한다)하여야 한다. 다만, 「원자력법」 제2조에 따른 원자로 및 관계시설은 「원자력법」에서 정하는 바에 따른다.





//건축법 시행령 46조 (방화구획의 설치) 1항

Check(EDBA_46_1){

   IF (!CS1 AND CS2) THEN KS

}





CS1{

  getBuildingUsage()="NuclearReactorAndRelatedFacility"

}



CS2{

  (isObjectProperty(MainStructuralPart.isFireResistantStructure)=TRUE

  OR isObjectProperty(MainStructuralPart.Material.nonCombustibility)=TRUE))

  AND Building.grossFloorArea>1000 m2

}



KS{



  Floor myFloor{

      isObjectProperty(FloorSlab.isFireResistantStructure)=TRUE

  }

  Wall myWall{

      isObjectProperty(Wall.isFireResistantStructure)=TRUE

  }

  Door myDoor{

      isObjectProperty(Door.isStrictFireproofDoor)=TRUE

  }



  isFirePartition(Building, myFloor)=TRUE

  AND  isFirePartition(Building, myWall)=TRUE

  AND  isFirePatrition(Building, myDoor)=TRUE



  AND getResult(REFB_14_1)=TRUE

  AND getResult(REFB_14_2)=TRUE

  AND getResult(REFB_14_3)=TRUE



} 




Python Code 변환 예정



Modify
69
36609 건축법 시행령 제 46조 2 항

② 다음 각 호의 어느 하나에 해당하는 건축물의 부분에는 제1항을 적용하지 아니하거나 그 사용에 지장이 없는 범위에서 제1항을 완화하여 적용할 수 있다.





//건축법 시행령 46조 (방화구획의 설치) 2항
check(EDBA_46_2){
IF CS THEN KS
}

KS{ 
getResult(EDBA_46_1)=FALSE
}

CS{
getResult(EDBA_46_2_2)=TRUE
OR getResult(EDBA_46_2_3)=TRUE
OR getResult(EDBA_46_2_4)=TRUE
OR getResult(EDBA_46_2_5)=TRUE
OR getResult(EDBA_46_2_6)=TRUE
OR getResult(EDBA_46_2_7)=TRUE 
} 




Python Code 변환 예정



Modify
70
36611 건축법 시행령 제 46조 2 항 2호

2. 물품의 제조·가공·보관 및 운반 등에 필요한 대형기기 설비의 설치 및 이동식 물류설비의 작업활동을 위하여 불가피한 부분





//건축법 시행령 46조 (방화구획의 설치) 2항 2호

check(EDBA_46_2_2){

IF CS THEN KS

}



KS{

isExist(StationaryLargeComponent)=TRUE

}



CS{

Floor myFloor{
getFloorNumber()<0
}

AND isAccessible(myFloor, Ground) = TRUE

} 




Python Code 변환 예정



Modify
71
36612 건축법 시행령 제 46조 2 항 3호

3. 계단실부분·복도 또는 승강기의 승강로 부분(해당 승강기의 승강을 위한 승강로비 부분을 포함한다)으로서 그 건축물의 다른 부분과 방화구획으로 구획된 부분





//건축법 시행령 46조 (방화구획의 설치) 2항 3호

check(EDBA_46_2_3){

KS

}



KS{

 isObjectProperty(Stair.Space.isFirePartition)=TRUE

 OR isObjectProperty(Passage.isFirePartition)=TRUE

 OR isObjectProperty(ElevatorShaft.isFirePartition)=TRUE

} 




Python Code 변환 예정



Modify
72
36613 건축법 시행령 제 46조 2 항 4호

4. 건축물의 최상층 또는 피난층으로서 대규모 회의장·강당·스카이라운지·로비 등의 용도로 쓰는 부분으로서 그 용도로 사용하기 위하여 불가피한 부분





//건축법 시행령 46조 (방화구획의 설치) 2항 4호

check(EDBA_46_2_4){

KS

}



KS{
Floor myFloor{
getObject(TopFloor)
OR  isObjectProperty(Floor.isEscape)=TRUE
}


 AND 

 (getSpaceUsage(myFloor.Space)="ConferenceRoom"

 OR getSpaceUsage(myFloor.Space)="Hall"

 OR getSpaceUsage(myFloor.Space)="SkyLounge"

 OR getSpaceUsage(myFloor.Space)="Lobby"

 OR isObjectProperty(Zone.isEgressSafetyZone)= TRUE

} 




Python Code 변환 예정



Modify
73
36614 건축법 시행령 제 46조 2 항 5호

5. 복층형 공동주택의 세대별 층간 바닥 부분





//건축법 시행령 46조 (방화구획의 설치) 2항 5호
check(EDBA_46_2_5){
	Zone myZone{
		isObjectProperty(Zone.isOccupiedByOneHousehold) = TRUE
	}
	getBuildingUsage() = "DuplexMultiUnitHouses"
	hasSpace(myZone, Floor) = TRUE
	getFloorNumber(Floor) != 1
} 




Python Code 변환 예정



Modify
74
36615 건축법 시행령 제 46조 2 항 6호

6. 주요구조부가 내화구조 또는 불연재료로 된 주차장





//건축법 시행령 46조 (방화구획의 설치) 2항 6호

check(EDBA_46_2_6){

KS

}



KS{

  isObjectProperty(MainStructuralPart.isFireResistantStructure)=TRUE

  AND isObjectProperty(MainStructuralPart.Material.nonCombustibility)=TRUE

  AND getSpaceUsage()=ParkingLot

} 




Python Code 변환 예정



Modify
75
36616 건축법 시행령 제 46조 2 항 7호

7. 단독주택, 동물 및 식물 관련 시설 또는 교정 및 군사시설 중 군사시설(집회, 체육, 창고 등의 용도로 사용되는 시설만 해당한다)로 쓰는 건축물





//건축법 시행령 46조 (방화구획의 설치) 2항 7호

check(EDBA_46_2_7){

KS

}



KS{

getBuildingUsage()="DetachedHouses"

OR getBuildingUsage()="FacilitiesForAnimalsAndPlants"

OR (getBuildingUsage()="CorrectionalFacilityANDMilitaryFacilities" and (getSpaceUsage()= "Assembly" OR "Gymnasium" OR "Warehouses")

} 




Python Code 변환 예정



Modify
76
36617 건축법 시행령 제 46조 3 항

③ 건축물의 일부가 법 제50조제1항에 따른 건축물에 해당하는 경우에는 그 부분과 다른 부분을 방화구획으로 구획하여야 한다.





//건축법 시행령 46조 (방화구획의 설치) 3항
check(EDBA_46_3){
KS
}

KS{
getResult(BA_50_1)=TRUE
AND isGroupedFirePartition()=TRUE
} 




Python Code 변환 예정



Modify
77
36618 건축법 시행령 제 46조 4 항

④ 공동주택 중 아파트로서 4층 이상인 층의 각 세대가 2개 이상의 직통계단을 사용할 수 없는 경우에는 발코니에 인접 세대와 공동으로 또는 각 세대별로 다음 각 호의 요건을 모두 갖춘 대피공간을 하나 이상 설치하여야 한다. 이 경우 인접 세대와 공동으로 설치하는 대피공간은 인접 세대를 통하여 2개 이상의 직통계단을 쓸 수 있는 위치에 우선 설치되어야 한다.





//건축법 시행령 46조 (방화구획의 설치) 4항

check(EDBA_46_4){

IF CS THEN KS1 AND KS2

}



Zone myZone{

     isObjectProperty(Zone.isOccupiedByOneHousehold) = TRUE

}



KS1{
Space mySpace{
Space.isEscape = TRUE
}

isExist(Balcony)=TRUE

AND hasElement(Balcony,mySpace)=TRUE

AND (getResult(EDBA_46_4_1)=TRUE

AND getResult(EDBA_46_4_2)=TRUE

AND getResult(EDBA_46_4_3)=TRUE

AND getResult(EDBA_46_4_4)=TRUE)

}



KS2{
Stair myStair{
Stair.isDirect = TRUE
}

isGoThrough(myZone,mySpace,myZone)=TRUE

AND isGoThrough(mySpace,myZone,myStair)=TRUE

}



CS{

getBuildingUsage()="MultiUnitHouses.ApartmentHouses"

AND Floor.number >=4

AND isDirectlyAccessible(myZone, myStair)=TRUE

AND myStair.Number>=2

} 




Python Code 변환 예정



Modify
78
36621 건축법 시행령 제 46조 4 항 3호

3. 대피공간의 바닥면적은 인접 세대와 공동으로 설치하는 경우에는 3제곱미터 이상, 각 세대별로 설치하는 경우에는 2제곱미터 이상일 것





//건축법 시행령 46조 (방화구획의 설치) 4항 3호
check(EDBA_46_4_3)

CS1{
}


CS2{
}


KS1{
}


KS2{
} 




Python Code 변환 예정



Modify
79
36623 건축법 시행령 제 46조 5 항

⑤ 제4항에도 불구하고 아파트의 4층 이상인 층에서 발코니에 설치하는 인접 세대와의 경계벽이 파괴하기 쉬운 경량구조 등이거나 경계벽에 피난구를 설치한 경우에는 대피공간을 설치하지 아니할 수 있다.





//건축법 시행령 46조 (방화구획의 설치) 5항

Check(EDBA_5){

CS 

}

Space mySpace{
Space.isEscape = TRUE
}

CS{getObjectProperty(Building.usage)="ApartmentHouses"
  AND isExist(Balcony)=TRUE

  AND (hasObject(Balcony,Structure)=TRUE

  AND (getResult(EDBA_5_1)=TRUE

  or getResult(EDBA_5_2)=TRUE

  or getResult(EDBA_5_3)=TRUE)

  AND isExist(mySpace)=FALSE

} 




Python Code 변환 예정



Modify
80
36626 건축법 시행령 제 47조 1 항 1호

1. 공동주택(기숙사만 해당한다)과 공장이 같은 건축물에 있는 경우





// 건축법 시행령 47조 (방화에 장애가 되는 용도의 제한) 1항 1호

Check(EDBA_47_1_1){
       KS
}

KS{
     Space mySpace1{
         getSpaceUsage(Space)="MultiUnitHouse.Dormitory"
     }
 
     Space mySpace2{
         getSpaceUsage(Space)="Factory"
     }


    isExistTogether(mySpace1, mySpace2)=True
       
} 




Python Code 변환 예정



Modify
81
36630 건축법 시행령 제 48조 1 항

① 법 제49조제2항에 따라 연면적 200제곱미터를 초과하는 건축물에 설치하는 계단 및 복도는 국토해양부령으로 정하는 기준에 적합하여야 한다.





//건축법 시행령 48조 (계단ㆍ복도 및 출입구의 설치) 1항

Check(EDBA_48_1){
     IF CS THEN KS 
}

CS{
   getGrossFloorArea()>200 m2
}

KS{
   getResult(REFB_15_1)=True
   getResult(REFB_15_1_1)=True
   getResult(REFB_15_1_2)=True
   getResult(REFB_15_1_3)=True
   getResult(REFB_15_1_4)=True

   getResult(REFB_15_2)=True
   getResult(REFB_15_2_1)=True
   getResult(REFB_15_2_2)=True
   getResult(REFB_15_2_3)=True
   getResult(REFB_15_2_4)=True
   getResult(REFB_15_2_5)=True
   getResult(REFB_15_2_6)=True

   getResult(REFB_15-2_1)=True
   getResult(REFB_15-2_2)=True
   getResult(REFB_15-2_2_1)=True
   getResult(REFB_15-2_2_2)=True
   getResult(REFB_15-2_2_3)=True

   getResult(REFB_15-2_3)=True
   getResult(REFB_15-2_3_1)=True
   getResult(REFB_15-2_3_2)=True
} 









std_floor_area = 200



std_floor_area_label = '기준 연면면적'

def Check():
    for building in SELECT('building'):
        if building.SELECT('area').Unit(m2).NUmber() < 200:
            continue
                         





Modify
82
36631 건축법 시행령 제 48조 2 항

② 법 제49조제2항에 따라 제39조제1항 각 호의 어느 하나에 해당하는 건축물의 출입구는 국토해양부령으로 정하는 기준에 적합하여야 한다.





//건축법 시행령 48조 (계단ㆍ복도 및 출입구의 설치)2항

Check(EDBA_48_2){
     IF CS THEN KS 
}

CS{
    getResult(EDBA_39_1_1)=True
    OR  getResult(EDBA_39_1_2)=True
    OR  getResult(EDBA_39_1_3)=True
    OR  getResult(EDBA_39_1_4)=True
    OR  getResult(EDBA_39_1_5)=True
    OR  getResult(EDBA_39_1_6)=True
    OR  getResult(EDBA_39_1_7)=True
    OR  getResult(EDBA_39_1_8)=True
    OR  getResult(EDBA_39_1_9)=True
    OR  getResult(EDBA_39_1_10)=True
}

KS{
   getResult(REFB_11_1)=True
   getResult(REFB_11_2)=True
   getResult(REFB_11_3)=True
   getResult(REFB_11_4)=True
   getResult(REFB_11_5)=True
   getResult(REFB_11_6)=True
} 








target_bldg_type_1 = ['제2종 근린생활시설', '문화 및 집회시설', '종교시설', '판매시설', '업무시설', '창고시설', '교육연구시설', '장례시설', '승강기를 설치하여야하는 건축물']
target_bldg_sub_type_2 = ['판매시설']
max_route_length_stair_to_door = 30
max_route_length_space_to_door = 60
min_em_door_count = 2
min_em_door_h = 1.5
min_em_door_w = 0.75

target_bldg_types_1_label = '외부 출입구 방향 적용 대상 건출물 용도'
target_bldg_types_2_label = '외부 출입구 유효너비 대상 건출물 용도'

max_route_length_stair_to_door_label = '직통계단과 외부 출입구 간 최소거리'
max_route_length_space_to_door_label = '거실과 외부 출입구 간 최소거리'
min_em_door_count_label = '최소 비상구 개수'
min_em_door_h_label = '최소 비상구 높이'
min_em_door_w_label = '최소 비상구 유효너비'

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()
        if (bldg_type in target_bldg_type_1):
            if bldg_type == '제2종 근린생활시설' and sub_type in ['공연장', '종교집회장', '인터넷컴퓨터게임시설제공업소']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '문화 및 집회시설' and sub_type in ['전시장', '동물원', '식물원']:
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '업무시설' and sub_type == '청사':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            elif bldg_type == '교육연구시설' and sub_type == '학교':
                message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
                SUCCESS(message)
                break
            message =  '검토 대상 건물입니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)

        else:
            message =  '검토 대상 건물이 아닙니다.' + '(용도:' + bldg_type + ', 세부용도:' + sub_type + ' )'
            SUCCESS(message)
            break



        evac_storey_exist = False
        stories = building.SELECT('storey')

        for storey in stories:
            if storey.SELECT('is evacuation storey').BOOL() == True:
                evac_storey_exist = True
                break

        if evac_storey_exist == False:
            ERROR('피난층이 존재하지 않습니다.')
            return

        for storey in stories:
            stairs = storey.SELECT('direct stair')

            if stairs.COUNT() == 0:
                storey.ERROR(storey.SELECT('name').STRING() + '에 직통계단이 존재하지 않습니다.')
                continue

            exDoors = []
            for door in storey.SELECT('door'):
                if door.SELECT('is external').BOOL() == True:
                    exDoors.append(door)

            for stair in stairs:
                route_length = -1
                for route in stair.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_stair_to_door:
                    stair.ERROR(stair.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    stair.SUCCESS(stair.SELECT('name').STRING() + ' : ' + str(route_length))

            spaces = storey.SELECT('space')

            for space in spaces:
                route_length = -1
                for route in space.SELECT('escape route', exDoors):
                    length = route.SELECT('length').UNIT('m').NUMBER()
                    if length > 0:
                        if route_length < 0:
                            route_length = length
                        else:
                            route_length = min([route_length, length])
                if route_length < 0:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지 갈 수 없다.')
                elif route_length > max_route_length_space_to_door:
                    space.ERROR(space.SELECT('name').STRING() + '부터 외부 출입구까지의 거리가 멀다 : ' + str(route_length))
                else:
                    space.SUCCESS(space.SELECT('name').STRING() + ' : ' + str(route_length))

            if bldg_type in target_bldg_types_1:
                for door in exDoors:
                    if door.SELECT('is inward').BOOL():
                        door.ERROR('외부 출입구의 방향이 안여닫이입니다.')

                for space in spaces:
                    code = space.SELECT('class code').STRING()
                    if not code in theater_space_codes:
                        continue
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area < 300:
                        continue
                    emExits = []
                    for door in space.SELECT('space door'):
                        if door.SELECT('prop', '비상구').BOOL() or door.SELECT('prop', '보조출입구').BOOL():
                            emExits.append(door)
                    if len(emExits) < min_em_door_count:
                        space.ERROR('비상구(보조출입구) 개수:' + str(len(emExits)) + '(<' + str(min_em_door_count) + ')')
                        continue
                    em_exit_count = 0
                    for exit in emExits:
                        if exit.SELECT('clear opening').UNIT('m').NUMBER() >= min_em_door_w and exit.SELECT('height').UNIT('m').NUMBER() >= min_em_door_h:
                            em_exit_count += 1
                    if em_exit_count < min_em_door_count:
                        space.ERROR('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(<' + str(min_em_door_count) + ')')
                    else:
                        space.SUCCESS('기준(' + str(min_em_door_w) + 'X' + str(min_em_door_h) + ')을 충족하는 비상구(보조출입구) 개수:' + str(em_exit_count) + '(>=' + str(min_em_door_count) + ')')

            if bldg_type in target_bldg_types_2:
                if storey.SELECT('is evacuation storey').BOOL() == False:
                    continue
                max_area = 0;
                for space in spaces:
                    area = space.SELECT('area').UNIT('m2').NUMBER()
                    if area > max_area:
                        max_area = area
                min_door_w = max_area / 100 * 0.6;

                for door in exDoors:
                    width = door.SELECT('clear opening').UNIT('m')
                    w = width.NUMBER()
                    if (w < min_door_w):
                        width.ERROR('출구 유효너비:' + str(w) + '(<' + str(min_door_w) + ')')
                    else:
                        width.SUCCESS('출구 유효너비:' + str(w) + '(>=' + str(min_door_w) + ')')
 





Modify
83
36632 건축법 시행령 제 50조

제50조 (거실반자의 설치) 법 제49조제2항에 따라 공장, 창고시설, 위험물저장 및 처리시설, 동물 및 식물 관련 시설, 분뇨 및 쓰레기처리시설 또는 묘지 관련시설 외의 용도로 쓰는 건축물 거실의 반자(반자가 없는 경우에는 보 또는 바로 위층의 바닥판의 밑면, 그 밖에 이와 비슷한 것을 말한다)는 국토해양부령으로 정하는 기준에 적합하여야 한다.





// 건축법 시행령 50조 (거실반자의 설치)
check(EDBA_50){
	IF (CS) THEN KS
}

CS{
	Building.usage != "Factory"
	OR Building.usage != "Warehouse"
	OR Building.usage != "FacilityForStorageAndTreatmentOfDangerousSubstance"
	OR Building.usage != "FacilityForAnimalAndPlant"
	OR Building.usage != "ResourceRecyclingFacility"
	OR Building.usage != "CemeteryAndRelatedFacility"
}

KS{
	getResult(REFB_16_1) = TRUE
	getResult(REFB_16_2) = TRUE
}
 








min_h = 2.1
min_h_label = '최소 반자 높이'

def Check():
    for space in SELECT('space'):
        dist = space.SELECT('ceiling height')
        height = dist.UNIT('m').NUMBER()
        if height < min_h:
            dist.ERROR('반자 높이 : ' + str(height) + ' < ' + str(min_h))
        else:
            dist.SUCCESS('반자 높이 : ' + str(height) + ' >= ' + str(min_h)) 





Modify
84
36634 건축법 시행령 제 51조 1 항

① 법 제49조제2항에 따라 단독주택 및 공동주택의 거실, 교육연구시설 중 학교의 교실, 의료시설의 병실 및 숙박시설의 객실에는 국토해양부령으로 정하는 기준에 따라 채광 및 환기를 위한 창문등이나 설비를 설치하여야 한다.





// 건축법 시행령 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) + ', 공기조화설비 미설치') 





Modify
85
36635 건축법 시행령 제 51조 2 항

② 법 제49조제2항에 따라 6층 이상인 건축물로서 문화 및 집회시설, 종교시설, 판매시설, 운수시설, 의료시설, 교육연구시설 중 연구소, 노유자시설 중 아동 관련 시설·노인복지시설, 수련시설 중 유스호스텔, 운동시설, 업무시설, 숙박시설, 위락시설, 관광휴게시설 및 장례식장의 거실에는 국토해양부령으로 정하는 기준에 따라 배연설비(排煙設備)를 하여야 한다. 다만, 피난층인 경우에는 그러하지 아니하다.





//건축법 시행령 51조 (거실의 채광 등) 2항
Check(EDBA_51_2){
	IF (!CS1 AND CS2) THEN KS
}


CS1{
	Floor myFloor{
		isObjectProperty(Floor.isEscape) = TRUE
	}
	getFloorNumber(Room) = getFloorNumber(myFloor)
}

CS2{
	getBuildingStoriesCount() >= 6
	getResult(EDBA_51_2_1) = True
	OR getResult(EDBA_51_2_2) = True
	OR getResult(EDBA_51_2_3) = True
	OR getResult(EDBA_51_2_4) = True
	OR getResult(EDBA_51_2_5) = True
	OR getResult(EDBA_51_2_6) = True
	OR getResult(EDBA_51_2_7) = True
	OR getResult(EDBA_51_2_8) = True
	OR getResult(EDBA_51_2_9) = True
	OR getResult(EDBA_51_2_10) = True
	OR getResult(EDBA_51_2_11) = True
	OR getResult(EDBA_51_2_12) = True
	OR getResult(EDBA_51_2_13) = True
	OR getResult(EDBA_51_2_14) = True
	OR getResult(EDBA_51_2_15) = True
}

KS{
	hasSpace(Room, SmokeExhaustionSystem) = True
	getResult(RFB_14_1) = True
	getResult(REFB_17_1) = True
	getResult(REFB_17_2) = True
}
 




Python Code 변환 예정



Modify
86
36636 건축법 시행령 제 52조

제52조 (거실 등의 방습) 법 제49조제2항에 따라 다음 각 호의 어느 하나에 해당하는 거실·욕실 또는 조리장의 바닥 부분에는 국토해양부령으로 정하는 기준에 따라 방습을 위한 조치를 하여야 한다.





//건축법 시행령 52조 (거실 등의 방습)
Check(EDBA_52){
IF CS THEN KS}

CS{
  getResult(EDBA_52_0_1)=TRUE
  OR getResult(EDBA_52_0_2)=TRUE
  OR getResult(EDBA_52_0_3)=TRUE
  getObject(Floor)
}

KS{
  getResult(REFB_18_1)=TRUE
  AND getResult(REFB_18_2)=TRUE
} 




Python Code 변환 예정



Modify
87
36642 건축법 시행령 제 56조 1 항 1호

1. 문화 및 집회시설(전시장 및 동·식물원은 제외한다), 종교시설, 위락시설 중 주점영업 및 장례식장의 용도로 쓰는 건축물로서 관람석 또는 집회실의 바닥면적의 합계가 200제곱미터(옥외관람석의 경우에는 1천 제곱미터) 이상인 건축물





//건축법 시행령 56조 (건축물의 내화구조) 1항 1호

check(EDBA_56_1_1){

	KS

}


Space mySpace{
Space.usage = "Auditorium "
isExternal(Space) = TRUE
}



KS {

        (getBuildingUsage() = "PerformanceHall" | "ReligiousAssemblyFacility"

        AND getFloorArea(getSpace("PerformanceHall" | “ReligiousAssemblyFacility”)) > = 300m2;)

	

        OR (getBuildingUsage() = "CulturalAndAssemblyFacility" 

        AND getBuildingUsage() != "ExhibitionHall" | "ZoologicalAndBotanicalGarden"

        

        OR (getBuildingUsage() = "ReligiousFacility" | "BarBusiness" | "FuneralParlor"

	AND getFloorArea(getSpace(“Seat” | “AssemblyHall”) > = 200m2 

        OR getFloorArea(mySpace) > = 1000m2;)

} 




Python Code 변환 예정



Modify
88
36643 건축법 시행령 제 56조 1 항 2호

2. 문화 및 집회시설 중 전시장 또는 동·식물원, 판매시설, 운수시설, 수련시설, 운동시설 중 체육관·운동장, 위락시설(주점영업의 용도로 쓰는 것은 제외한다), 창고시설, 위험물저장 및 처리시설, 자동차 관련 시설, 방송통신시설 중 방송국·전신전화국·촬영소, 묘지 관련 시설 중 화장장 또는 관광휴게시설의 용도로 쓰는 건축물로서 그 용도로 쓰는 바닥면적의 합계가 500제곱미터 이상인 건축물





//건축법 시행령 56조 (건축물의 내화구조) 1항 2호

check(EDBA_56_1_2){

        KS

}

	

KS{

        (getBuildingUsage() = "ExhibitionHall" |  "ZoologicalANDbotanicalGarden" | "CommercialFacility"  | "TransportationFacilities"  | "gymnasium.educationAndresearchFacilities"   | "hall.educationAndresearchFacilities" | "gymnasium" | "sportsfacilities.stadium" | "sports facilities.warehouses"  | "factory.facilitiesForStorageAndreatmentOfDangerousSubstance"  | "factory.facilitiesForMotorVehicles" | "facilitiesforbroadcastingAndTelecommunications.broadcastingStation"  | "facilitiesforbroadcasting andtelecommunications.telegraphAndTelephoneStations" | "facilitiesforbroadcasting and telecommunications.studio" | "cemeteries and relatedfacilities.Crematorium | "facilitiesfortourismandrelaxation"

OR (getBuildingUsage() = "amusementfacilities"

AND getBuildingUsage() != "barbusiness.amusementfacilities"))

AND getFloorArea(getSpace(getBuildingUsage()) > = 500m2))

} 




Python Code 변환 예정



Modify
89
36644 건축법 시행령 제 56조 1 항 3호

3. 공장의 용도로 쓰는 건축물로서 그 용도로 쓰는 바닥면적의 합계가 2천 제곱미터 이상인 건축물. 다만, 화재의 위험이 적은 공장으로서 국토해양부령으로 정하는 공장은 제외한다.





//건축법 시행령 56조 (건축물의 내화구조와 방화벽) 1항 3호
check(EDBA_56_1_3){
	IF !(CS) THEN KS
}

CS{
	getResult(REFB_20-2) = TRUE
}

KS{
	Floor myFloor{
		getObjectUsage(Floor) = "Factory"
	}

	getTotalFloorArea(myFloor.Space) >= 2000 m2
} 




Python Code 변환 예정



Modify
90
36645 건축법 시행령 제 56조 1 항 4호

4. 건축물의 2층이 단독주택 중 다중주택 및 다가구주택, 공동주택, 제1종 근린생활시설(의료의 용도로 쓰는 시설만 해당한다), 의료시설, 노유자시설 중 아동 관련 시설 및 노인복지시설, 수련시설 중 유스호스텔, 업무시설 중 오피스텔, 숙박시설 또는 장례식장의 용도로 쓰는 건축물로서 그 용도로 쓰는 바닥면적의 합계가 400제곱미터 이상인 건축물





//건축법 시행령 56조 (건축물의 내화구조와 방화벽) 1항 4호
check(EDBA_56_1_4){
	
	Floor myFloor{

		getFloorNumber = 2

		getObjectUsage(Floor) = "DetachedHouse.MultiUserHouse"
		OR getObjectUsage(Floor) = "DetachedHouse.MultiFamilyHouse"
		OR getObjectUsage(Floor) = "DetachedHouse.MultiFamilyHouse"
		OR getObjectUsage(Floor) = "MultiUnitHouse"
		OR getObjectUsage(Floor) = "ClassINeighborhoodLivingFacility.MedicalFacility"
		OR getObjectUsage(Floor) = "ClassIINeighborhoodLivingFacility.CommunalLivingFacility"
		OR getObjectUsage(Floor) = "MedicalFacility"
		OR getObjectUsage(Floor) = "FacilitiesForTheAgedAndChildren.ChildrenRelatedFacility"
		OR getObjectUsage(Floor) = "FacilitiesForTheAgedAndChildren.WelfareFacilityForTheAged "
		OR getObjectUsage(Floor) = "Trainingfacility.YouthHostel"
		OR getObjectUsage(Floor) = "BusinessFacility.Officetel"
		OR getObjectUsage(Floor) = "LodgingFacility"
		OR getObjectUsage(Floor) = "FuneralParlor"
	}
	
	getFloorArea(myFloor) >= 400 m2
} 




Python Code 변환 예정



Modify
91
36647 건축법 시행령 제 56조 2 항

② 제1항제1호 및 제2호에 해당하는 용도로 쓰지 아니하는 건축물로서 그 지붕틀을 불연재료로 한 경우에는 그 지붕틀을 내화구조로 아니할 수 있다.





//건축법 시행령 56조 (건축물의 내화구조) 2항

check(EDBA_56_2){

	IF (!CS1 AND CS2) THEN !KS



CS1{

        getResult(EDBA_56_1_1)=TRUE

        AND getResult(EDBA_56_1_2)=TRUE

}



CS2{

        getObjectMaterialType(RoofTruss)= "NonCombustibleMaterial"

}



KS{

        isFireResistantStructure(RoofTruss) = TRUE

} 




Python Code 변환 예정



Modify
92
36649 건축법 시행령 제 57조 1 항

① 법 제50조제2항에 따라 연면적 1천 제곱미터 이상인 건축물은 방화벽으로 구획하되, 각 구획된 바닥면적의 합계는 1천 제곱미터 미만이어야 한다. 다만, 주요구조부가 내화구조이거나 불연재료인 건축물과 제56조제1항제5호 단서에 따른 건축물 또는 내부설비의 구조상 방화벽으로 구획할 수 없는 창고시설의 경우에는 그러하지 아니하다.





//  건축법 시행령 57조 (	대규모 건축물의 방화벽 등) 1항
Check(EDBA_57_1){
	IF (CS1 AND CS2) THEN KS
}

CS1{
	getObjectProperty(MainStructuralPart.isFireResistantStructure) = TRUE
	OR getObjectProperty(MainStructuralPart.Material.nonCombustibility) = TRUE
	OR getResult(EDBA_56_1_5) = TRUE
}

CS2{
	getObjectProperty(Building.grossFloorArea) >= 1000m2
}

KS{
	Space mySpace{
		getFloorArea(Space) < 1000m2
	}

	Space mySpace2{
		Space != mySpace
	}

	Wall myWall{
		isObjectProperty(Wall.isFireProofWall) = TRUE
	}

	isPartitioned(mySpace, mySpace2, myWall) = TRUE
} 




Python Code 변환 예정



Modify
93
36650 건축법 시행령 제 57조 2 항

② 제1항에 따른 방화벽의 구조에 관하여 필요한 사항은 국토해양부령으로 정한다.





check(EDBA_57_2){
	KS
}

KS{
	getResult(REFB_21_1) = TRUE 			
} 




Python Code 변환 예정



Modify
94
36651 건축법 시행령 제 57조 3 항

③ 연면적 1천 제곱미터 이상인 목조 건축물의 구조는 국토해양부령으로 정하는 바에 따라 방화구조로 하거나 불연재료로 하여야 한다.





//  건축법 시행령 57조 (대규모 건축물의 방화벽 등) 3항

Check(EDBA_57_3){

	IF CS THEN KS

}



CS{

	getObjectProperty(Building.grossFloorArea) >= 1000m2

	getObjectProperty(Building.Structure.materialType) = "Timber"

}



KS{

	getObjectProperty(MainStructuralPart.Material.nonCombustibility) = TRUE

	OR getObjectProperty(MainStructuralPart.isFireProofStructure) = TRUE

} 




Python Code 변환 예정



Modify
95
36652 건축법 시행령 제 58조

제58조 (방화지구의 건축물) 법 제51조제1항에 따라 그 주요구조부 및 외벽을 내화구조로 하지 아니할 수 있는 건축물은 다음 각 호와 같다.





check(EDBA_58){
	KS
}

KS{
	getResult(EDBA_58_0_1) = TRUE;
	getResult(EDBA_58_0_2) = TRUE;
}

 




Python Code 변환 예정



Modify
96
36656 건축법 시행령 제 80조

제80조 (건축물이 있는 대지의 분할제한) 법 제57조제1항에서 "대통령령으로 정하는 범위"란 다음 각 호의 어느 하나에 해당하는 규모 이상을 말한다.





//건축법 시행령 80조 (건축물이 있는 대지의 분할제한) 

Check(EDBA_80){
     KS
}
KS{
	getResult(EDBA_80_1) = TRUE
	getResult(EDBA_80_2) = TRUE
	getResult(EDBA_80_3) = TRUE
	getResult(EDBA_80_4) = TRUE
	getResult(EDBA_80_5) = TRUE
} 




Python Code 변환 예정



Modify
97
36663 건축법 시행령 제 81조 3 항

③ 법 제59조제1항제1호에 따른 맞벽은 방화벽이어야 한다. <개정 2008.10.29>





//  건축법 시행령 81조 (맞벽건축 및 연결복도) 3항
Check(EDBA_81_3){
	KS
}

KS{
	getResult(EDBA_81_3_1) = TRUE
	getResult(EDBA_81_3_2) = TRUE
} 




Python Code 변환 예정



Modify
98
36704 건축법 시행령 제 89조

제89조 (승용 승강기의 설치) 법 제64조제1항 전단에서 "대통령령으로 정하는 건축물"이란 층수가 6층인 건축물로서 각 층 거실의 바닥면적 300제곱미터 이내마다 1개소 이상의 직통계단을 설치한 건축물을 말한다.





//건축법 시행령 89조 (승용 승강기의 설치)
Check(EDBA_89){
     KS
}

KS{
     Stair myStair{
          isObjectProperty(Stair.isDirect) = TRUE
     }
     getBuildingStoriesCount() = 6
     isExist(myStair) = TRUE
} 




Python Code 변환 예정



Modify
99
36706 건축법 시행령 제 90조 1 항

① 법 제64조제2항에 따라 높이 31미터를 넘는 건축물에는 다음 각 호의 기준에 따른 대수 이상의 비상용 승강기(비상용 승강기의 승강장 및 승강로를 포함한다. 이하 이 조에서 같다)를 설치하여야 한다. 다만, 법 제64조제1항에 따라 설치되는 승강기를 비상용 승강기의 구조로 하는 경우에는 그러하지 아니하다.





//건축법 시행령 90조 (비상용 승강기의 설치) 1항

Check(EDBA_90_1){
  IF (!CS1 AND CS2) THEN KS

}

CS1{
    getResult(BA_64_1)=TRUE
    isObjectProperty(Elevator.isEmergency)=TRUE
    
}

CS2{
    getBuildingHeight()>31 m
}

KS{
    getResult(EDBA_90_1_1)=TRUE
    getReslut(EDBA_90_1_2)=TRUE
} 




Python Code 변환 예정



Modify
100
36707 건축법 시행령 제 90조 1 항 1호

1. 높이 31미터를 넘는 각 층의 바닥면적 중 최대 바닥면적이 1천500제곱미터 이하인 건축물: 1대 이상





//건축법 시행령 90조 (비상용 승강기의 설치) 1항 1호
Check(EDBA_90_1_1){
	IF CS THEN KS
}

CS{
	Floor myFloor{
		getObjectHeight(myFloor) > 31 m
	}

	getFloorArea(myFloor) <= 1500 m2
}

KS{
	isExist(Elevator.isEmergency) = TRUE
} 




Python Code 변환 예정



Modify
  ◁prev 1   2   3   4   5   6   7   8   9   10   next▷ NEXT10▶