check(REFB_19_1){
KS
}
KS{
Wall myWall{
isObjectProperty(Wall.isPartitionWall) = TRUE
}
Floor myFloor{
hasObject(Floor, myWall)
}
isFireResistantStructure(myWall)=TRUE
(isConnectedTo(myWall, Roof.BottomSurface) = TRUE
OR isCOnnectedTo(myWall, myFloor.UpperFloor.FloorSlab) = TRUE)
}
|
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
|