Wrong bevel on ngon with hole #38871

Closed
opened 2014-02-27 15:19:20 +01:00 by Alexandre Labedade · 14 comments

System Information
Windows 7 64 - GTI 660

Blender Version
2.69 10f4c62

Short description of error

The bevel modifier have problems on ngon with holes made by boolean operations : if the edge linking the hole to the boundary of the ngon is too close to the hole boundary, then a bad bevel is produced.
To solve this problem, try to get the boolean modifier to create this kind of linking edge between the two closests vertices between the boundary of the ngon and the boundary of its hole.

Exact steps for others to reproduce the error

Create a boolean with a cylinder inside a cube, and add bevel, see attached blend file{F79131}

**System Information** Windows 7 64 - GTI 660 **Blender Version** 2.69 10f4c62 **Short description of error** The bevel modifier have problems on ngon with holes made by boolean operations : if the edge linking the hole to the boundary of the ngon is too close to the hole boundary, then a bad bevel is produced. To solve this problem, try to get the boolean modifier to create this kind of linking edge between the two closests vertices between the boundary of the ngon and the boundary of its hole. **Exact steps for others to reproduce the error** Create a boolean with a cylinder inside a cube, and add bevel, see attached blend file{[F79131](https://archive.blender.org/developer/F79131/boolean_bevel_bug.zip)}

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @Alesk

Added subscriber: @Alesk
Bastien Montagne changed title from Wrong bevel on ngon with hole after a boolean difference to Wrong bevel on ngon with hole 2014-02-27 19:54:02 +01:00
Howard Trickey was assigned by Bastien Montagne 2014-02-27 19:56:15 +01:00

Added subscriber: @mont29

Added subscriber: @mont29

In fact, boolean are not implied… I could reproduce a wrong result with a mere cube with a square hole in ones of its faces, see bevel_bug.blend. Howard, that’s another one for you.

In fact, boolean are not implied… I could reproduce a wrong result with a mere cube with a square hole in ones of its faces, see [bevel_bug.blend](https://archive.blender.org/developer/F79174/bevel_bug.blend). Howard, that’s another one for you.

Yes, it's not a "boolean specific" problem. But if we want to keep the modifiers stack unapplied, we have no solution to fix the edge resulting of the boolean operation...
so if the boolean modifier generate directly a well placed edge, it will solve the problem in this specific case ;)

Yes, it's not a "boolean specific" problem. But if we want to keep the modifiers stack unapplied, we have no solution to fix the edge resulting of the boolean operation... so if the boolean modifier generate directly a well placed edge, it will solve the problem in this specific case ;)
Member

I confirm this is a bevel bug and will work on it now.

I confirm this is a bevel bug and will work on it now.
Member

Commit 1582dd534d is a partial fix. It fixes the bevel_bug.blend file from mont29. The original boolean model case still has a problem.

Really, one shouldn't try to bevel those edges that connect the holes to the outside, since they form reflex angles with hole edges and that means that it is impossible to offset on both sides of the line -- distortion will be introduced.

I'll leave this bug open until I can fix the original problem.

Commit 1582dd534d is a partial fix. It fixes the bevel_bug.blend file from mont29. The original boolean model case still has a problem. Really, one shouldn't try to bevel those edges that connect the holes to the outside, since they form reflex angles with hole edges and that means that it is impossible to offset on both sides of the line -- distortion will be introduced. I'll leave this bug open until I can fix the original problem.

Yeah... That's why I suggested to modify the boolean modifier in the first place ;)

Since this edge is generated on the fly by the boolean modifier, the user has no option but apply the modifier to access it and disable the bevel on it.
But if the user wants to keep the boolean modifier, and stack the bevel modifier just after, there is no solution... except having the boolean modifier to provide well positionned edges when a hole is present.

Yeah... That's why I suggested to modify the boolean modifier in the first place ;) Since this edge is generated on the fly by the boolean modifier, the user has no option but apply the modifier to access it and disable the bevel on it. But if the user wants to keep the boolean modifier, and stack the bevel modifier just after, there is no solution... except having the boolean modifier to provide well positionned edges when a hole is present.
Member

Well the 'angle' limiter on the bevel modifier should exclude the undesired edges from being used; but the result of using it in this case is a bit strange, so something else for me to look into.

Well the 'angle' limiter on the bevel modifier should exclude the undesired edges from being used; but the result of using it in this case is a bit strange, so something else for me to look into.

Yep, the angle limiter could be a good (and simple) solution... Have fun fixing the wrong result ;)

Yep, the angle limiter could be a good (and simple) solution... Have fun fixing the wrong result ;)
Member

Some updates on this.
First, the case of 'all edges beveled' on the boolean model is 'working as intended' except that we need much better 'clamping' code that detects more cases where the specified amount of bevel causes the construction to cross other edges of the polygon it is in. Here we have a very small angle and one wants to offset inside it, so the only way to do that is put the start point of the offset far out, where the edges have diverged enough.
Second, the problem with turning on the angle limit is that, even when the connector edge is removed from beveling, the current method of placing an offset point when there is an unbeveled edge between two beveled edges is to move the point along the unbeveled edge. The reason is to try to preserve the shape and angles that the unbeveled edges make (sometimes users want that), but in this case it would be better to ignore that desire and just move point to where the offsets meet.

I don't think I can fix either of these with sufficient testing that it hasn't messed something else up, in time for the 2.70 release. The proper clamping will take a fair amount of code. The other thing may need another option (not sure yet) and too late in the release cycle to add anything affecting UI messages, even if I did know exactly what I wanted here.

Some updates on this. First, the case of 'all edges beveled' on the boolean model is 'working as intended' except that we need much better 'clamping' code that detects more cases where the specified amount of bevel causes the construction to cross other edges of the polygon it is in. Here we have a very small angle and one wants to offset inside it, so the only way to do that is put the start point of the offset far out, where the edges have diverged enough. Second, the problem with turning on the angle limit is that, even when the connector edge is removed from beveling, the current method of placing an offset point when there is an unbeveled edge between two beveled edges is to move the point along the unbeveled edge. The reason is to try to preserve the shape and angles that the unbeveled edges make (sometimes users want that), but in this case it would be better to ignore that desire and just move point to where the offsets meet. I don't think I can fix either of these with sufficient testing that it hasn't messed something else up, in time for the 2.70 release. The proper clamping will take a fair amount of code. The other thing may need another option (not sure yet) and too late in the release cycle to add anything affecting UI messages, even if I did know exactly what I wanted here.
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Member

Closing this for now and moving to the wiki TODO list. Writing better clamping code is a significant effort.

Closing this for now and moving to the wiki TODO list. Writing better clamping code is a significant effort.
Member

Better clamping code is now in, and the original model in this report is now OK.

Better clamping code is now in, and the original model in this report is now OK.
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
3 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#38871
No description provided.