Bmesh translate or move how ?

if I select and edge
edges_start_a = [ bm.edges[2] ]

but then want to translate it which needs verts

how do you get verts list for that edge only ?

thanks

Just pass the edge’s vertices:

bmesh.ops.translate(bm, verts=bm.edges[2].verts, vec=(0.0, 0.0, 1.0))

is there a way to get it from the list ?

like printing it

print (‘edges_start_a verts =’, edges_start_a.verts )

did not work

cause edges_start_a is a list of edges

but is there a way to do it or have to go directly to the edges[2].verts?

and now if you add a vert or edge or face you need to use the

if hasattr(bm.edges, “ensure_lookup_table”):
bm.edges.ensure_lookup_table()

thanks

you would obviously need to pick out one of the edges. Or all verts, but remember that an edge references two vertices, and another edges may share one of the verts with the former. Use a set to eliminate duplicates, and cast it back to list:

bmesh.ops.translate(bm, vec=Vector((0,0,1)), verts=list({v for e in bm.edges for v in e.verts}))

how does this
bmesh.ops.translate(bm, vec=Vector((0,0,1)), verts=list({v for e in bm.edges for v in e.verts}))

select only one or N edges to move or extrude …
need to use the in bm.edges [2[ may be

and when you do that extrude
this adds new verts but you don’t’ need to use the

if hasattr(bm.edges, “ensure_lookup_table”):
bm.edges.ensure_lookup_table()

saw also the
bmesh.ops.extrude_edge_only( bm,edges)

might be possible but then needs to move normal to the edge
is there a way to do translate normal like we have in viewport ?

got this one using verts not edge

circle_edge circle[‘verts’][0].link_edges[0]

v1, v2 = circle_edge.verts

Translate “outwards” theextruded edge r

extrude_direction = (v1.co-v3.co) +(v2.co-v3.co)
extrude_direction.normalize()
extrude_direction *=(v1.co-v3.co).length

Note: Normalize here is a mathutil func I guess!

How to subdivide and edge ?

bmesh.ops.subdivide_edgesbm, edges, smooth, smooth_falloff, fractal, along_normal, cuts, seed, custom_patterns, edge_percents, quad_corner_type, use_grid_fill, use_single_edge, use_only_quads, use_sphere, use_smooth_even

tried this one but not luck
there are so many parameters for and edge !
how u use this one to just cut and edge in 2 or more ?

thanks