I'm working on a method to compare distances in a space in Python. I am only using the GUI to check my results; all operations are done via a Python script.
I am using the remesh operator to increase the number of faces of a given primative, so that I can find a pseudo-accurate distance to the object by finding the closest face.
I was able to get the remesh to work. However, I'm having trouble accessing the new polygons. It seems there are only the original centers available.. although I am able to see when loading Blender that the number of faces have increased. So, the number of face-centers should also?!
Before:

After:

In the console:
>>> ob.data.polygons[:]
[bpy.data.meshes['slab'].polygons[0], bpy.data.meshes['slab'].polygons[1], bpy.data.meshes['slab'].polygons[2], bpy.data.meshes['slab'].polygons[3], bpy.data.meshes['slab'].polygons[4], bpy.data.meshes['slab'].polygons[5], bpy.data.meshes['slab'].polygons[6], bpy.data.meshes['slab'].polygons[7], bpy.data.meshes['slab'].polygons[8], bpy.data.meshes['slab'].polygons[9], bpy.data.meshes['slab'].polygons[10], bpy.data.meshes['slab'].polygons[11], bpy.data.meshes['slab'].polygons[12], bpy.data.meshes['slab'].polygons[13], bpy.data.meshes['slab'].polygons[14], bpy.data.meshes['slab'].polygons[15], bpy.data.meshes['slab'].polygons[16], bpy.data.meshes['slab'].polygons[17], bpy.data.meshes['slab'].polygons[18], bpy.data.meshes['slab'].polygons[19], bpy.data.meshes['slab'].polygons[20], bpy.data.meshes['slab'].polygons[21], bpy.data.meshes['slab'].polygons[22], bpy.data.meshes['slab'].polygons[23], bpy.data.meshes['slab'].polygons[24], bpy.data.meshes['slab'].polygons[25], bpy.data.meshes['slab'].polygons[26], bpy.data.meshes['slab'].polygons[27], bpy.data.meshes['slab'].polygons[28], bpy.data.meshes['slab'].polygons[29], bpy.data.meshes['slab'].polygons[30], bpy.data.meshes['slab'].polygons[31], bpy.data.meshes['slab'].polygons[32], bpy.data.meshes['slab'].polygons[33]]
Clearly more than 33 polygons! Any ideas?
I've tried:
after remeshing
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY') bpy.ops.object.editmode_toggle()after remeshing
ob.data.update(calc_edges=True)- when reading
bpy.ops.object.mode_set(mode='OBJECT')