def addFaces(geometryOutput, faces):
 if (geometryOutput.__class__ == list):
  for element in geometryOutput:
   addFaces(element, faces)
  return
 if (geometryOutput.__class__ != dict):
  return
 for geometryOutputKey in geometryOutput.keys():
  geometryOutputValue = geometryOutput[geometryOutputKey]
  if (geometryOutputKey == 'face'):
   for face in geometryOutputValue:
    faces.append(face)
  else:
   addFaces(geometryOutputValue, faces)

def addFaces ( geometryOutput , faces ) : if ( geometryOutput . __class__ == list ) : for element in geometryOutput : addFaces ( element , faces ) return if ( geometryOutput . __class__ != dict ) : return for geometryOutputKey in geometryOutput . keys ( ) : geometryOutputValue = geometryOutput [ geometryOutputKey ] if ( geometryOutputKey == 'face' ) : for face in geometryOutputValue : faces . append ( face ) else : addFaces ( geometryOutputValue , faces )
add the faces .