Page MenuHome

bmesh.ops.bisect_edges returns insufficient data.
Closed, ResolvedPublic


System Information
FreeBSD 10.1 Nvidia GT520

Blender Version
Broken: master 3ff3f56

Short description of error
The api documentation specifies that bmesh.ops.bisect_edges() "Returns: geom_split: newly created vertices and edges". When the following test is run I see the expected ten new vertices but only see two edges returned, while also expecting ten edges. Going by the vertex index values the edges appear to be the original two edges as they are connected from an old vertex to a new vertex. While the api docs may be wrong they describe a behaviour that would be expected.

Exact steps for others to reproduce the error
In edit mode of default cube select two edges and run the following script -

import bpy
import bmesh
import mathutils
import math

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

edges= [e for e in bm.edges if ( and not e.hide)]

if len(edges) < 2:
    print("please select minimun 2 edges")

    newmesh = bmesh.ops.bisect_edges(bm, edges=edges, cuts=5) #for example 5 cuts

    for i in newmesh['geom_split']:
        if type(i) == bmesh.types.BMVert:
            print("Vertex",i.index,"positioned at",
        elif type(i) == bmesh.types.BMEdge:
            print("Edge from vert",i.verts[0].index,"to vert",i.verts[1].index)

bmesh.update_edit_mesh(me, True)