How to edit in Bmesh

This example assumes we have a mesh object in edit-mode

import bpy
import bmesh

Get the active mesh

obj = bpy.context.active_object
#obj = bpy.context.edit_object
me = obj.data
bm = bmesh.new()
bm.from_mesh(me)

for face in bm.faces:
co = “”
for v in face.verts:
co = v.co
print(v)
print("Here is the last co: " + str(co))
bmesh.ops.create_vert(bm, co)

Show the updates in the viewport

and recalculate n-gon tessellation.

bmesh.update_edit_mesh(me, True)

I just want bmesh.ops.create_vert to work, and make a vert, then I want to also remove the vert.
How can I do this? This code gives me error saying bm is not a single BMesh type… I don’t understand it.

Yes, I’ve read the API about create_vert, but it doesn’t explain much… where should I look now???:frowning:

i wonder why there’s a create_vert operator… since you can create verts like

vert = bm.verts.new((1,2,3)) # (1,2,3) is the coordinate

hmmm, verts.new seems easy. thanks! I found a workaround to this, not by python, but thanks anyway. it was fun to try out the new scriptings.

Blender really should have a better control over vert and mesh selection and editing with API.

thanks a lot!

somehow i cannot post a reply here…
Anyway, thank you for your replies.