Bmesh boolean modifier fails with co-planar geometry (carve doesn't) #54054

Closed
opened 2018-02-12 11:04:58 +01:00 by Artem · 11 comments

System Information
Windows 10 Radeon HD 4800 series

Blender Version
Broken: 2.79.2 4b206af
Worked: 2.79.2 a3409d3 (or any build prior to carve being removed)

Short description of error
Well, bmesh flat out fails in cases when carve did fine with co-planar geometry.

Exact steps for others to reproduce the error
Just add a boolean modifier to 2 prongs object and that's it

test_bmesh.blend

1231.jpg

1232.jpg

**System Information** Windows 10 Radeon HD 4800 series **Blender Version** Broken: 2.79.2 4b206af Worked: 2.79.2 a3409d3 (or any build prior to carve being removed) **Short description of error** Well, bmesh flat out fails in cases when carve did fine with co-planar geometry. **Exact steps for others to reproduce the error** Just add a boolean modifier to 2 prongs object and that's it [test_bmesh.blend](https://archive.blender.org/developer/F2236691/test_bmesh.blend) ![1231.jpg](https://archive.blender.org/developer/F2236728/1231.jpg) ![1232.jpg](https://archive.blender.org/developer/F2236807/1232.jpg)
Author

Added subscriber: @Hickz

Added subscriber: @Hickz
Member

Added subscriber: @howardt

Added subscriber: @howardt
Howard Trickey self-assigned this 2018-02-12 15:32:30 +01:00
Member

This is not something the current bmesh boolean code was intended to handle (coplanar intersections). So one could say that this behavior is "working as intended" (where "intended" = "undefined" in this case). The user can, of course, move one of the planes very slightly to get it into "defined" territory, but understood that that is tedious for the user especially if there are a lot of things that need to move and no easy single command to find and move all of them at once. So I will take this task assigned to me to see if something can be done, but there is not likely to be a quick fix to this.

This is not something the current bmesh boolean code was intended to handle (coplanar intersections). So one could say that this behavior is "working as intended" (where "intended" = "undefined" in this case). The user can, of course, move one of the planes very slightly to get it into "defined" territory, but understood that that is tedious for the user especially if there are a lot of things that need to move and no easy single command to find and move all of them at once. So I will take this task assigned to me to see if something can be done, but there is not likely to be a quick fix to this.
Author

Is there an easy way to let carve solver stay as it was? Keep bmesh as a main target, but have carve as a backup? Or is it too much a job maintaining the code?

Is there an easy way to let carve solver stay as it was? Keep bmesh as a main target, but have carve as a backup? Or is it too much a job maintaining the code?
Member

Added subscriber: @CharlieJolly

Added subscriber: @CharlieJolly
Member

@Hickz Carve is no longer maintained which is why it was removed. @howardt Is Carve behaviour defined for coplanar geometry, can that behaviour be copied for BMesh?

@Hickz Carve is no longer maintained which is why it was removed. @howardt Is Carve behaviour defined for coplanar geometry, can that behaviour be copied for BMesh?
Author

It's not only failing in coplanar geometry, obviously. For example, i needed to boolean that part, bmesh fails any way i try it, carve solves it with 0 non-manifold edges. Take it as an example (in this particular case i wanted to fatten the prongs), i have lots more of those. I'm using blender for jewelry production
this is quite a change for me, actually, and i'm sure i'm not alone on this

1231.jpg

1232.jpg

test_1.blend

UPDATE:
Uh, this example works okay with bmesh if you boolean the prongs between themselves prior to booleaning them to the main object.

It's not only failing in coplanar geometry, obviously. For example, i needed to boolean that part, bmesh fails any way i try it, carve solves it with 0 non-manifold edges. Take it as an example (in this particular case i wanted to fatten the prongs), i have lots more of those. I'm using blender for jewelry production this is quite a change for me, actually, and i'm sure i'm not alone on this ![1231.jpg](https://archive.blender.org/developer/F2240164/1231.jpg) ![1232.jpg](https://archive.blender.org/developer/F2240166/1232.jpg) [test_1.blend](https://archive.blender.org/developer/F2240168/test_1.blend) UPDATE: Uh, this example works okay with bmesh if you boolean the prongs between themselves prior to booleaning them to the main object.

Added subscriber: @MikhailRachinskiy

Added subscriber: @MikhailRachinskiy

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

First case test_bmesh.blend – coplanar geometry, not intended to work with BMesh solver whatsoever.

Second case test_1.blend – geometry joined together before union operation using object join operator, resulted in different shells intersection with each other.
Which actually worked with Carve, but BMesh solver has different behaviour and requires intersecting shells to have uniform volume.
Simply make union operation between all prongs before attempting boolean operation with the main object.

Closing as invalid.

First case `test_bmesh.blend` – coplanar geometry, not intended to work with BMesh solver whatsoever. Second case `test_1.blend` – geometry joined together before union operation using object join operator, resulted in different shells intersection with each other. Which actually worked with Carve, but BMesh solver has different behaviour and requires intersecting shells to have uniform volume. Simply make union operation between all prongs before attempting boolean operation with the main object. Closing as invalid.
Member

Despite this having been closed, I still intend to spend some cycles seeing if I can make the bmesh solver handle at least some of the coplanar cases. Carve seems to have worked sometimes but not consistently - from what I can read, it is not claimed that it works in those cases but I guess sometimes it did. The algorithm Carve used was completely different from that used in the BMesh code, so pretty hard to just adapt the parts that may have been solving the coplanar problems. As to why not just leave Carve as a backup: existing developers got tire of all the bug reports against Carve (crashes, not working in certain cases); combine that with the general difficulty of dealing with external libraries (dependencies, versions, hard to push fixes upstream, rot when new compiler versions don't work, ...) led to the decision to remove Carve now that BMesh boolean does pretty well in the general (non-coplanar problem) case.

Despite this having been closed, I still intend to spend some cycles seeing if I can make the bmesh solver handle at least some of the coplanar cases. Carve seems to have worked sometimes but not consistently - from what I can read, it is not claimed that it works in those cases but I guess sometimes it did. The algorithm Carve used was completely different from that used in the BMesh code, so pretty hard to just adapt the parts that may have been solving the coplanar problems. As to why not just leave Carve as a backup: existing developers got tire of all the bug reports against Carve (crashes, not working in certain cases); combine that with the general difficulty of dealing with external libraries (dependencies, versions, hard to push fixes upstream, rot when new compiler versions don't work, ...) led to the decision to remove Carve now that BMesh boolean does pretty well in the general (non-coplanar problem) case.
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#54054
No description provided.