Hello, so here is my problem …
For a personal project, I need for example, on a cube that would have made a rotation along z angle of PI / 4 to write a python program that will permit to select the points that have the maximum x coordinate, i mean that for example if you made a list of all the x-coordinate of the vertices constituting the cube, and well most of this list will be the x-coordinate of the points I wish to select. Here is the code I use on a cube:
def sectionner1():
tx = []
truc = bpy.context.scene.objects.active
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_all(action = ‘DESELECT’)
bm = bmesh.from_edit_mesh(truc.data)
for vert in bm.verts:
tx.append(vert.co[0])
print("+++",maximum(tx))
for vertices in bm.verts:
tx.append(vert.co[0])
if vertices.co[0] == maximum(tx):
vertices.select = True
print(vertices.co)
bpy.ops.mesh.select_all(action =‘INVERT’)
bpy.ops.mesh.delete(type=‘VERT’)
bpy.ops.object.editmode_toggle()
It selects me much when I’m not turning, but once I made a rotation, and although it does not give the correct result anymore:( … If someone has a solution!