def poly_collection_2d_to_3d(col, zs=0, zdir=u'z'):
 (segments_3d, codes) = paths_to_3d_segments_with_codes(col.get_paths(), zs, zdir)
 col.__class__ = Poly3DCollection
 col.set_verts_and_codes(segments_3d, codes)
 col.set_3d_properties()

def poly_collection_2d_to_3d ( col , zs = 0 , zdir = u'z' ) : ( segments_3d , codes ) = paths_to_3d_segments_with_codes ( col . get_paths ( ) , zs , zdir ) col . __class__ = Poly3DCollection col . set_verts_and_codes ( segments_3d , codes ) col . set_3d_properties ( )
convert a polycollection to a poly3dcollection object .