BMesh boolean fails when edge is co-planar to face (under some circumstances) #54024

Closed
opened 2018-02-07 21:17:07 +01:00 by 32th System · 30 comments

System Information
Ubuntu 17.10, Intel HD Graphics

Blender Version
2.79

Short description of error
Boolean operations using BMesh may not work properly when I use cubes in combination with cylinders

Exact steps for others to reproduce the error
https://www.youtube.com/watch?v=LQyUePorgpA This video shows exactly what I did.

TEXT GUIDE:
Make a cylinder with the depth 6 and the radius 1
Make a second cylinder with the radius 0.8 and the depth 7
Make a Boolean operation (BMesh) to subtract the smaller cylinder from the bigger one
You now have a pipe.
Place a cube covering half of the pipe but bigger than the pipe
Do a Boolean operation (BMesh) on the pipe: difference with the cube.

The results should be that the pipe disappears or stays a whole pipe without getting anything cut of of it. The results seem to vary when you restart Blender and different rotations may also make a difference.
broken_bool.blend

**System Information** Ubuntu 17.10, Intel HD Graphics **Blender Version** 2.79 **Short description of error** Boolean operations using BMesh may not work properly when I use cubes in combination with cylinders **Exact steps for others to reproduce the error** https://www.youtube.com/watch?v=LQyUePorgpA This video shows exactly what I did. TEXT GUIDE: Make a cylinder with the depth 6 and the radius 1 Make a second cylinder with the radius 0.8 and the depth 7 Make a Boolean operation (BMesh) to subtract the smaller cylinder from the bigger one You now have a pipe. Place a cube covering half of the pipe but bigger than the pipe Do a Boolean operation (BMesh) on the pipe: difference with the cube. The results should be that the pipe disappears or stays a whole pipe without getting anything cut of of it. The results seem to vary when you restart Blender and different rotations may also make a difference. [broken_bool.blend](https://archive.blender.org/developer/F2181181/broken_bool.blend)
Author

Added subscriber: @32th_System

Added subscriber: @32th_System

#75867 was marked as duplicate of this issue

#75867 was marked as duplicate of this issue

#72963 was marked as duplicate of this issue

#72963 was marked as duplicate of this issue

#61845 was marked as duplicate of this issue

#61845 was marked as duplicate of this issue

#71229 was marked as duplicate of this issue

#71229 was marked as duplicate of this issue

#70371 was marked as duplicate of this issue

#70371 was marked as duplicate of this issue

#60972 was marked as duplicate of this issue

#60972 was marked as duplicate of this issue
Campbell Barton changed title from Boolean operations with BMesh can cause interesting results to BMesh boolean fails when edge is co-planar to face (under some circumstances) 2018-02-08 05:32:07 +01:00

Added subscriber: @ideasman42

Added subscriber: @ideasman42

I suspect the cause of this is a known issue comparing distances along the edge instead of global space.

This means an edge may not be considered exactly aligned to the face, and the edges on either side may also not be considered touching the face.

The solution is to move all distance comparisons into the same space (known TODO)

Notice this works if you :

  • Change overlap threshold to 0.0000001
  • Set the Cylinders Z scale to 0.4
I suspect the cause of this is a known issue comparing distances along the edge instead of global space. This means an edge may not be considered exactly aligned to the face, and the edges on either side may also not be considered touching the face. The solution is to move all distance comparisons into the same space (known TODO) Notice this works if you : - Change overlap threshold to 0.0000001 - Set the Cylinders Z scale to 0.4
Author

Doing that did in fact make the Boolean operation work.

Doing that did in fact make the Boolean operation work.

Added subscriber: @bliblubli

Added subscriber: @bliblubli

@ideasman42 As Carve boolean has been removed, would it be possible to finalize Bmesh version? Before user could use the other one as fallback, but now we have to use Bmesh. I'm happy to have only one variant if it's robust enough.

@ideasman42 As Carve boolean has been removed, would it be possible to finalize Bmesh version? Before user could use the other one as fallback, but now we have to use Bmesh. I'm happy to have only one variant if it's robust enough.

Addons relying on carve modifier are not working in master like this one https://blenderartists.org/forum/showthread.php?409837-Destructive-Extrude-BETA/page9 and the results of bmesh are not yet there in some cases (like overlapping/coplanar edges/faces).
I think it was a very good idea to keep only one version of the boolean modifier and bmesh is really fast, but it should offer as much as the old combination. Or is the plan to only remove functionality in this case?

Addons relying on carve modifier are not working in master like this one https://blenderartists.org/forum/showthread.php?409837-Destructive-Extrude-BETA/page9 and the results of bmesh are not yet there in some cases (like overlapping/coplanar edges/faces). I think it was a very good idea to keep only one version of the boolean modifier and bmesh is really fast, but it should offer as much as the old combination. Or is the plan to only remove functionality in this case?

The plan is to improve bmesh boolean to support overlap.

The plan is to improve bmesh boolean to support overlap.

Added subscriber: @CareAgain

Added subscriber: @CareAgain
Member

Added subscribers: @AdamPreisler, @lichtwerk

Added subscribers: @AdamPreisler, @lichtwerk
Member

Added subscriber: @boolean-4

Added subscriber: @boolean-4

Added subscriber: @EvilReFlex

Added subscriber: @EvilReFlex

This problem still occurs on the last 2.81 version (blender-2.81-ac18c3c28dee-windows64)

  • Open new project
  • add cylinder
  • move cylinder on x or y 1m
  • select one mesh
  • add boolen
  • use union with the other mesh

This problem is very annoying if you want to to some CAD like stuff.

This problem still occurs on the last 2.81 version (blender-2.81-ac18c3c28dee-windows64) - Open new project - add cylinder - move cylinder on x or y 1m - select one mesh - add boolen - use union with the other mesh This problem is very annoying if you want to to some CAD like stuff.
Member

Added subscribers: @belamat, @howardt, @Dspazio

Added subscribers: @belamat, @howardt, @Dspazio
Member

This is very hard to fix with the current Boolean, and will be fixed with new Boolean code that I am writing. I'm hoping to have it done for 2.83. Or if things go very well in the next few weeks, 2.82.

This is very hard to fix with the current Boolean, and will be fixed with new Boolean code that I am writing. I'm hoping to have it done for 2.83. Or if things go very well in the next few weeks, 2.82.

@howardt Great Howard, just wanted to mention in case you didn't know That in my case I could notice that the problem was when the objects were using the matrix coordinates example (0,0,0) or (0,1,1) I tested this with the snap to vertex tool and in the fixed coordinates didnt worked but the same did work with no fixed grid, (placing the object in any free place and then snaping to its vertex)

Thanks for your work!

@howardt Great Howard, just wanted to mention in case you didn't know That in my case I could notice that the problem was when the objects were using the matrix coordinates example (0,0,0) or (0,1,1) I tested this with the snap to vertex tool and in the fixed coordinates didnt worked but the same did work with no fixed grid, (placing the object in any free place and then snaping to its vertex) Thanks for your work!
Member

Added subscriber: @PabloDobarro

Added subscriber: @PabloDobarro
Member

As pointed by @howardt, this is a know issue of the current boolean code and will be fixed when the new boolean code is ready.

As pointed by @howardt, this is a know issue of the current boolean code and will be fixed when the new boolean code is ready.

Added subscribers: @AxelMening-4, @Stan_Pancakes, @AdamJanz

Added subscribers: @AxelMening-4, @Stan_Pancakes, @AdamJanz
Added subscribers: @FlintEastwood, @MattOstgard, @VukGardasevic, @timewave, @mont29, @dfelinto, @candreacchio, @StephenLeger, @maxivazquez, @RaffaeleDiBlasi, @michaelknubben, @rs2128, @Kent-Davis, @RUben, @tooomg
Member

Added subscribers: @dlbogdan, @ankitm

Added subscribers: @dlbogdan, @ankitm
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Howard Trickey self-assigned this 2020-09-01 02:07:31 +02:00
Member

This is fixed if one uses the new Exact mode. commit 9e09b5c418

This is fixed if one uses the new Exact mode. commit 9e09b5c418

Blender 2.91 Alpha for MacOS 11
There is not resolve. I inspect again Boolean error still.
Screen Shot 2020-09-02 at 12.34.12 AM.png

Original .blend
Blender 2_91_alpha Sept 2 2020.blend

After Bool is error
Blender Error boolean 2_91_alpha Sept 2 2020.blend

Blender 2.91 Alpha for MacOS 11 There is not resolve. I inspect again Boolean error still. ![Screen Shot 2020-09-02 at 12.34.12 AM.png](https://archive.blender.org/developer/F8831908/Screen_Shot_2020-09-02_at_12.34.12_AM.png) Original .blend [Blender 2_91_alpha Sept 2 2020.blend](https://archive.blender.org/developer/F8831914/Blender_2_91_alpha_Sept_2_2020.blend) After Bool is error [Blender Error boolean 2_91_alpha Sept 2 2020.blend](https://archive.blender.org/developer/F8831919/Blender_Error_boolean_2_91_alpha_Sept_2_2020.blend)
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
12 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#54024
No description provided.