Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I get the absolute position in 3d space of a face using python. I can get the position relative to the object origin using face.calc_center_median() this is not the absolute 3d position.

Here is how I got the relative position:

import bpy
import bmesh

# get current mesh
current_mesh =

# create empty bmesh, add current mesh into empty bmesh
current_bm =

# TODO: get absolute position
# get location of face (atm it relative to object origin)
for face in current_bm.faces:
    face_location = face.calc_center_median()
    normal = face.normal
    x = face_location[0]
    y = face_location[1]
    z = face_location[2]
    print('index: '+str(face.index), x, y, z)  # DEBUG

# current_bmesh back to mesh

In this scene for example the cube is a good distance from the world origin, the absolute 3d shall reflect this.

enter image description here

These are the reported coordinates of each face (they are relative to the origin of the object)

enter image description here

share|improve this question
up vote 6 down vote accepted

Multiply it with the object's world matrix.

loc_world_space = obj.matrix_world * loc_obj_space

where loc_obj_space is a 3d mathutils.Vector

There is an addon View3D-> Math Vis(Console) available to visualize vectors and matrices directly in the viewport.

I.e. paste the following lines to the interactive console

obj = bpy.context.active_object
lobj = [ for vertex in]
lworld = [obj.matrix_world * vector for vector in lobj]

Math Vis(Console)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.