1
$\begingroup$

I have this mesh:

enter image description here

With a python script, I'd like to select edge loops in the upper part first:

enter image description here

And the ones in the lower part:

enter image description here

So I can close them some way (by a face, or by adding more loops). How can I do that with Blender SDK? Thank you.

EDIT: I mean, find the edges by starting from the object data, and not by using the editor...

$\endgroup$
1
  • 1
    $\begingroup$ In the above example, you can find manifold edges by finding edges that only connect to one face. Then you can filter edges for example by checking whether their vertices' coordinates are between some values. Look into the bmesh module if you haven't already docs.blender.org/api/2.79/bmesh.html You can fill faces either by using operators (similar to pressing f) while right geometry is selected or generate the needed mesh data yourself. $\endgroup$
    – kheetor
    Apr 12, 2018 at 10:16

1 Answer 1

1
$\begingroup$
  1. Select 1 edge of that type
  2. Shift+G >> Amount of Faces Around an Edge.

When you do this, Blender posts the following action it took in python.

enter image description here


As for the raw bmesh method of detecting this:

You can find the Reference in this Link

enter image description here


For getting the Horizontal & Vertical sets in two separate passes, I would inspect the verts like so:

Horizontal Case:

All Edges Have the Same Z values for the start and end vertices.

Vertical Case:

All Edges Have different Z values for the start and end vertices.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .