Python script to add additional faces to an existing mesh Apologies if some of my terminology is off - I'll happily update the answer if anyone points incorrect terms out to me!

I'm using Blender 2.76

I've created a mesh; which I would like to 'close' by adding in additional faces (or surfaces; or polygons ... not sure what to call them!)



Blender file:
https://drive.google.com/open?id=0B_1YtzapYF0LX09DNFhoMHJPaUU

The faces parallel to the x are also open; but as those are curved; I'm just trying to full along the y axis for now.

I got the below data out of the console:

&gt;&gt;&gt; mysurf.type
'MESH'

&gt;&gt;&gt; mysurf.data.polygons.data
bpy.data.meshes['Mesh']


Yellow box is the face I want to add. And there are many of these running down the y axis.

I've constructed the mesh pragmatically; so I know the co-ordinates of the vertexes I want to connect with a face; so perhaps there is a simple command to add it in?
I would not say "simple".  With an understanding of how you constructed the mesh in question it would probably be possible to algorithmically generate the vertex indices for the new faces.

Without the algorithm all I can supply to you is the basic code of how to add faces to an existing mesh:

Here is an extract from http://web.purplefrog.com/~thoth/blender/python-cookbook/add-to-mesh.html that illustrates several idioms for modifying a mesh using bmesh.  You are chiefly interested in the bm.faces.new( vertex_index_array ) technique.

import bpy
import bmesh


def mission1(scn):

    obj = scn.objects.active
    if bpy.context.mode == 'EDIT_MESH':
        bm = bmesh.from_edit_mesh(obj.data)
    else:
        bm = bmesh.new()
        bm.from_object(obj, scn)

    v2 = bm.verts.new( [0,7,0] )

    bm.verts.ensure_lookup_table()

    v1 = bm.verts[3]

    e1 = bm.edges.new( [v1, v2] )

    f1 = bm.faces.new( [v1, v2, bm.verts[7]])

    if bpy.context.mode == 'EDIT_MESH':
        bmesh.update_edit_mesh(obj.data)
    else:
        bm.to_mesh(obj.data)

    obj.data.update()

mission1(bpy.context.scene)


If you are willing to try without python, consider using Bridge Edge Loops:  How can I automatically create edges according to the number of vertices?