//건축법 시행령 40조 (옥상광장 등의 설치) 1항
check(EDBA_40_1){
IF (CS) THEN KS
}
CS{
Space myBalcony {
getSpace(“Balconly”)
Space.Floor.number >= 2
}
Space mySpace{
getSpace(“RoofTopPlaza”) + getSpace(myBalcony)
}
isAccessible(mySpace) = TRUE
}
KS{
hasElement(mySpace, Railing) = TRUE
mySpace.Rail.height >= 1.2m
}
|
target_space_names = ['옥상광장', '노대']
drop_h = 2.0
barrier_h = 1.2
target_space_names_label = '대상 공간 이름'
drop_h_label = '최소 추락 높이'
barrier_h_label = '최소 난간 높이'
def Check():
for space in SELECT('space'):
if space.SELECT('is name in', target_space_names).BOOL() == False:
continue
if space.SELECT('space door').COUNT() + space.SELECT('opening').COUNT() == 0:
space.SUCCESS('출입 불가능')
continue
for edge in space.SELECT('edge'):
drop = edge.SELECT('drop').UNIT('m')
if drop.COUNT() == 0 or drop.LTE(drop_h):
continue
safetybarrier = edge.SELECT('safety barrier')
if safetybarrier.COUNT() == 0 :
drop.ERROR('난간 미설치')
continue
height = safetybarrier.SELECT('height').UNIT('m')
height_val = height.NUMBER()
if height_val < barrier_h:
height.ERROR('난간 높이: ' + str(height_val) + ' < ' + str(barrier_h))
else:
height.SUCCESS('난간 높이: ' + str(height_val) + ' >= ' + str(barrier_h))
|