I want to extrude a face in the direction of the face normal, here is the code so far:

r = bmesh.ops.extrude_face_region(bm, geom=bm.faces[:])
verts = [e for e in r['geom'] if isinstance(e, bmesh.types.BMVert)]
bmesh.ops.translate(bm, vec=dir, verts=verts)

The problem is how to get the direction of the face that I translate? The bm.faces[0].normal is Vector(0,0,0)

Any ideas? Thx!


1 Answer 1


Update the normals

Either update normals on a whole bmesh


or on a per face basis

for f in bm.faces:
    if sometest:
  • $\begingroup$ Yeah, thx, I also found it, I use the normal_update on the frist face, cause I am sure that there is at least one. $\endgroup$
    – Jayanam
    Commented Jan 5, 2019 at 18:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .