Select all verts that has 4 edges connected?


How can I select all verts that has 4 edges connected to it? I need to get the “intersecting” verts. I figured the best way is to check if it has 4 edges connected.


Something maybe like the following:

cube = bpy.context.active_object
bm = bmesh.from_edit_mesh(

# Find all verts with exactly 4 edges coming into it
verts4 = [v for v in bm.verts if len(v.link_edges) == 4]

# i.e. using > 5 above will find you all of the nasty 6-poles in your topology etc.


How can I only select the ones visible? If I hide parts, it still selects verts that has 4 edges even if it’s hidden.

What gets selected

What I need



Maybe this floats your boat?

import bpy
import bmesh

aob   = bpy.context.active_object

# 3D viewport should be in object mode
if not aob.mode == 'OBJECT' :

fmesh =

# Ensure bmesh internal index tables are fresh

# cand: verts member of exactly four edges and visible
cand = [v for v in fmesh.verts if v.hide == False and len(v.link_edges) == 4]

pick = list()
# Select candidates with all four neighboring vertices also visible
for v in cand :
    somehidden = False
    for e in v.link_edges :
        somehidden = somehidden or e.other_vert(v).hide
    if not somehidden :
    else :
# Sync up bmesh and mesh