//스프링클러설비의 화재안전기준 10조 (헤드) 8항
check(NFSC103_10_8){
(IF !(CS1) THEN KS1) or (IF CS1 THEN KS2)
}
KS1{
Beam myBeam{
hasObject(SpecificFireFightingBuilding, Beam) = TRUE
}
getElementDistance(myBeam, SprinklerHead, 1) = TRUE
//Table
getElementDistance(SprinklerHead.Deflector, Beam, a) + getObjectWidth(SprinklerHead.Deflector)*0.5 = SBD
getObjectVerticalDistance(SprinklerHead.Deflector, Beam.BottomSurface, a) = SHD
IF SBD < 0.75 m
THEN SHD < getObjectHeight(Beam.BottomSurface)
IF 0.75 m <= SBD < 1 m
THEN SHD < 0.1 m
IF 1 m <= SBD < 1.5 m
THEN SHD < 0.15 m
IF SBD >= 1.5 m
THEN SHD < 0.3 m
}
CS1{
getObjectDistance(Ceiling.Surface, Beam.BottomSurface) > 55 cm
getObjectDistance(Beam.BottomSideSurface, SprinklerHead) = OD
OD <= getElementDistance(SprinklerHead, c)*0.5
}
KS2{
getObjectDistance(SprinklerHead, SprinklerHead.AttachingToSurface) <= 55 cm
}
def Check():
for building in SELECT('building'):
bldg_use = building.SELECT('building type').STRING()
sub_use = building.SELECT('prop', '세부용도').STRING()
space_codes = []
if bldg_use == '단독주택' and sub_use == '다가구주택':
space_codes = ['가구'] #가구
elif (bldg_use == '공동주택' and sub_use != '기숙사') or (bldg_use == '노유자시설' and sub_use == '노인복지주택'):
space_codes = ['33237'] #세대
elif bldg_use == '공동주택' and sub_use == '기숙사':
space_codes = ['33230'] #침실
elif bldg_use == '의료시설':
space_codes = ['34310'] #병실
elif bldg_use == '교육연구시설' and sub_use == '학교':
space_codes = ['34404', '34409'] #교실
elif bldg_use == '숙박시설':
space_codes = ['33201'] #객실
elif (bldg_use == '제2종 근린생활시설' and sub_use == '다중생활시설') or (bldg_use == '노유자시설' and sub_use == '노인요양시설'):
space_codes = ['호실'] #호실
else:
return
for storey in building.SELECT('storey'):
walls_list = []
for space in storey.SELECT('space'):
code = space.SELECT('class code').STRING()
if code in space_codes:
walls_list.append(space.SELECT('wall'))
n = len(walls_list)
for i, walls in enumerate(walls_list):
if i == n-1:
break
for j, walls2 in enumerate(walls_list):
if i >= j:
continue
for wall in walls:
if wall.SELECT('isexterior').BOOL():
continue
id = wall.SELECT('element id').STRING()
for wall2 in walls2:
if wall2.SELECT('isexterior').BOOL():
continue
id2 = wall2.SELECT('element id').STRING()
if id == id2:
if wall.SELECT('prop', '경계벽').BOOL() == False:
wall.ERROR('해당 벽은 경계벽이어야 합니다.')
else:
if wall.SELECT('prop', '내화구조').BOOL() == False:
wall.ERROR('경계벽은 내화구조이어야 합니다.')
else:
if wall.SELECT('top touched').BOOL():
wall.SUCCESS('경계벽 조건에 부합합니다.')
else:
wall.ERROR('경계벽 상단이 슬라브와 닿지 않습니다.')
break
def Check():
for building in SELECT('building'):
bldg_use = building.SELECT('building type').STRING()
sub_use = building.SELECT('prop', '세부용도').STRING()
space_codes = []
if bldg_use == '단독주택' and sub_use == '다가구주택':
space_codes = ['가구'] #가구
elif (bldg_use == '공동주택' and sub_use != '기숙사') or (bldg_use == '노유자시설' and sub_use == '노인복지주택'):
space_codes = ['33237'] #세대
elif bldg_use == '공동주택' and sub_use == '기숙사':
space_codes = ['33230'] #침실
elif bldg_use == '의료시설':
space_codes = ['34310'] #병실
elif bldg_use == '교육연구시설' and sub_use == '학교':
space_codes = ['34404', '34409'] #교실
elif bldg_use == '숙박시설':
space_codes = ['33201'] #객실
elif (bldg_use == '제2종 근린생활시설' and sub_use == '다중생활시설') or (bldg_use == '노유자시설' and sub_use == '노인요양시설'):
space_codes = ['호실'] #호실
else:
return
for storey in building.SELECT('storey'):
walls_list = []
for space in storey.SELECT('space'):
code = space.SELECT('class code').STRING()
if code in space_codes:
walls_list.append(space.SELECT('wall'))
n = len(walls_list)
for i, walls in enumerate(walls_list):
if i == n-1:
break
for j, walls2 in enumerate(walls_list):
if i >= j:
continue
for wall in walls:
if wall.SELECT('isexterior').BOOL():
continue
id = wall.SELECT('element id').STRING()
for wall2 in walls2:
if wall2.SELECT('isexterior').BOOL():
continue
id2 = wall2.SELECT('element id').STRING()
if id == id2:
if wall.SELECT('prop', '경계벽').BOOL() == False:
wall.ERROR('해당 벽은 경계벽이어야 합니다.')
else:
if wall.SELECT('prop', '내화구조').BOOL() == False:
wall.ERROR('경계벽은 내화구조이어야 합니다.')
else:
if wall.SELECT('top touched').BOOL():
wall.SUCCESS('경계벽 조건에 부합합니다.')
else:
wall.ERROR('경계벽 상단이 슬라브와 닿지 않습니다.')
break