bmesh.ops.bisect_edges returns insufficient data. #43421

Closed
opened 2015-01-27 03:34:05 +01:00 by Shane Ambler · 7 comments

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 = obj.data
bm = bmesh.from_edit_mesh(me)

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

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

    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",i.co)
        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)

**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 = obj.data bm = bmesh.from_edit_mesh(me) edges= [e for e in bm.edges if (e.select==True and not e.hide)] if len(edges) < 2: print("please select minimun 2 edges") else: 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",i.co) 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) ```
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @sambler

Added subscriber: @sambler
Campbell Barton was assigned by Sergey Sharybin 2015-01-27 10:41:15 +01:00

Added subscribers: @ideasman42, @Sergey

Added subscribers: @ideasman42, @Sergey

@ideasman42, mind having a look? :)

@ideasman42, mind having a look? :)

This issue was referenced by 36df8cc1e5

This issue was referenced by 36df8cc1e5be695fef4aeafc2c6b9aee92f5d56a

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 36df8cc1e5.

Closed by commit 36df8cc1e5.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#43421
No description provided.