Static method. Creates a closed ``pyny.Polyhedron`` connecting 
        two polygons. Both polygons must have the same number of 
        vertices. The faces of the Polyhedron created have to be planar, 
        otherwise, an error will be raised.
        
        The Polyhedron will have the *poly1* and *poly2* as "top" and 
        "bottom" and the rest of its faces will be generated by matching
        the polygons' vertices in twos.
        
        :param poly1: Origin polygon
        :type poly1: ``pyny.Polygon`` or ndarray (shape=(N, 3))
        :param poly2: Destination polygon
        :type poly2: ``pyny.Polygon`` or ndarray (shape=(N, 3))
        :param make_ccw: If True, points will be sorted ccw for each 
            polygon.
        :type make_ccw: bool
        :returns: Polyhedron
        :rtype: ``pypy.Polyhedron``
        
        .. warning:: If an error is raised, probably the Polyhedron
            have non-planar faces.
        .. warning:: If the Polyhedra are not created with this method
            or ``Place.add_extruded_obstacles()``, holes will not be 
            added.

def by_two_polygons(poly1, poly2, make_ccw=True):
        """
        Static method. Creates a closed ``pyny.Polyhedron`` connecting 
        two polygons. Both polygons must have the same number of 
        vertices. The faces of the Polyhedron created have to be planar, 
        otherwise, an error will be raised.
        
        The Polyhedron will have the *poly1* and *poly2* as "top" and 
        "bottom" and the rest of its faces will be generated by matching
        the polygons' vertices in twos.
        
        :param poly1: Origin polygon
        :type poly1: ``pyny.Polygon`` or ndarray (shape=(N, 3))
        :param poly2: Destination polygon
        :type poly2: ``pyny.Polygon`` or ndarray (shape=(N, 3))
        :param make_ccw: If True, points will be sorted ccw for each 
            polygon.
        :type make_ccw: bool
        :returns: Polyhedron
        :rtype: ``pypy.Polyhedron``
        
        .. warning:: If an error is raised, probably the Polyhedron
            have non-planar faces.
        .. warning:: If the Polyhedra are not created with this method
            or ``Place.add_extruded_obstacles()``, holes will not be 
            added.
        """
        if type(poly1) == Polygon:
            poly1 = poly1.points
            poly2 = poly2.points
        
        vertices = np.dstack((poly1, poly2))
        polygons = []
        for i in np.arange(vertices.shape[0])-1:
            polygons.append(np.array([vertices[i, :, 1],
                                      vertices[i+1,:, 1], 
                                      vertices[i+1, :, 0], 
                                      vertices[i,:, 0]]))
        polygons.append(poly1)
        polygons.append(poly2)
        
        return Polyhedron(polygons, make_ccw=make_ccw)