def createNewSkeletonfromLevel(level,SolutionAxes): slabSkeleton = SlabSkeleton.createSkeletonFromSlab(level.slab) wallSkeletons = [] lowerlevel = level.getLowerLevel() lowZ = None if lowerlevel is None else lowerlevel.slab.getHighestZ() print("for ", level, "lowz is: ", lowZ) test=False if lowZ is None: lowZ = 0 for axis in SolutionAxes.axes[0]: print("here axis",axis.coords[0][1]) for wall in level.walls: wallSkeletons += WallSkeleton.createSkeletonsFromWall(wall, lowZ, level.slab.getLowestZ()) # for wall in level.walls: # wallSkeleton = WallSkeleton.createSkeletonFromWall(wall) # x = round(wallSkeleton.poly.centroid().x,2) # y = round(wallSkeleton.poly.centroid().y,2) # for axis in SolutionAxes.axes[0]: # if y==axis.coords[0][1]: # wallSkeletons += WallSkeleton.createSkeletonsFromWall(wall, # lowZ, # level.slab.getLowestZ()) # test = True # for axis in SolutionAxes.axes[1]: # if x==axis.coords[0][0]: # # print("I am here Vertical",mid,"\n",axis) # wallSkeletons += WallSkeleton.createSkeletonsFromWall(wall, # lowZ, # level.slab.getLowestZ()) # test = True # if test == False: level.walls.remove(wall) return LevelSkeleton(wallSkeletons, slabSkeleton, level)
def createSkeletonFromLevel(level): slabSkeleton = SlabSkeleton.createSkeletonFromSlab(level.slab) wallSkeletons = [] lowerlevel = level.getLowerLevel() lowZ = None if lowerlevel is None else lowerlevel.slab.getHighestZ() for wall in level.walls: wallSkeletons += WallSkeleton.createSkeletonsFromWall( wall, lowZ, level.slab.getLowestZ()) # wallSkeletons = [WallSkeleton.createSkeletonFromWall(wall) for wall in level.walls] return LevelSkeleton(wallSkeletons, slabSkeleton, level)