개방형BIM 기반의 건축설계 적법성 평가 자동화 기술 및 응용기술 개발
Development of OpenBIM based Architectural Design Code Checking and Evaluation Technology
  Welcome to BIM - 2nd Project Website - Yonsei University
PAGE MENU  
전체법규 - 법규데이터베이스
- 대한민국 전체 법규 목록
- 설계품질검토 대상 관련법규
- 관련법규 변동 현황
대상법규 - 문장 논리규칙체계화
- 조항단위 논리규칙체계
- 문장단위 논리규칙체계
주어부 - 객체.속성 데이터베이스
- 법규로부터의 객체.속성 분류
- 명칭DB: 객체 | 객체및속성
서술부 - 함수 데이터베이스
- 논리규칙화 함수 분류
- 논리규칙화 함수 DB
관계부 - 문장 내.외 관계논리
- 문장 내.외 관계유형분류
- 문장 내.외관계 논리체계화
문장단위 | 체크리스트 단위
KBimCode 데이터베이스
- KBimCode Lang. Definition
- KBimCode Editor:
전체 개발항목 단위
우선순위 개발항목 단위
- KBimCode DB 2단계:
문장단위 | 조항단위 |
분야/용도/단계 체크리스트 단위
- KBimLogic Applications
KBimAssess Code 데이터베이스
- Executable KBimAssess Code
- KBimCode-Assess 연동모듈
 
(2025-06-27 기준) 설계품질검토용 건축법 및 관련법규 - KBIMCode (문장단위)
    1   2   next▷  
1 / 2 page Total 2500 / 4000 records    신규입력
Select
ALL
None
#
ID
Law
Jo
JO Name
HANG
HO
MOK
Text
Search!
1
19387 건축물의 설비기준 등에 관한 규칙 제 13조 1 항

제13조(개별난방설비) ①영 제87조제2항의 규정에 의하여 공동주택과 오피스텔의 난방설비를 개별난방방식으로 하는 경우에는 다음 각호의 기준에 적합하여야 한다. <개정 1996.2.9., 1999.5.11., 2001.1.17.>





//	건축물의 설비기준 등에 관한 규칙 13조 (개별난방설비) 1항
Check(RFB_13_1){
	IF CS THEN KS
}

CS{
	getBuildingUsage() = "DetachedHouse"
	OR getBuildingUsage() = "MultiUnitHouse"
}

KS{
	getResult(RFB_13_1_1) = TRUE
	getResult(RFB_13_1_2) = TRUE
	getResult(RFB_13_1_5) = TRUE
	getResult(RFB_13_1_6) = TRUE
	getResult(RFB_13_1_7) = TRUE
} 




Python Code 변환 예정



Modify
2
19391 건축물의 설비기준 등에 관한 규칙 제 13조 1 항 6호

6. 오피스텔의 경우에는 난방구획마다 내화구조로 된 벽·바닥과 갑종방화문으로 된 출입문으로 구획할 것





//	건축물의 설비기준 등에 관한 규칙 13조 (개별난방설비) 1항 6호

Check(RFB_13_1_6){

	IF CS THEN KS

}



CS{

	getBuildingUsage() = "Officetel"

}



KS{

	Wall myWall{

		isObjectProperty(Wall.isfireResistantStructure)

	}



	FloorSlab myFloorSlab{

		isObjectProperty(FloorSlab.isFireResistantStructure) = TRUE

	}



	Door myDoor{

		isObjectProperty(Door.isStrictFireproofDoor) = TRUE

	}


Zone myZone{
isObjectProperty(Zone.isHeatingSection) = TRUE
}
	isPartitioned(myZone, myWall) = TRUE

	OR isPartitioned(myZone, myFloorSlab) = TRUE

	OR isPartitioned(myZone, myDoor) = TRUE

} 




Python Code 변환 예정



Modify
3
19393 건축물의 설비기준 등에 관한 규칙 제 13조 2 항

②가스보일러에 의한 난방설비를 설치하고 가스를 중앙집중공급방식으로 공급하는 경우에는 제1항의 규정에 불구하고 가스관계법령이 정하는 기준에 의하되, 오피스텔의 경우에는 난방구획마다 내화구조로 된 벽·바닥과 갑종방화문으로 된 출입문으로 구획하여야 한다. <신설 1999.5.11.>





//	건축물의 설비기준 등에 관한 규칙 13조 (개별난방설비) 2항

Check(RFB_13_2){

	IF CS THEN KS

}



CS{

	getBuildingUsage() = "Officetel"

}



KS{

	Wall myWall{

		isObjectProperty(Wall.isfireResistantStructure)

	}



	FloorSlab myFloorSlab{

		isObjectProperty(FloorSlab.isFireResistantStructure) = TRUE

	}



	Door myDoor{

		isObjectProperty(Door.isStrictFireproofDoor) = TRUE

	}


Zone myZone{
isObjectProperty(Zone.isHeatingSection) = TRUE
}
	isPartitioned(myZone, myWall) = TRUE

	OR isPartitioned(myZone, myFloorSlab) = TRUE

	OR isPartitioned(myZone, myDoor) = TRUE

} 




Python Code 변환 예정



Modify
4
25170 건축물의 설비기준 등에 관한 규칙 제 23조 3 항

③상업지역 및 주거지역에서 법 제2조제1항제11호의 규정에 의한 도로(막다른 도로로서 그 길이가 10미터 미만인 경우를 제외한다)에 접한 대지의 건축물에 설치하는 냉방시설 및 환기시설의 배기구는 도로면으로부터 2미터 이상의 높이에 설치하거나 배기장치의 열기가 보행자에게 직접 닿지 아니하도록 설치하여야 한다. <신설 2002.8.31>





//	건축물의 설비기준 등에 관한 규칙 23조 (건축물의 냉방설비) 3항
Check(RFB_23_3){
	IF CS THEN KS
}

CS{
	getBuildingUsage() = "ResidentialArea"
	OR getBuildingUsage() = "CommercialArea"
}

KS{
	getResult(RFB_23_3_1)
} 




Python Code 변환 예정



Modify
5
72672 건축물의 에너지절약설계기준 제 5조 11호 나 목

나. "역률개선용콘덴서”라 함은 역률을 개선하기 위하여 변압기 또는 전동기 등에 병렬로 설치하는 콘덴서를 말한다.





//	비상콘센트설비의 화재안전기준(nfsc 504) 4조 (전원 및 콘센트 등) 5항 3호
Check(NFSC504_4_5_3){
	IF (CS1 THEN KS1) OR (CS2 THEN KS2)
}

CS1{
	Building myBuilding{
		getBuildingUsage() = "ApartmentHouse"
	}

	Floor myFloor{
		getFloorArea(Floor) < 1000m2
	}

	Floor myFloor2{
		hasSpace(myBuilding, Floor) = TRUE
	}

	isExist(myFloor) = TRUE
	OR isExist(myFloor2) = TRUE
}

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

	getObjectDistance(myDoor.Stair.Space, EmergencyPowerOutlet) < 5m
	OR getObjectDistance(myDoor.Stair.AncillaryRoom, EmergencyPowerOutlet) < 5m
}

CS2{
	Building myBuilding{
		getBuildingUsage() = "ApartmentHouse"
	}

	Floor myFloor{
		getFloorArea(Floor) >= 1000m2
		hasSpace(myBuilding, Floor) = FALSE
	}

	isExist(myFloor) = TRUE
}

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

	getObjectDistance(myDoor.Stair.Space, EmergencyPowerOutlet) < 5m
	OR getObjectDistance(myDoor.Stair.AncillaryRoom, EmergencyPowerOutlet) < 5m
} 




Python Code 변환 예정



Modify
6
72703 건축물의 에너지절약설계기준 제 5조 9호 러 목

러. "일사조절장치"라 함은 태양열의 실내 유입을 조절하기 위한 목적으로 설치하는 장치를 말한다.





//  옥내소화전설비의 화재안전기준(nfsc 102) 7조 (함 및 방수구 등) 2항 1호

Check(NFSC503A_7_2_1){

	KS2 AND IF CS THEN KS1

}

KS2{

	isInstalled(옥내소화전방수구, SpecificFireFightingBuilding.Floor.One) = TRUE

	getElementDistance(SpecificFireFightingBuilding.Wall|SpecificFireFightingBuilding.Column, 옥내소화전방수구.One) <= 25m

}

CS{

	getBuildingUsage() = "MultiUnitHouse"

}	

KS2{

	Door myDoor{

	isObjectProperty(Door.isEntrance) = TRUE

	}

	Floor myFloor{

	isInstalled(myDoor, Floor) = TRUE

	}

Port myPort{
Port.typeForWater="IndoorFireHydrantDischarge"
}
	isInstalled(myPort, myFloor.One) = TRUE

} 




Python Code 변환 예정



Modify
7
72739 건축물의 에너지절약설계기준 제 6조 4호 나 2) 목

2) 방습층으로 알루미늄박 또는 플라스틱계 필름 등을 사용할 경우의 이음부는 100 ㎜ 이상 중첩하고 내습성 테이프, 접착제 등으로 기밀하게 마감할 것





//스프링클러설비의 화재안전기준(NFSC 103) 10조 3항 3호

check(NFSC103_10_3_3){

	IF (CS) THEN KS ENDIF

}



CS{

	getBuildingUsage() = "MultiUnitHouse"

}



KS{

	Space mySpace = getObject(Room)

			

	getObjectVerticalDistance(mySpace.Ceiling, SprinklerHead) <= 3.2m

	getObjectVerticalDistance(mySpace.CeilingCover, SprinklerHead) <= 3.2m

	getObjectVerticalDistance(mySpace.Duct, SprinklerHead) <= 3.2m

	getObjectVerticalDistance(mySpace.Shelf, SprinklerHead) <= 3.2m

} 




Python Code 변환 예정



Modify
8
72763 건축물의 에너지절약설계기준 제 7조 3호 나 목

나. 외벽 부위는 제5조제9호차목에 따른 외단열로 시공한다.





//	스프링클러설비의 화재안전기준(nfsc 103) 12조 (전원) 2항

Check(NFSC103_12_2){

	IF (!CS1 THEN KS1) OR (CS2 THEN KS2)

}



CS1{

	Tank myTank{

		getObjectProperty(Tank) = "PressurizedTank"

	}



	isInstalled(myTank) = TRUE

}



CS2{

	getBuildingUsage() = "Garage"

	OR getBuildingUsage() = "ParkingLot"



	ParkingLot myParkingLot{

		getResult(Unimplemented_NFSC105_13_2_2) = TRUE

		getSpace(ParkingLot)

	}



	Floor myFloor{

		isInstalled(SprinklerSystem, Floor) = TRUE

	}



	getFloorArea(myFloor) + getFloorArea(myFloor2) >= 1000m2

}



KS1{

	EmergencyPower myEmergencyPower{

		getObjectProperty(EmergencyPower.systemType) = "InhousePowerGenerationSystem"

		OR getObjectProperty(EmergencyPower.systemType) = "StorageBatterySystem"

	}

	isInstalled(myEmergencyPower, SprinklerSystem) = TRUE

}



KS2{

	EmergencyPower myEmergencyPower{

		getObjectProperty(EmergencyPower.systemType) = "InhousePowerGenerationSystem"

		OR getObjectProperty(EmergencyPower.systemType) = "StorageBatterySystem"

		OR getObjectProperty(EmergencyPower.systemType) = "EmergencyPowerReceivingSystem"

	}

	isInstalled(myEmergencyPower, SprinklerSystem) = TRUE

} 




Python Code 변환 예정



Modify
9
72771 건축물의 에너지절약설계기준 제 7조 4호 가 목

가. 틈새바람에 의한 열손실을 방지하기 위하여 외기에 직접 또는 간접으로 면하는 거실 부위에는 기밀성 창 및 문을 사용한다.





//	스프링클러설비의 화재안전기준(nfsc 103) 15조 (헤드의 설치제외) 1항 1호
Check(NFSC103_15_1_1){
	KS
}

KS{
	getBuildingUsage() = "Stair.Space"
	OR getSpaceUsage() = "Ramp"
	OR getSpaceUsage() = "Elevator.ElevatorShaft"
	OR getSpaceUsage() = "EmergencyElevatorPlatform"
	OR getObjectProperty(Duct.isPipeDuct) = TRUE
	OR getObjectProperty(Pit.isPipePit) = TRUE
	OR getBuildingUsage() = "BathRoom"
	OR getBuildingUsage() = "SwimmingPool"
	OR getBuildingUsage() = "Toilet"
} 




Python Code 변환 예정



Modify
10
72772 건축물의 에너지절약설계기준 제 7조 4호 나 목

나. 공동주택의 외기에 접하는 주동의 출입구와 각 세대의 현관은 방풍구조로 한다.





//	스프링클러설비의 화재안전기준(nfsc 103) 15조 (헤드의 설치제외) 1항 2호
Check(NFSC103_15_1_2){
	KS
}

KS{
	getBuildingUsage() = "CommunicationsApparatusRoom"
	OR getBuildingUsage() = "ElectronicEquipmentRoom"
} 




Python Code 변환 예정



Modify
11
72773 건축물의 에너지절약설계기준 제 7조 5호

5. 자연채광계획





//	스프링클러설비의 화재안전기준(nfsc 103) 15조 (헤드의 설치제외) 1항 3호

Check(NFSC103_15_1_3){

	KS

}



KS{

	getBuildingUsage() = "GeneratorRoom"

	OR getBuildingUsage() = "TransformerRoom"

	OR isInstalled(
Transformer, Room) = TRUE

} 




Python Code 변환 예정



Modify
12
72774 건축물의 에너지절약설계기준 제 7조 5호 가 목

가. 자연채광을 적극적으로 이용할 수 있도록 계획한다. 특히 학교의 교실, 문화 및 집회시설의 공용부분(복도, 화장실, 휴게실, 로비 등)은 1면 이상 자연채광이 가능하도록 한다.





//	스프링클러설비의 화재안전기준(nfsc 103) 15조 (헤드의 설치제외) 1항 4호
Check(NFSC103_15_1_4){
	KS
}

KS{
	getBuildingUsage() = "Hospital.수술실"
	OR getBuildingUsage() = "Hospital.응급처치실"
} 




Python Code 변환 예정



Modify
13
72780 건축물의 에너지절약설계기준 제 7조 6호 나 목

나. 문화 및 집회시설 등의 대공간 또는 아트리움의 최상부에는 자연배기 또는 강제배기가 가능한 구조 또는 장치를 채택한다.





//	스프링클러설비의 화재안전기준(nfsc 103) 15조 (헤드의 설치제외) 1항 8호
Check(NFSC103_15_1_8){
	KS
}

KS{
	getBuildingUsage() = "펌프실"
	OR getBuildingUsage() = "물탱크실"
	OR getBuildingUsage() = "엘리베이터 권상기실"
} 




Python Code 변환 예정



Modify
14
72784 건축물의 에너지절약설계기준 제 8조 2호

2. 열원 및 반송설비





//	스프링클러설비의 화재안전기준(nfsc 103) 15조 (헤드의 설치제외) 1항 13호 가목
Check(NFSC103_15_1_13_1){
	KS
}

KS{
	getBuildingUsage() = "PurificationPlant"
	OR getBuildingUsage() = "오물처리장"
} 




Python Code 변환 예정



Modify
15
72785 건축물의 에너지절약설계기준 제 8조 2호 가 목

가. 공동주택에 중앙집중식 난방설비(집단에너지사업법에 의한 지역난방공급방식을 포함한다)를 설치하는 경우에는 「주택건설기준등에관한규정」 제37조의 규정에 적합한 조치를 하여야 한다.





//	스프링클러설비의 화재안전기준(nfsc 103) 15조 (헤드의 설치제외) 1항 13호 나목
Check(NFSC103_15_1_13_2){
	KS
}

KS{
	getBuildingUsage() = "PulpMill.WorkPlace"
	OR getBuildingUsage() = "BeverageFactory.WorkPlace"
}
 




Python Code 변환 예정



Modify
16
72786 건축물의 에너지절약설계기준 제 8조 2호 나 목

나. 펌프는 한국산업규격(KS B 6318, 7501, 7505등) 표시인증제품 또는 KS규격에서 정해진 효율 이상의 제품을 설치하여야 한다.





//	스프링클러설비의 화재안전기준(nfsc 103) 15조 (헤드의 설치제외) 1항 13호 다목
Check(NFSC103_15_1_13_3){
	KS
}

KS{
	getBuildingUsage() = "ProcessingFactory"
	isObjectProperty(Space.hasCombustible) = FALSE
} 




Python Code 변환 예정



Modify
17
72787 건축물의 에너지절약설계기준 제 8조 2호 다 목

다. 기기배관 및 덕트는 국토교통부에서 정하는 「건축기계설비공사표준시방서」의 보온두께 이상 또는 그 이상의 열저항을 갖도록 단열조치를 하여야 한다. 다만, 건축물내의 벽체 또는 바닥에 매립되는 배관 등은 그러하지 아니할 수 있다.





//	스프링클러설비의 화재안전기준(nfsc 103) 15조 (헤드의 설치제외) 1항 14호
Check(NFSC103_15_1_14){
	KS
}

KS{
	(getBuildingUsage() = "Indoor.TennisCourts"
	OR getBuildingUsage() = "Indoor.게이트볼장"
	OR getBuildingUsage() = "Indoor.정구장")

	(getObjectProperty(Floor.InteriorFinish.Material.nonCombustibility) = TRUE
	OR getObjectProperty(Floor.InteriorFinish.Material.quasiNonCombustibility) TRUE)

	(getObjectProperty(Wall.InteriorFinish.Material.nonCombustibility) = TRUE
	OR getObjectProperty(Wall.InteriorFinish.Material.quasiNonCombustibility) TRUE)

	(getObjectProperty(Ceiling.InteriorFinish.Material.nonCombustibility) = TRUE
	OR getObjectProperty(Ceiling.InteriorFinish.Material.quasiNonCombustibility) TRUE)

	isObjectProperty(Space.hasCombustible) = FALSE
	hasSpace(Auditorium, SportsFacility) = FALSE
	getObjectProperty(Floor.number) > 0
} 




Python Code 변환 예정



Modify
18
72788 건축물의 에너지절약설계기준 제 8조 3호

3. 「공공기관 에너지이용합리화 추진에 관한 규정」제10조의 규정을 적용받는 건축물의 경우에는 별지 제1호 서식 에너지성능지표의 기계부문 11번 항목 배점을 0.6점 이상 획득하여야 한다.





//	스프링클러설비의 화재안전기준(nfsc 103) 15조 (헤드의 설치제외) 1항 15호
Check(NFSC103_15_1_15){
	KS
}

KS{
	getResult(EDBA_46_4) = TRUE
	getBuildingUsage() = "MultiUnitHouse"
	isObjectProperty(Space.isEscape) = TRUE
} 




Python Code 변환 예정



Modify
19
19468 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 10조 2 항

②영 제38조의 규정에 의하여 문화 및 집회시설중 공연장의 개별관람석(바닥면적이 300제곱미터 이상인 것에 한한다)의 출구는 다음 각호의 기준에 적합하게 설치하여야 한다.





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 10조 (관람석등으로부터의 출구의 설치기준) 2항
check(REFB_10_2){
    IF (CS) THEN KS ENDIF
}

CS{
    getBuildingUsage() = "CulturalAndAssemblyFacility.PerformanceHall"

    Space mySpace = getSpace("individualSeats")
    getFloorArea(mySpace) >= 300

KS{
    getResult(REFB_10_2_1) = TRUE
    getResult(REFB_10_2_2) = TRUE
    getResult(REFB_10_2_3) = TRUE
} 








theater_code = '00000'
std_floor_area = 300


theater_code_label = '관람석 공간분류코드'
std_floor_area_label = '기준 바닥면적'

def Check():
    for building in SELECT('building'):
        if building.SELECT('prop', '연면적').NUMBER() <= std_floor_area:
            continue

        bldg_use = building.SELECT('building type').STRING()
        sub_use = building.SELECT('prop', '세부용도').STRING()

        if not (bldg_use == '문화 및 집회시설' and sub_use == '공연장'):
            building.SUCcESS('검토 대상 건물이 아닙니다.')
            continue
        for storey in building.SELECT('storey'):
            for space in storey.SELECT('space'):
                if space.SELECT('class code').STRING() != theater_code:
                    continue
                if space.SELECT('area').UNIT(m2).NUMBER() < std_floor_area:
                    continue
                door_w_total = 0
                door_cnt = 0
                for door in space.Select('door'):
                    door_cnt += 1 
                    door_w = door.SELECT('width').Unit(m).number()
                    door_w_total += door_w
                    if door_w >= 1.5:
                        door.SUCCESS('출구의 너비' + door_w +'>= 1.5m')
                    else:
                        door.ERROR('출구의 너비' + door_w +'< 1.5m')
                min_door_w_total = space.SELECT('area').UNIT(m2).NUMBER()
                min_door_w_total = min_door_w_total/100*0.6
                if door_w_total >= min_door_w_total :
                    space.SUCCESS('출구의 너비의 총합' + door_w_total +'>='+ min_door_w_total)
                else:
                    space.ERROR('출구의 너비의 총합' + door_w_total +'<' + min_door_w_total)
                if door_cnt >= 2:
                    space.SUCCESS('출구의 개수' + door_w_total +'>='+ '2')
                else:
                    space.ERROR('출구의 개수' + door_w_total +'<'+ '2')
 





Modify
20
25219 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 11조 2 항

②영 제39조제1항에 따라 건축물의 바깥쪽으로 나가는 출구를 설치하는 건축물중 문화 및 집회시설(전시장 및 동·식물원을 제외한다), 종교시설, 장례식장 또는 위락시설의 용도에 쓰이는 건축물의 바깥쪽으로의 출구로 쓰이는 문은 안여닫이로 하여서는 아니된다. <개정 2010.4.7>





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 11조 (건축물의 바깥쪽으로의 출구의 설치기준) 2항



Check(REFB_11_2){
     

IF CS1 AND CS2 THEN KS


}





CS1 {

Building myBuilding{

getBuildingUsage() = “CulturalAndAssemblyFacility”

OR getBuildingUsage() = “ReligiousFacility”

OR getBuildingUsage() = “AmusementFacility”

OR getBuildingUsage() = “FuneralParlor”

getBuildingUsage() != “ExhibitionHall”

getBuildingUsage() != “ZoologicalAndBotanicalGarden”

}



Door myDoor{

isObjectProperty(myBuilding.Door.isEntrance)=TRUE

}

isExist(myDoor) = TRUE

}



KS {

getObjectProperty(myDoor.panelOperationType) != “OpeningInDoor”



} 




Python Code 변환 예정



Modify
21
25220 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 11조 3 항

③영 제39조제1항의 규정에 의하여 건축물의 바깥쪽으로 나가는 출구를 설치하는 경우 관람석의 바닥면적의 합계가 300제곱미터 이상인 집회장 또는 공연장에 있어서는 주된 출구외에 보조출구 또는 비상구를 2개소 이상 설치하여야 한다.





// 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 11조 (건축물의 바깥쪽으로의 출구의 설치기준) 3항

Check(REFB_11_3){
     

IF CS1 AND CS2 THEN KS


}





CS1 {

Building myBuilding{

getBuildingUsage() = “AssemblyHall”

OR getBuildingUsage() = “PerformanceHall”

}



Space mySpace{

myBuilding.Space.name = “Auditorium”

Space.FloorSlab.area >= 300 m2

}



isExist(mySpace) = TRUE

}



CS2 {

Door myDoor{

isObjectProperty(Door.isEntrance)=TRUE

}

hasObject(myBuilding,myDoor) = TRUE

}



KS {

Door myDoor{

getObjectProperty(Door.functionType) = "Auxiliary"

OR getObjectProperty(Door.functionType) = "Emergency" 

}



getObjectCount(myDoor) >=2

} 




Python Code 변환 예정



Modify
22
25223 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 11조 5 항 1호

1. 제1종 근린생활시설 중 지역자치센터·파출소·지구대·소방서·우체국·방송국·보건소·공공도서관·지역건강보험조합 기타 이와 유사한 것으로서 동일한 건축물안에서 당해 용도에 쓰이는 바닥면적의 합계가 1천제곱미터 미만인 것





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 11조 (건축물의 바깥쪽으로의 출구의 설치기준) 5항 1호

Check(REFB_11_5_1){
      

KS




}

KS {

Building myBuilding{

getBuildingUsage() = “ClassINeighborhoodLivingFacility.CommunityCenter”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.PoliceBox”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.PoliceSubstation”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.FireStation”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.PostOffice”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.BroadcastingStation”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.HealthCenter”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.PublicLibrary”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.RegionalHealthInsuranceAssociation”



}



Space mySpace{

Space.usage=“CommunityCenter”

Space.usage=“PoliceBox”

Space.usage=“PoliceSubstation”

Space.usage=“FireStation”

Space.usage=“PostOffice”

Space.usage=“BroadcastingStation”

Space.usage=“HealthCenter”

Space.usage=“PublicLibrary”

Space.usage=“RegionalHealthInsuranceAssociation”

Space.FloorSlab.area < 1000 m2

}

isExist(myBuilding) = TRUE

isExist(mySpace) = TRUE

} 




Python Code 변환 예정



Modify
23
25224 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 11조 5 항 2호

2. 제1종 근린생활시설 중 마을회관·마을공동작업소·마을공동구판장·변전소·양수장·정수장·대피소·공중화장실 기타 이와 유사한 것





건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 11조 (건축물의 바깥쪽으로의 출구의 설치기준) 5항 2호

Check(REFB_11_5_2){
      

KS


}





KS {

Building myBuilding{

getBuildingUsage() = “ClassINeighborhoodLivingFacility.VillageHall”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.CommunityWorkspace”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.CommunitySalesShop”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.Substation”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.PumpingStation”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.PurificationPlant”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.Shelter”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.PublicLibrary”

OR getBuildingUsage() = “ClassINeighborhoodLivingFacility.PublicToilet”



}



isExist(myBuilding) = TRUE

} 




Python Code 변환 예정



Modify
24
25225 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 11조 5 항 3호

3. 연면적이 5천제곱미터 이상인 판매시설, 운수시설





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 11조 (건축물의 바깥쪽으로의 출구의 설치기준) 5항 3호
Check(REFB_11_5_3){
KS
}

KS {
getBuildingUsage() = “CommercialFacility”
OR getBuildingUsage() = “TransportationFacility”
getObjectProperty(Building.grossFloorArea) >= 5000 m2

}
 




Python Code 변환 예정



Modify
25
25226 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 11조 5 항 4호

4. 교육연구시설 중 학교





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 11조 (건축물의 바깥쪽으로의 출구의 설치기준) 5항 4호

Check(REFB_11_5_4){
     

KS


}





KS {

Building myBuilding{

getBuildingUsage() = “EducationAndResearchFacility.School”

}



isExist(myBuliding) = TRUE

} 




Python Code 변환 예정



Modify
26
25227 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 11조 5 항 5호

5. 업무시설중 국가 또는 지방자치단체의 청사와 외국공관의 건축물로서 제1종 근린생활시설에 해당하지 아니하는 것





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 11조 (건축물의 바깥쪽으로의 출구의 설치기준) 5항 5호

Check(REFB_11_5_5){
      

KS


}





KS {

Building myBuilding{

getBuildingUsage() = “BusinessFacility.GovernmentOfficeBuilding”

OR getBuildingUsage() = “BusinessFacility.ForeignOfficialResidence”

getBuildingUsage() != “ClassINeighborhoodLivingFacility”

}



isExist(myBuilding) = TRUE

} 




Python Code 변환 예정



Modify
27
25266 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 15조 2 항 1호

1. 초등학교의 계단인 경우에는 계단 및 계단참의 너비는 150센티미터 이상, 단높이는 16센티미터 이하, 단너비는 26센티미터 이상으로 할 것





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 15조 (계단의 설치기준) 2항1호
check(REFB_15_2_1){
     IF CS THEN KS
}

CS{
      getBuildingUsage()="ElementarySchool"
}

KS{
      getObjectWidth(Stair)>= 150 cm
      getObjectWidth(StairLanding)>150 cm
      getObjectProperty(Stair.riserHeight)>=16 cm
      getObjectProperty(Stair.riserWidth)>=26 cm
} 










def Check():
    for building in SELECT('building'):

        bldg_use = building.SELECT('building type').STRING()
        sub_use = building.SELECT('prop', '세부용도').STRING()
        min_clear_w = 0.6
        max_riser_h = 0.0
        min_tread_w = 0.0

        if bldg_use == '교육연구시설':
            min_clear_w = 1.5            
            min_tread_w = 0.26
            if sub_use == '초등학교':
                max_riser_h = 0.16
            elif sub_use in ['중학교', '고등학교']:
                max_riser_h = 0.18
        elif (bldg_use == '문화 및 집회시설' and sub_use in ['공연장', '집회장', '관람장']) or (bldg_use == '판매시설'):
            min_clear_w = 1.2
        else:
            min_clear_w = 0.6 
        
        for storey in building.SELECT('storey'):
            for stair in storey.SELECT('stair'):
                clear_width = stair.SELECT('clear width').UNIT('m')
                clear_w = clear_width.NUMBER()
                
                if clear_w < min_clear_w:
                    clear_width.ERROR('유효너비: ' + str(clear_w) + ' < ' + str(min_clear_w))
                else:
                    clear_width.SUCCESS('유효너비: ' + str(clear_w) + ' >= ' + str(min_clear_w))

                if max_riser_h > 0:
                    for riser_height in stair.SELECT('riser height'):
                        riser_h = riser_height.UNIT('m').NUMBER()

                        if riser_h > max_riser_h:
                            riser_height.ERROR('단높이: ' + str(riser_h) + ' > ' + str(max_riser_h))
                            break

                if min_tread_w > 0:
                    for tread_width in stair.SELECT('tread width'):
                        tread_w = tread_width.UNIT('m').NUMBER()

                        if tread_w < min_tread_w:
                            tread_width.ERROR('단너비: ' + str(tread_w) + ' < ' + str(min_tread_w))
                            break 





Modify
28
25267 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 15조 2 항 2호

2. 중·고등학교의 계단인 경우에는 계단 및 계단참의 너비는 150센티미터 이상, 단높이는 18센티미터 이하, 단너비는 26센티미터 이상으로 할 것





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 15조 (계단의 설치기준) 2항2호
check(REFB_15_2_2){
     IF CS THEN KS
}

CS{
       getBuildingUsage()="MiddleSchool"
       OR getBuildingUsage()="HighSchool"
}

KS{
      getObjectWidth(Stair)>=150 cm
      getObjectWidth(StairLanding)>150 cm
      getObjectProperty(Stair.riserHeight)>=18 cm
      getObjectProperty(Stair.riserWidth)>=26 cm
} 










def Check():
    for building in SELECT('building'):

        bldg_use = building.SELECT('building type').STRING()
        sub_use = building.SELECT('prop', '세부용도').STRING()
        min_clear_w = 0.6
        max_riser_h = 0.0
        min_tread_w = 0.0

        if bldg_use == '교육연구시설':
            min_clear_w = 1.5            
            min_tread_w = 0.26
            if sub_use == '초등학교':
                max_riser_h = 0.16
            elif sub_use in ['중학교', '고등학교']:
                max_riser_h = 0.18
        elif (bldg_use == '문화 및 집회시설' and sub_use in ['공연장', '집회장', '관람장']) or (bldg_use == '판매시설'):
            min_clear_w = 1.2
        else:
            min_clear_w = 0.6 
        
        for storey in building.SELECT('storey'):
            for stair in storey.SELECT('stair'):
                clear_width = stair.SELECT('clear width').UNIT('m')
                clear_w = clear_width.NUMBER()
                
                if clear_w < min_clear_w:
                    clear_width.ERROR('유효너비: ' + str(clear_w) + ' < ' + str(min_clear_w))
                else:
                    clear_width.SUCCESS('유효너비: ' + str(clear_w) + ' >= ' + str(min_clear_w))

                if max_riser_h > 0:
                    for riser_height in stair.SELECT('riser height'):
                        riser_h = riser_height.UNIT('m').NUMBER()

                        if riser_h > max_riser_h:
                            riser_height.ERROR('단높이: ' + str(riser_h) + ' > ' + str(max_riser_h))
                            break

                if min_tread_w > 0:
                    for tread_width in stair.SELECT('tread width'):
                        tread_w = tread_width.UNIT('m').NUMBER()

                        if tread_w < min_tread_w:
                            tread_width.ERROR('단너비: ' + str(tread_w) + ' < ' + str(min_tread_w))
                            break 





Modify
29
25268 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 15조 2 항 3호

3. 문화 및 집회시설(공연장·집회장 및 관람장에 한한다)·판매시설 기타 이와 유사한 용도에 쓰이는 건축물의 계단인 경우에는 계단 및 계단참의 너비를 120센티미터 이상으로 할 것





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 15조 (계단의 설치기준) 2항3호
check(REFB_15_2_3){
     IF CS THEN KS 
}

CS{
      getBuildingUsage()= "CulturalAndAssemblyFacility.PerformanceHall"
      OR getBuildingUsage()= "CulturalAndAssemblyFacility.AssemblyHall"
      OR getBuildingUsage()= "CulturalAndAssemblyFacility.Auditorium"
      OR getBuildingUsage()= "CommercialFacility "
}

KS{
     getObjectWidth(Stair)>=120 cm
     getObjectWidth(StairLanding)>=120 cm
}
 










def Check():
    for building in SELECT('building'):

        bldg_use = building.SELECT('building type').STRING()
        sub_use = building.SELECT('prop', '세부용도').STRING()
        min_clear_w = 0.6
        max_riser_h = 0.0
        min_tread_w = 0.0

        if bldg_use == '교육연구시설':
            min_clear_w = 1.5            
            min_tread_w = 0.26
            if sub_use == '초등학교':
                max_riser_h = 0.16
            elif sub_use in ['중학교', '고등학교']:
                max_riser_h = 0.18
        elif (bldg_use == '문화 및 집회시설' and sub_use in ['공연장', '집회장', '관람장']) or (bldg_use == '판매시설'):
            min_clear_w = 1.2
        else:
            min_clear_w = 0.6 
        
        for storey in building.SELECT('storey'):
            for stair in storey.SELECT('stair'):
                clear_width = stair.SELECT('clear width').UNIT('m')
                clear_w = clear_width.NUMBER()
                
                if clear_w < min_clear_w:
                    clear_width.ERROR('유효너비: ' + str(clear_w) + ' < ' + str(min_clear_w))
                else:
                    clear_width.SUCCESS('유효너비: ' + str(clear_w) + ' >= ' + str(min_clear_w))

                if max_riser_h > 0:
                    for riser_height in stair.SELECT('riser height'):
                        riser_h = riser_height.UNIT('m').NUMBER()

                        if riser_h > max_riser_h:
                            riser_height.ERROR('단높이: ' + str(riser_h) + ' > ' + str(max_riser_h))
                            break

                if min_tread_w > 0:
                    for tread_width in stair.SELECT('tread width'):
                        tread_w = tread_width.UNIT('m').NUMBER()

                        if tread_w < min_tread_w:
                            tread_width.ERROR('단너비: ' + str(tread_w) + ' < ' + str(min_tread_w))
                            break 





Modify
30
25272 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 15조 3 항

③공동주택(기숙사를 제외한다)·제1종 근린생활시설·제2종 근린생활시설·문화 및 집회시설·종교시설·판매시설·운수시설·의료시설·노유자시설·업무시설·숙박시설·위락시설 또는 관광휴게시설의 용도에 쓰이는 건축물의 주계단·피난계단 또는 특별피난계단에 설치하는 난간 및 바닥은 아동의 이용에 안전하고 노약자 및 신체장애인의 이용에 편리한 구조로 하여야 하며, 양쪽에 벽등이 있어 난간이 없는 경우에는 손잡이를 설치하여야 한다. <개정 2010.4.7>





check(REFB_15_3){

     IF CS THEN KS

}



CS{

       getBuildingUsage()= "ClassINeighborhoodLivingFacility"

OR getBuildingUsage() = "ClassIINeighborhoodLivingFacility"

OR getBuildingUsage() = "CulturalAndAssemblyFacility"

OR getBuildingUsage() = "ReligiousFacility"

OR getBuildingUsage() = "CommercialFacility"

OR getBuildingUsage() = "TransportationFacility"

OR getBuildingUsage() = "MedicalFacility"

OR getBuildingUsage() = "FacilitiesForTheAgedAndChildren"

OR getBuildingUsage() = "BusinessFacility"

OR getBuildingUsage() = "LodgingFacility"

OR getBuildingUsage() = "AmusementFacility"

OR getBuildingUsage() = "FacilityForTourismAndRelaxation"

OR (getBuildingUsage() = "MultiUnitHouse" AND getBuildingUsage() != "Dormitory")

}



KS{

       isExist(Railing)=TRUE 

       OR (isExist(Railing)=FALSE AND isExist(Handle)=TRUE) 

} 




Python Code 변환 예정



Modify
31
25295 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 16조 2 항

②문화 및 집회시설(전시장 및 동·식물원은 제외한다), 종교시설, 장례식장 또는 위락시설 중 유흥주점의 용도에 쓰이는 건축물의 관람석 또는 집회실로서 그 바닥면적이 200제곱미터 이상인 것의 반자의 높이는 제1항의 규정에 불구하고 4미터(노대의 아랫부분의 높이는 2.7미터)이상이어야 한다. 다만, 기계환기장치를 설치하는 경우에는 그러하지 아니하다. <개정 2010.4.7>





// 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 16조 (거실의 반자높이) 2항

check(REFB_16_2){

IF (CS1 AND CS2) THEN KS

}



CS1{



VentilatorEquipment myVentilatorEquipemnt{

isObjectProperty(VentilatorEquipment.isMechanical)=TRUE

}

	isExist(myVentilatorEquipemn) = FALSE 

}



CS2{

	Space mySpace{

		getSpaceUsage(Space) = “Auditorium”

		OR getSpaceUsage(Space) = “AssemblyHall”

	}



	((getBuildingUsage() = “CulturalAndAssemblyFacilities.Tavern”

	getBuildingUsage() != “ExhibitionHalls.Tavern”

	getBuildingUsage() != “ZoologicalAndBotanicalGardens.Tavern”)

	OR getBuildingUsage() = "ReligiousFacilities.Tavern” 








target_space_codes = ['33703', '33708']
min_h = 4.0
min_h_bal = 2.7
target_space_codes_label = '대상 공간분류코드'
min_h_label = '최소 반자 높이'
min_h_bal_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 not sub_use in ['전시장', '동물원', '식물원'])
                or (bldg_use in ['종교시설', '장례시설'])
                or (bldg_use == '위락시설' and sub_use == '유흥주점')):
            continue
        spaces = building.SELECT('space');

        for space in spaces:
            code = space.SELECT('class code').STRING()
            if not code in target_space_codes:
                continue
            area = space.SELECT('area').UNIT('m2').NUMBER()
            if area < 200:
                continue

            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))

        for space in spaces:
            if not '노대' in space.SELECT('name').STRING():
                continue
            for lower in space.SELECT('lower space'):
                code = lower.SELECT('class code').STRING()
                if not code in target_space_codes:
                    continue
                area = lower.SELECT('area').UNIT('m2').NUMBER()
                if area < 200:
                    continue
                pos = space.SELECT('center')
                dist = lower.SELECT('ceiling height', pos)
                height = dist.UNIT('m').NUMBER()
                if height < min_h_bal:
                    dist.ERROR('반자 높이 : ' + str(height) + ' < ' + str(min_h_bal))
                else:
                    dist.SUCCESS('반자 높이 : ' + str(height) + ' >= ' + str(min_h_bal)) 





Modify
32
25304 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 18조 2 항 1호

1. 제1종 근린생활시설중 목욕장의 욕실과 휴게음식점의 조리장





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 18조 (거실등의방습) 2항1호





Check(REFB_18_2_1){

KS

}







KS{

Space mySpace1{
getSpaceUsage() = "Bathroom"
}
Space mySpace2{
getSpaceUsage() = "Kitchen"
}

getBuildingUsage(mySpace1.Building) = "ClassINeighborhoodLivingFacility.BathHouse"
OR 
 getBuildingUsage(mySpace2.Building) = "ClassINeighborhoodLivingFacility.RestingRestaurant"


} 




Python Code 변환 예정



Modify
33
25305 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 18조 2 항 2호

2. 제2종 근린생활시설중 일반음식점 및 휴게음식점의 조리장과 숙박시설의 욕실





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 18조 (거실등의 방습) 2항 2호



Check(REFB_18_2_2){

KS

}



KS{

Space mySpace1{
getSpaceUsage() = "Kitchen"
}
Space mySpace2{
getSpaceUsage() = "Bathroom"
}

getBuildingUsage(mySpace1.Building) = "ClassINeighborhoodLivingFacility.Restarant"
OR 
 getBuildingUsage(mySpace2.Building) = "ClassINeighborhoodLivingFacility.LodgingFacilities"

} 




Python Code 변환 예정



Modify
34
25338 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 25조 1 항 1의2호

1의2. 제2종근린생활시설 중 공연장·단란주점·당구장·노래연습장, 문화 및 집회시설중 예식장·공연장, 수련시설 중 생활권수련시설·자연권수련시설, 숙박시설중 여관·여인숙, 위락시설중 단란주점·유흥주점 또는 「다중이용업소의 안전관리에 관한 특별법 시행령」 제2조에 따른 다중이용업의 용도에 쓰이는 층으로서 그 층의 거실의 바닥면적의 합계가 50제곱미터 이상인 건축물에는 직통계단을 2개소 이상 설치할 것





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 25조 (지하층의 구조) 1항 1의2호
check(REFB_25_1_1-2){
	IF CS THEN KS
}

CS{
	(getBuildingUsage() = "ClassIINeighborhoodLivingFacility.PerformanceHall"
	OR getBuildingUsage() = "ClassIINeighborhoodLivingFacility.Pubs"
	OR getBuildingUsage() = "ClassIINeighborhoodLivingFacility.BilliardRoom"
	OR getBuildingUsage() = "ClassIINeighborhoodLivingFacility.Karaoke"
	OR getBuildingUsage() = "CulturalAndAssemblyFacility.WeddingHall"
	OR getBuildingUsage() = "CulturalAndAssemblyFacility.PerformanceHall"
	OR getBuildingUsage() = "TrainingFacility.TrainingFacilityInLivingZone"
	OR getBuildingUsage() = "TrainingFacility.??LivingZone"
	OR getBuildingUsage() = "LodgingFacility.Inn"
	OR getBuildingUsage() = "AmusementFacility.Pubs"
	OR getBuildingUsage() = "AmusementFacility.Tavern"
	OR getResult(ERSASP_2) = TRUE)

	getTotalFloorArea(Room) >= 50 m2
}

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

	getObjectCount(myStair) >= 2
} 




Python Code 변환 예정



Modify
35
25342 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 25조 2 항

②제1항제1호에 따른 지하층의 비상탈출구는 다음 각호의 기준에 적합하여야 한다. 다만, 주택의 경우에는 그러하지 아니하다. <개정 2000.6.3, 2010.4.7>





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 25조 (지하층의 구조) 2항
check(REFB_25_2){
	IF !(CS) THEN KS
}

CS{
	getBuildingUsage() = "House"
}

KS{
	getResult(REFB_25_2_1) = TRUE
	getResult(REFB_25_2_2) = TRUE
	getResult(REFB_25_2_3) = TRUE
	getResult(REFB_25_2_4) = TRUE
	getResult(REFB_25_2_5) = TRUE
	getResult(REFB_25_2_7) = TRUE
} 




Python Code 변환 예정



Modify
36
25504 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 15조 7 항 1호

1. 공동주택: 120센티미터 이상





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 15조 (계단의 설치기준) 7항 1호
check(REFP_15_7_1){
     KS
}

KS{
      getBuildingUsage() = "MultiUnitHouse"
      AND getStairStepWidth >= 1.2M
      AND getPaceWidth >= 1.2M
} 









min_stair_width = 1.5

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()

        if bldg_type is "공통주택":
            min_stair_width = 1.2
        else :
            min_stair_width = 1.5

        d_stairs = building.SELECT('direct stair')

        for d_stair in d_stairs:
            s_stair_w = d_stair.SELECT('width').Unit(m)

            breker = True
            for stair_stories in  d_stair.SELECT('storey'):
                if stair_stories.SELECT('is evacuation storey').BOOL() is True :
                    break
                elif stair_stories.SELECT('level') is "Ground" :
                    break
                else:
                    breaker = False
            if breaker is True:
                d_stair.SUCCESS('해당계단은 피난층이나 지상으로 통하는 직통계단이 아닙니다.')
                break
            if d_stair_w >= min_stair_width:
                d_stair.SUCCESS('계단의너비()' + d_stair_w + ')가 '  + '>=' + min_stair_width)
            else:
                d_stair.ERROR('계단의너비()' + d_stair_w + ')가 '  + '<' + min_stair_width)                
                
                 





Modify
37
25505 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 15조 7 항 2호

2. 공동주택이 아닌 건축물: 150센티미터 이상





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 15조 (계단의 설치기준) 7항 2호
check(REFP_15_7_2){
     KS
}

KS{
      getBuildingUsage() != "MultiUnitHouse"
      AND getStairStepWidth >= 1.5M
      AND getPaceWidth >= 1.5M
} 









min_stair_width = 1.5

def Check():
    for building in SELECT('building'):
        bldg_type = building.SELECT('building type').STRING()
        sub_type = building.SELECT('prop', '세부용도').STRING()

        if bldg_type is "공통주택":
            min_stair_width = 1.2
        else :
            min_stair_width = 1.5

        d_stairs = building.SELECT('direct stair')

        for d_stair in d_stairs:
            s_stair_w = d_stair.SELECT('width').Unit(m)

            breker = True
            for stair_stories in  d_stair.SELECT('storey'):
                if stair_stories.SELECT('is evacuation storey').BOOL() is True :
                    break
                elif stair_stories.SELECT('level') is "Ground" :
                    break
                else:
                    breaker = False
            if breaker is True:
                d_stair.SUCCESS('해당계단은 피난층이나 지상으로 통하는 직통계단이 아닙니다.')
                break
            if d_stair_w >= min_stair_width:
                d_stair.SUCCESS('계단의너비()' + d_stair_w + ')가 '  + '>=' + min_stair_width)
            else:
                d_stair.ERROR('계단의너비()' + d_stair_w + ')가 '  + '<' + min_stair_width)                
                
                 





Modify
38
25529 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 29조

제29조(피난용승강기의 설치 및 구조)





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 29조 (피난용승강기의 설치 및 구조) 1항 



Check(REFB_29_1){

   IF (!CS1 AND CS2)THEN KS 

}



CS1{



   Building myBuilding{

         isObjectProperty(Building.isQuasiHighriseBuilding )=True

   }



    getBuildingUsage()="myBuilding.MultiUnitHouse"

}

CS2{

    isObjectProperty(Building.isHighBuilding) = TRUE

}

KS{

   getResult(REFB_30)=True

   getResult(REFB_29_2)=True

} 




Python Code 변환 예정



Modify
39
25587 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 24조의2조 1 항

①영 제61조제1항제4호가목 및 제2항제1호나목에서 "국토교통부령으로 정하는 화재위험이 적은 공장"이란 각각 별표 3의 업종에 해당하는 공장을 말한다. 다만, 공장의 일부 또는 전체를 기숙사 및 구내식당의 용도로 사용하는 건축물을 제외한다. <개정 2008.3.14, 2010.12.30, 2012.1.6, 2013.3.23>





// 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 24조의2 (소규모 공장용도 건축물의 마감재료) 1항

check(REFB_24-2_1){

      KS

}

KS{

	getResult(REFB_*_3) = TRUE

	(getBuildingUsage() != "Dormitory"

	OR getBuildingUsage() != "Cafeteria"

	OR getSpaceUsage() != "Dormitory"

	OR getSpaceUsage() != "Cafeteria")

} 




Python Code 변환 예정



Modify
40
25610 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 15조의2조 1 항

①영 제48조의 규정에 의하여 건축물에 설치하는 복도의 유효너비는 다음 표와 같이 하여야 한다 img30607976 ┌───────────────┬────────────┬──────┐ │구분 │양옆에 거실이 있는 복도 │기타의 복도 │ ├───────────────┼────────────┼──────┤ │유치원ㆍ초등학교 │2.4미터 이상 │1.8미터 이상│ │중학교ㆍ고등학교 │ │ │ ├───────────────┼────────────┼──────┤ │공동주택ㆍ오피스텔 │1.8미터 이상 │1.2미터 이상│ ├───────────────┼────────────┼──────┤ │당해 층 거실의 바닥면적 │1.5미터 이상(의료시설의 │1.2미터 이상│ │합계가 200제곱미터 이상인 경우│복도 1.8미터 이상) │ │ └───────────────┴────────────┴──────┘





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 15조의2 (복도의 너비 및 설치기준) 1항
Check(EDBA_15-2_1){
    IF getBuildingUsage()="Kindergarten"
       OR getBuildingUsage()="ElementarySchool"
       OR getBuildingUsage()="MiddleSchool"
       OR getBuildingUsage()="HightSchool"
       THEN IF isExternal(Corridor)=FALSE
             THEN getObjectProperty(Corridor.effectiveWidth)>2.4 m   
     ELSE THEN  getObjectProperty(Corridor.effectiveWidth)>1.8 m
            END IF
     END IF  


     IF getBuildingUsage()="MultiUnitHouse"
       OR getBuildingUsage()="Officetel"
       THEN IF isExternal(Corridor)=FALSE
             THEN getObjectProperty(Corridor.effectiveWidth)>1.8 m
            ELSE THEN  getObjectProperty(Corridor.effectiveWidth)>1.2 m
            END IF
     END IF  


     IF getTotalFloorArea(Corridor.Floor.Room)>200 m2 
     THEN IF isExternal(Corridor)=FALSE
             THEN IF getBuildingUsage()="MedicalFacilities"
                       THEN getObjectProperty(Corridor.effectiveWidth)>1.8 m
                  ELSE THEN getObjectProperty(Corridor.effectiveWidth)>1.5 m
                  END IF
          ELSE THEN  getObjectProperty(Corridor.effectiveWidth)>1.2 m
          END IF
     END IF  
} 




Python Code 변환 예정



Modify
41
25611 건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 제 15조의2조 2 항

②문화 및 집회시설(공연장ㆍ집회장ㆍ관람장ㆍ전시장에 한한다), 종교시설 중 종교집회장, 노유자시설 중 아동 관련 시설ㆍ노인복지시설, 수련시설 중 생활권수련시설, 위락시설 중 유흥주점 및 장례식장의 관람석 또는 집회실과 접하는 복도의 유효너비는 제1항의 규정에 불구하고 다음 각 호에서 정하는 너비로 하여야 한다. <개정 2010.4.7>





//건축물의 피난ㆍ방화구조 등의 기준에 관한 규칙 15조의2 (복도의 너비 및 설치기준) 2항

check(REFB_15-2_2){

     IF CS THEN KS 

}



CS{

Space  mySpace{

getSpaceUsage(Space) = “AssemblyHall”

OR getSpaceUsage(Space) = “PerformanceHall”

}

    Corridor myCorridor{

       isAdjacent(mySpace,Corridor) = TRUE

    }



    (getBuildingUsage()="CulturalAndAssemblyFacility.PerformanceHall"

    OR getBuildingUsage()="CulturalAndAssemblyFacility.AssemblyHall"

    OR getBuildingUsage()="CulturalAndAssemblyFacility.Auditorium"

    OR getBuildingUsage()="CulturalAndAssemblyFacility.ExhibitionHall"

    OR getBuildingUsage()="ReligiousFacility.ReligiousAssemblyFacility"

    OR getBuildingUsage()="FacilitiesForTheAgedAndChildren.ChildrenRelatedFacility"

    OR getBuildingUsage()="FacilitiesForTheAgedAndChildren.WelfareFacilityForTheAged"

    OR getBuildingUsage()="Trainingfacility.TrainingFacilitiesInLiving "

    OR getBuildingUsage()="AmusementFacility.tavern"

    OR getBuildingUsage()="AmusementFacility.FuneralParlors" )

     

    isExist(myCorridor)=TRUE   

}



KS{



 

   getResult(REFB_15-2_2_1)=TRUE

   getResult(REFB_15-2_2_2)=TRUE

   getResult(REFB_15-2_2_3)=TRUE

} 








corridor_code = '33105'
std_floor_area = 200

corridor_code_label = '복도 공간분류코드'
std_floor_area_label = '기준 연면적'

def Check():
    for building in SELECT('building'):
        if building.SELECT('prop', '연면적').NUMBER() <= std_floor_area:
            continue

        bldg_use = building.SELECT('building type').STRING()
        sub_use = building.SELECT('prop', '세부용도').STRING()
        if not ((bldg_use == '문화 및 집회시설' and sub_use in ['공연장' ,'집회장', '관람장', '전시장'])
            or (bldg_use == '종교시설' and sub_use == '종교집회장')
            or (bldg_use == '노유자시설' and sub_use in ['아동관련시설' ,'노인복지시설'])
            or (bldg_use == '수련시설' and sub_use == '생활권수련시설')
            or (bldg_use == '위락시설' and sub_use == '유흥주점')
            or (bldg_use == '장례시설' and sub_use == '장례식장')):
            continue

        for storey in building.SELECT('storey'):
            area = 0.0
            corridors = []
            for space in storey.SELECT('space'):
                if space.SELECT('class code').STRING() == corridor_code:
                    corridors.append(space)
                
                area += space.SELECT('area').UNIT('m2').NUMBER()
            
            min_cor_w = 1.8
            if area < 500:
                min_cor_w = 1.5
            elif area >= 1000:
                min_cor_w = 2.4

            for space in corridors:    
                width = space.SELECT('min clear width').UNIT('m')
                w = width.NUMBER()

                if w < min_cor_w:
                    width.ERROR('유효너비: ' + str(w) + ' < ' + str(min_cor_w))
                else:
                    width.SUCCESS('유효너비: ' + str(w) + ' >= ' + str(min_cor_w)) 





Modify
42
19640 건축법 시행령 제 38조 1호

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





//건축법 시행령 38조(관람석 등으로부터의 출구 설치) 1호
Check(EDBA_38_0_1){
     (getBuildingUsage() = "ClassIINeighborhoodLivingFacility.performancehall"
     OR getBuildingUsage() = "ClassIINeighborhoodLivingFacility.ReligiousAssemblyFacility")

     Space mySpace {
          getSpaceUsage(Space) = "ClassIINeighborhoodLivingFacility.performancehall"
          OR getSpaceUsage(Space) = "ClassIINeighborhoodLivingFacility.ReligiousAssemblyFacility"
     }

     getTotalFloorArea(mySpace) > 300
}

 








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
43
19643 건축법 시행령 제 38조 4호

4. 위락시설





//건축법 시행령 38조(관람석 등으로부터의 출구 설치) 4호
Check(EDBA_38_0_4){
    getBuildingUsage() = "AmusementFacility"
} 








identified_space_codes =['위락시설']
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
44
19644 건축법 시행령 제 38조 5호

5. 장례식장





//건축법 시행령 38조(관람석 등으로부터의 출구 설치) 3호
Check(EDBA_38_0_5){
    getBuildingUsage() = "FuneralParlor"
} 








identified_space_codes =['장례시설']
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
45
19722 건축법 시행령 제 53조 2 항 1호

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





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

Check(EDBA_53_2_1){
   KS
}

KS{
   getBuildingUsage()="DetachedHouse.MultiFamilyHouse"
}  




Python Code 변환 예정



Modify
46
19724 건축법 시행령 제 53조 2 항 3호

3. 업무시설 중 오피스텔





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

Check(EDBA_53_2_3){
   KS
}

KS{
   getBuildingUsage()="BusinessFacility.Officetel"
   
}  




Python Code 변환 예정



Modify
47
19725 건축법 시행령 제 53조 2 항 4호

4. 제2종 근린생활시설 중 다중생활시설





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

Check(EDBA_53_2_4){
   KS
}

KS{
   getBuildingUsage()="ClassIINeighborhoodLivingFacility.CommunalLivingFacility"
   
}  




Python Code 변환 예정



Modify
48
19726 건축법 시행령 제 53조 2 항 5호

5. 숙박시설 중 다중생활시설





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

Check(EDBA_53_2_5){
   KS
}

KS{
   getBuildingUsage()="LodgingFacility.CommunalLivingFacility"
   
}  




Python Code 변환 예정



Modify
49
19739 건축법 시행령 제 58조 2호

2. 도매시장의 용도로 쓰는 건축물로서 그 주요구조부가 불연재료로 된 것





check(EDBA_58_0_2){

	getBuildingUsage() < "WholeSale Market"

	isFireResistantStructure(MainStructure) = TRUE

} 




Python Code 변환 예정



Modify
50
19756 건축법 시행령 제 80조 1호

1. 주거지역: 60제곱미터





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

Check(EDBA_80_1){
     IF CS THEN KS
}
CS{
	getBuildingUsage() = "ResidentialArea"
}
KS{
	getObjectProperty(Building.Site.area) >= 60m2
} 




Python Code 변환 예정



Modify
51
19757 건축법 시행령 제 80조 2호

2. 상업지역: 150제곱미터






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

Check(EDBA_80_2){
     IF CS THEN KS
}
CS{
	getBuildingUsage() = "CommercialArea"
}
KS{
	getObjectProperty(Building.Site.area) >= 150m2
} 




Python Code 변환 예정



Modify
52
19758 건축법 시행령 제 80조 3호

3. 공업지역: 150제곱미터





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

Check(EDBA_80_3){
     IF CS THEN KS
}
CS{
	getBuildingUsage() = "IndustrialArea"
}
KS{
	getObjectProperty(Building.Site.area) >= 150m2
} 




Python Code 변환 예정



Modify
53
19759 건축법 시행령 제 80조 4호

4. 녹지지역: 200제곱미터





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

Check(EDBA_80_4){
     IF CS THEN KS
}
CS{
	getBuildingUsage() = "GreenArea"
}
KS{
	getObjectProperty(Building.Site.area) >= 200m2
}
 




Python Code 변환 예정



Modify
54
19760 건축법 시행령 제 80조 5호

5. 제1호부터 제4호까지의 규정에 해당하지 아니하는 지역: 60제곱미터





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

Check(EDBA_80_5){
     IF CS THEN KS
}
CS{
	getBuildingUsage() != "ResidentialArea"
	getBuildingUsage() != "CommercialArea"	
	getBuildingUsage() != "IndustrialArea"
	getBuildingUsage() != "GreenArea"
}
KS{
	getObjectProperty(Building.Site.area) >= 60m2
} 




Python Code 변환 예정



Modify
55
31644 건축법 시행령 제 61조 1 항 3호

3. 위험물저장 및 처리시설(자가난방과 자가발전 등의 용도로 쓰는 시설을 포함한다), 자동차 관련 시설, 방송통신시설 중 방송국ㆍ촬영소 또는 발전시설의 용도로 쓰는 건축물





Check(EDBA_61_1_3){
KS}


KS{
getBuildingUsage()="FacilityForStorageAndTreatmentOfDangerousSubstance"
OR getBuildingUsage()="FacilityForMotorVehicle"
OR (getBuildingUsage()="FacilityForBroadcastingAndTelecommunication.BroadcastingStation"
OR getBuildingUsage()="FacilityForBroadcastingAndTelecommunication.Studio"
OR getBuildingUsage()="FacilityForBroadcastingAndTelecommunication.PowerPlant"
} 




Python Code 변환 예정



Modify
56
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
57
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
58
33196 건축법 시행령 제 51조 2 항 1호 나 목

나. 문화 및 집회시설





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




Python Code 변환 예정



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

다. 종교시설





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




Python Code 변환 예정



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

라. 판매시설





Check(EDBA_51_2_4){

  getBuildingUsage()="CommercialFacility"

} 




Python Code 변환 예정



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

마. 운수시설





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




Python Code 변환 예정



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

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





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




Python Code 변환 예정



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

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





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




Python Code 변환 예정



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

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





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




Python Code 변환 예정



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

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





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




Python Code 변환 예정



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

차. 운동시설





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




Python Code 변환 예정



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

카. 업무시설





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




Python Code 변환 예정



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

타. 숙박시설





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




Python Code 변환 예정



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

파. 위락시설





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




Python Code 변환 예정



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

하. 관광휴게시설





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




Python Code 변환 예정



Modify
71
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
72
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
73
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
74
34664 건축법 시행령 제 51조 2 항 1호 거 목

거. 장례시설





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




Python Code 변환 예정



Modify
75
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
76
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
77
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
78
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
79
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
80
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
81
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
82
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
83
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
84
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
85
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
86
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
87
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
88
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
89
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
90
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
91
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
92
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
93
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
94
37042 건축법 시행령 제 56조 1 항

① 법 제50조제1항에 따라 다음 각 호의 어느 하나에 해당하는 건축물(제5호에 해당하는 건축물로서 2층 이하인 건축물은 지하층 부분만 해당한다)의 주요구조부는 내화구조로 하여야 한다. 다만, 연면적이 50제곱미터 이하인 단층의 부속건축물로서 외벽 및 처마 밑면을 방화구조로 한 것과 무대의 바닥은 그러하지 아니하다. <개정 2009.6.30>





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

check(EDBA_56_1){

        IF !CS THEN KS

}

Space mySpace{
Space.usage="StagePart"
}

Floor myFloor{

     hasSpace(mySpace, Floor) = TRUE

}



CS {

       getTotalFloorArea()<= 50m2

       AND getBuildingStoriesCount()=1

       AND getBuildingUsage()="AccessoryBuidling"

       AND isFireProofStructure("OuterWall" | "eaves" | myFloor)=TRUE

}



KS {

	getResult(EDBA_56_1_1 = TRUE  

	OR getResult(EDBA_56_1_2) = TRUE  

	OR getResult(EDBA_56_1_3) = TRUE  

	OR getResult(EDBA_56_1_4) = TRUE  

	OR getResult(EDBA_56_1_5) = TRUE  

   		

	AND isFireProofStructure(MainStructuralPart) = TRUE

} 




Python Code 변환 예정



Modify
95
37047 건축법 시행령 제 56조 1 항 5호

5. 3층 이상인 건축물 및 지하층이 있는 건축물. 다만, 단독주택(다중주택 및 다가구주택은 제외한다), 동물 및 식물 관련 시설, 발전시설(발전소의 부속용도로 쓰는 시설은 제외한다), 교도소·감화원 또는 묘지 관련 시설(화장장은 제외한다)의 용도로 쓰는 건축물과 철강 관련 업종의 공장 중 제어실로 사용하기 위하여 연면적 50제곱미터 이하로 증축하는 부분은 제외한다.





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

check(EDBA_56_1_5){

	IF !CS THEN KS

}

Building myBuilding{

     getBuildingUsage() = "PowerPlant"

     isObjectProperty(Building.isAttachedBuilding) = TRUE

}


Building  myBuilding{

     getResult(REFB_*_3_30) = TRUE

     getResult(REFB_*_3_31) = TRUE

}



CS{

         getBuildingUsage() = "facilities for animals and plants"

                                       

                              | "facilities for power generation"

                              | "correctional facilities and military installations.prison"

                              | "correctional facilities and military installations.reformatories 

                              | "myFactory"



	 OR (getBuildingUsage() = "detached houses"

             AND getBuildingUsage() != "detached houses.multi-user houses" 

                                     | "detached houses.multi-family houses" )



	 OR (getBuildingUsage() = "facilities for power generation" 

	 AND (getBuildingUsage() = "myBuilding"



	 OR (getBuildingUsage() = "cemeteries and related facilities"

	 AND getBuildingUsage() != "Crematorium") 





}



KS{

Floor myFloor{
Floor.number < 0
}

          getBuildingStoriesCount() >= 3 

	  AND isExist(myFloor) = TRUE

} 




Python Code 변환 예정



Modify
96
37352 건축법 시행령 제 34조 1 항

① 건축물의 피난층(직접 지상으로 통하는 출입구가 있는 층을 말한다. 이하 같다) 외의 층에서는 피난층 또는 지상으로 통하는 직통계단(경사로를 포함한다. 이하 같다)을 거실의 각 부분으로부터 계단(거실로부터 가장 가까운 거리에 있는 계단을 말한다)에 이르는 보행거리가 30미터 이하가 되도록 설치하여야 한다. 다만, 건축물(지하층에 설치하는 것으로서 바닥면적의 합계가 300제곱미터 이상인 공연장·집회장·관람장 및 전시장은 제외한다)의 주요구조부가 내화구조 또는 불연재료로 된 건축물은 그 보행거리가 50미터(층수가 16층 이상인 공동주택은 40미터) 이하가 되도록 설치할 수 있으며, 자동화 생산시설에 스프링클러 등 자동식 소화설비를 설치한 공장으로서 국토해양부령으로 정하는 공장인 경우에는 그 보행거리가 75미터(무인화 공장인 경우에는 100미터) 이하가 되도록 설치할 수 있다. <개정 2009.7.16>





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

Check(EDBA_34_1){
     KS
}

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

Space mySpace{
      getObjectProperty(Space.usage)="PerformanceHall"
      OR getObjectProperty(Space.usage)="AssemblyHall"
      OR getObjectProperty(Space.usage)="Auditorium"	
      OR getObjectProperty(Space.usage)="ExhibitionHall"
}

Door myDoor{
     isDirectlyAccessible(Door, Ground)=TRUE
}

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

Ramp myRamp{
     isAccessible(Ramp,myFloor)=TRUE
     OR isAccessible(Ramp,Ground)=TRUE
}

Floor myFloor2{
     isObjectProperty(Floor.isEscape)=FALSE
     OR hasObject(Floor, myDoor)=FALSE
}

	Zone myZone{

		isDirectlyAccessible(myStair, Zone)=FALSE

	}

 

IF

	getFloorNumber(mySpace)>0

	getFloorArea(mySpace)<=300 m2

	isFireResistantStructure(MainStructuralPart)=TRUE

	OR isObjectProperty(MainStructuralPart.Material.nonCombustibility)=TRUE 

	THEN IF        getBuildingStoriesCount()>=16

	               getBuildingUsage()="MultiUnitHouse"

	          THEN ED= 40 

	ELSE THEN   ED=50               

	END IF



ELSE IF   

	getBuildingUsage() = "Factory" 

	isExist(ExtinguishingSystem)=TRUE 

	isObjectProperty(ExtinguishingSystem.isAutomatic)=TRUE

	getResult(REFB_8_2)=TRUE

	THEN IF   	getBuildingUsage() = "UnmannedFactory" 

			THEN ED=100

	ELSE THEN  ED=75

	END IF 



ELSE THEN ED=30

	END IF 



	(hasObject(myFloor,myStair)=TRUE

	hasObject(myZone, myStair)=TRUE

	getObjectDistance(Room,myStair, 1)<=ED)

	OR 

	(hasObject(myFloor,myRamp)=TRUE

	hasObject(myZone, myRamp)=TRUE

	getObjectDistance(Room,myRamp, 1)<=ED)

} 








max_route_length = 30

def Check():
    evac_storey_exist = False
    stories = 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:
        if storey.SELECT('is evacuation storey').BOOL() == True:
            continue

        stairs = storey.SELECT('direct stair')

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

        for space in storey.SELECT('space'):
            route_length = -1
            for route in space.SELECT('escape route', stairs):
                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.ERROR(space.SELECT('name').STRING() + '부터 직통계단까지의 거리가 멀다 : ' + str(route_length))
            else:
                space.SUCCESS(space.SELECT('name').STRING() + ' : ' + str(route_length)) 





Modify
97
37355 건축법 시행령 제 34조 2 항 2호

2. 단독주택 중 다중주택·다가구주택, 제2종 근린생활시설 중 학원·독서실, 판매시설, 운수시설(여객용 시설만 해당한다), 의료시설(입원실이 없는 치과병원은 제외한다), 교육연구시설 중 학원, 노유자시설 중 아동 관련 시설·노인복지시설, 수련시설 중 유스호스텔, 숙박시설 또는 장례식장의 용도로 쓰는 3층 이상의 층으로서 그 층의 해당 용도로 쓰는 거실의 바닥면적의 합계가 200제곱미터 이상인 것





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

Check(EDBA_34_2_2){



        Building myBuilding{

              getBuildingUsage()="DentalClinic"

        }


Space mySpace{
getSpaceUsage() = "Ward"
}
	Floor myFloor1 {

		getObjectProperty(Floor.number)>=3

                getObjectUsage(Floor)  = “DetachedHouse.MultiUserHouse”

		OR getObjectUsage(Floor)  = “DetachedHouse.MultiFamilyHouse”

		OR getObjectUsage(Floor)  = “ClassIINeighborhoodLivingFacility.EducationalInstitute”

		OR getObjectUsage(Floor)  = “ClassIINeighborhoodLivingFacility.ReadingRooms” 

                OR getObjectUsage(Floor)  = “CommercialFacility”

                OR getObjectUsage(Floor)  = “TransportationFacility.PassengerTrafficFacilities”

                OR ( getObjectUsage(Floor)  = “MedicalFacility” ADN hasObject(myBuilding, mySpace)=TRUE )

                OR getObjectUsage(Floor)  = “EducationAndResearchFacility.EducationalInstitutes” 

		OR getObjectUsage(Floor)  = “FacilitiesForTheAgedAndChildren.ChildrenRelatedFacilities” 

		OR getObjectUsage(Floor)  = “EducationAndResearchFacility.WelfareFacilityForTheAged” 

		OR getObjectUsage(Floor)  = “Trainingfacility.YouthHostel” 

		OR getObjectUsage(Floor)  = “LodgingFacility”

                

	}



	Floor myFloor2{

		 getObjectUsage(Floor)  = “ClassIINeighborhoodLivingFacility.FacilityForProvidingInternetComputerGameService”

		}



           getTotalFloorArea(myFloor1.Room)>= 200 m2

          OR getTotalFloorArea(myFloor2.Room)>= 300 m2	

} 




Python Code 변환 예정



Modify
98
37380 건축법 시행령 제 47조 2 항 1호

1. 노유자시설 중 아동 관련 시설 또는 노인복지시설과 판매시설 중 도매시장 또는 소매시장





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

Check(EDBA_47_2_1){
       KS
}

KS{
     getBuildingUsage()="FacilitiesForTheAgedAndChildren.ChildrenRelatedFacility"
     OR getBuildingUsage()="FacilitiesForTheAgedAndChildren.WelfareFacilityForTheAged" 
     OR getBuildingUsage()="CommercialFacility.WholesaleMarket"
     OR getBuildingUsage()="CommercialFacility.RetailMarket"
} 




Python Code 변환 예정



Modify
99
37381 건축법 시행령 제 47조 2 항 2호

2. 공동주택과 제2종 근린생활시설 중 고시원





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



Check(EDBA_47_2_2){

      KS

}



KS{

       getBuildingUsage()="DetachedHouse.MultiUserHouse"

       OR getBuildingUsage()="DetachedHouse.MultiFamilyHouse"

       OR getBuildingUsage()="MultiUnitHouse"

       OR getBuildingUsage()="ClassINeighborhoodLivingFacility.MaternityCenter"

       OR getBuildingUsage()="ClassINeighborhoodLivingFacility.PostnatalCareCenter"

       OR getBuildingUsage()="ClassIINeighborhoodLivingFacility.CommunalLivingFacility"



} 




Python Code 변환 예정



Modify
100
37385 건축법 시행령 제 51조 3 항

③ 법 제49조제2항에 따라 오피스텔에 거실 바닥으로부터 높이 1.2미터 이하 부분에 여닫을 수 있는 창문을 설치하는 경우에는 국토해양부령으로 정하는 기준에 따라 추락방지를 위한 안전시설을 설치하여야 한다. <신설 2009.7.16>





// 건축법 시행령 51조 (거실의 채광 등) 3항

check(EDBA_51_3){

	IF CS THEN KS

}



CS{

Window myWindow{
getObjectProperty(Window.panelOperationType) = "SwingingWindow"
}
	getBuildingUsage() = "Officetels.Room"

	getElementHeight(myWindow) <= 1.2 m

}



KS{

	isExist(FallPreventionSafetyFacility) = TRUE

	getResult(REFB_17_4) = TRUE

} 








min_win_h = 1.2
min_rail_h = 1.2
min_win_h_label = '기준 창문 높이'
min_rail_h_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 == '오피스텔'):
            continue
        for space in building.SELECT('space'):
            for win in space.SELECT('window'):
                if win.SELECT('lower edge height').UNIT('m').NUMBER() > min_win_h:
                    continue
                for railing in win.SELECT('railing'):
                    height = railing.SELECT('height').UNIT('m')
                    h = height.NUMBER()
                    if h < min_rail_h:
                        height.ERROR('난간 높이: ' + str(h) + 'm(< ' + str(min_rail_h) + 'm)')
                    else:
                        height.SUCCESS('난간 높이: ' + str(h) + 'm(>= ' + str(min_rail_h) + 'm)')

                    return

                win.ERROR('난간이 존재하지 않습니다.') 





Modify
    1   2   next▷  
 

Related Sites

국토부 BIM과제-1st  |   Ministry of Land, Infrasrtucture and Transport   |   Korea Agency for Infrastructure Technology Advancement  |   Space and Design IT Lab   |   Yonsei University
This is Design IT Lab server's restricted area. Authorized users could access this website.