Delete face(s) along axis with python I'm trying to delete, as in This Example, but Faces instead of vertices along a particular axis. So, as an example (see image) this cube's face that I have selected would need to be deleted along the x axis using python. From the above link (following mostly the 3rd answer), I don't understand how they're setting which axis to delete by, or how to do the operation for faces.

My code is is different, because my needs are different than the example. It doesn't throw an error, it just doesn't do anything
    def _debug(vert):
    n_selected = len([v for v in vert if v.select])
    n_deselect = len([v for v in vert if not v.select])
    print('\nlen vertices = {}, {} selected, {} not selected'.format(
            len(vert), n_selected, n_deselect))
       
    
    x_thresh=0.0        
    vert = bpy.context.object.data.vertices
    _debug(vert)
    for v in vert:
        if v.co[2] &lt; x_thresh:
            v.select = True
    _debug(vert)
    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.mesh.delete(type='VERT')
    bpy.ops.object.mode_set(mode='OBJECT')
bmesh version
If choosing answers from that question would recommend editing the answer of @CoDEmanX
Test script, removes all faces which have all vertices with an x coordinate less than zero.
import bpy
import bmesh

ob = bpy.context.object
assert ob.type == &quot;MESH&quot;
mat = ob.matrix_world
me = ob.data


if me.is_editmode:
    bm = bmesh.from_edit_mesh(me)
else:
    bm = bmesh.new()
    bm.from_mesh(me)

bmesh.ops.delete(
        bm,
        geom=[f for f in bm.faces if all(
                v.co.x &lt; 1e-6 for v in f.verts)
            ],
        context='FACES'
        )


if bm.is_wrapped:
    bmesh.update_edit_mesh(me)
else:
    bm.to_mesh(me)
    me.update()

To remove faces with a normal pointing in the -X direction
bmesh.ops.delete(
        bm,
        geom=[f for f in bm.faces if f.normal.angle((-1, 0, 0)) &lt; 1e-6
            ],
        context='FACES'
        )