Any addon for creating edges between each pair of selected vertices?

Thats what i want to achieve. You sequentially select any even number of vertices, and after running command all pairs of vertices, i.e. vertices 1 and 2, 3 and 4, and so on, are connecting with an edge.
Pairs are defined by sequence of selection. I.e. 2 vertices which was selected first = first pair, 2 additionally selected vertices would become a second pair, and so on.

Maybe some know any addon with this functionality?

Image above is just a simple way to explain desired behavior. Its not a real case.
Real cases can be complitely different, so its not about grid fill and any vanilla tools.

You can do this already in Vanilla Blender with Grid Fill (F3 > Grid Fill)

Its complitely not about grid fill.

Select your n-gon, Face → Triangulate Faces Ctrl-T, Face → Tris to Quads Alt-J.

1 Like

Not sure why you would want an add-on for this, but maybe I’m misunderstanding the question. I think Okidoki gave you a good answer, or you can just select the two verts you want joined and press ‘J’.

1 Like

I guess you could call bpy.ops.mesh.vert_connect_path() for each pair of vertices -but this is an operator that works on selection, so you would have to store your full selection first (into a list or a dictionary) and then iterate through that, make sure you deselect all then select the pair, and run the operator. You can access selection order through this : https://docs.blender.org/api/current/bmesh.types.html#bmesh.types.BMesh.select_history

Check 2nd picture.
First of all in case of last vertices pairs (5 and 6) triangulation will not help at all, it will create second edge which shoudnt be there.
And whole point is to make creation of edges fast. Currently its:

  1. select first vert
  2. press shift
  3. select second vert
  4. press J or whatewer
    Move on to next pait.

Its slow and unnecessary pressing buttons.
In solution which i want to find you press shift only once, when select vertices and press “J” only once.

Wait lol, there is “connect vertex pairs” that does exactly what you need. Just type F3 then the operator name and you should be good. It doesn’t go across faces though, is it a dealbreaker ?

2 Likes

Yup i know about this one. Unfortunately it doesnt do what i want.
As you can see its ignore pair “3-4”.

Isn’t that exactly the same as J ?

https://docs.blender.org/manual/en/latest/modeling/meshes/editing/vertex/connect_vertex_pairs.html

EDIT:
I checked.
Oh man, it’s even in the article I linked.
“The main difference between this tool and Connect Vertex Path is that this tool ignores the selection order and connects all selected vertices that share a face.”

1 Like

Yea I see… I guess your best bet is to write a script for this, it shouldn’t be too hard. The links I pasted above should help you

I see. So you want an add-on which will automatically fill all gaps? Then yes, “j” method is slow. How would one end up with a mesh like this in the first place?

I would just delete the face, select an or two edges, depends on the geometry, and use repeated f to recreate.

Most cases you can either use grid fill (Ctrl-F>Grid Fill), bridge edge loops (Right-Click>Bridge Edge Loops), or the knife tool (K).
I know it’s a pain, but if you made bad geometry your going to spend a while fixing it.

2 Likes

Maybe Forgotten Tools can help you.

This is not an add-on, but if you first select all the vertices you want in order and then run this script in the text editor, it will connect them in pairs.

import bpy
import bmesh

obj = bpy.context.object
data = obj.data
bm = bmesh.from_edit_mesh(data)

v = [s.index for s in bm.select_history if isinstance(s, bmesh.types.BMVert)]

if len(v)%2 != 0: 
    print('Not a multiple of two')
else:     
    for i in range(0,len(v),2):
        bpy.ops.mesh.select_all(action = 'DESELECT')
        v1, v2 = bm.verts[v[i]], bm.verts[v[i+1]]
        v1.select = True
        v2.select = True
        bpy.ops.mesh.vert_connect_path()

Hope it helps.

4 Likes

Holly! It’s your first post on forum and is a 100% solution. Thank you man :slight_smile:

Awesome! Glad to help!

@blanchr2 I wonder why it doesnt work in some cases?
Selected edge are result after running the script

I was curious and try different sequence of selection and some of them works as desired, like in this one:

free…

1 Like