def addPillarFromConvexLoopsGrids(faces, grids, indexedLoops):
 cellBottomLoops = getIndexedCellLoopsFromIndexedGrid(grids[0])
 for cellBottomLoop in cellBottomLoops:
  addFacesByConvexReversed(faces, cellBottomLoop)
 addFacesByConvexLoops(faces, indexedLoops)
 cellTopLoops = getIndexedCellLoopsFromIndexedGrid(grids[(-1)])
 for cellTopLoop in cellTopLoops:
  addFacesByConvex(faces, cellTopLoop)

def addPillarFromConvexLoopsGrids ( faces , grids , indexedLoops ) : cellBottomLoops = getIndexedCellLoopsFromIndexedGrid ( grids [ 0 ] ) for cellBottomLoop in cellBottomLoops : addFacesByConvexReversed ( faces , cellBottomLoop ) addFacesByConvexLoops ( faces , indexedLoops ) cellTopLoops = getIndexedCellLoopsFromIndexedGrid ( grids [ ( - 1 ) ] ) for cellTopLoop in cellTopLoops : addFacesByConvex ( faces , cellTopLoop )
add pillar from convex loops and grids .