Module Mesh :: Class MEdgeSeq
[hide private]
[frames] | no frames]

Class MEdgeSeq

source code

The MEdgeSeq object

This object provides sequence and iterator access to the mesh's edges.

Instance Methods [hide private]
 
extend(vertseq)
Add zero or more edges to the mesh.
source code
 
delete(edges)
Deletes one or more edges from the mesh.
source code
list of ints
selected()
Get selected edges.
source code
Method Details [hide private]

extend(vertseq)

source code 

Add zero or more edges to the mesh. Edges which already exist in the mesh or with both vertices the same are ignored. If three or four verts are specified in any sequence, an edge is also created between the first and last vertices (this is useful when adding faces).

Parameters:
  • vertseq (sequence(s) of ints or MVerts) - either two to four ints or MVerts, or sequence (list or tuple) of sequences each containing two to four ints or MVerts.

Note: Since Blender 2.44 all new edges are selected.

Example:

       import Blender
       from Blender import Mesh

       me = Mesh.Get("Plane")          # get the mesh data called "Plane"
       v = me.verts                    # get vertices
       if len(v) >= 6:                 # if there are enough vertices...
               me.edges.extend(v[0],v[1])    #   add a single edge
               l=[(v[1],v[2],v[3]),[0,2,4,5]]
               me.edges.extend(l)            #   add multiple edges

delete(edges)

source code 

Deletes one or more edges from the mesh. In addition, also delete:

  • any faces which uses the specified edge(s)
  • any "orphan" vertices (belonging only to specified edge(s))
Parameters:
  • edges (multiple ints or MEdges) - can be
    • a single MEdge belonging to the mesh
    • a single integer, specifying an index into the mesh's edge list
    • a sequence (list or tuple) containing two or more of either of the above.

selected()

source code 

Get selected edges. Selected edges are those for which both vertices are selected.

Returns: list of ints
a list of the indices for all edges selected in edit mode.