Incorrect angle measure with calc_edge_angle (bmesh vertex) #53131
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#53131
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Blender Version
Tested with Blender 2.79 (official)
2017-09-11, Hash: 5bd8ac, Windows 64 build
Short description of error
Calling calc_edge_angle on a vert with 2 edges returns the supplement of the angle between the 2 edges instead of the interior or exterior angle as method description indicates.
I suspect the problem looks to be with "bmesh_queries.c" on line 1753
blender\source\blender\bmesh\intern\bmesh_queries.c
Exact steps for others to reproduce the error
Create a mesh that has a vertex with 2 angles that are more or less than 90 degrees apart from one another. Enter edit mode and use Python API to call calc_edge_angle() on the vert.
TL:DR
Run script inside the attached blend file:
calc_edge_angle.blend
Additional notes
The calc_edge_angle() documentation states the method requires vert's with two connected edges." but this method will also work on vertices only attached to 1 edge (returns pi). Possible missed test case?
Also, on vertices with no edges or more than 2 edges the method throws this error message:
I would suggest slightly different wording for error message to indicate exclusivity if 2 edges are required, eg:
"Method only works on vert with 2 edges"
Changed status to: 'Open'
Added subscriber: @nBurn
Changed status from 'Open' to: 'Archived'
Improved the exception message, otherwise this isn't a bug.
if vertex between two edges makes a straight line, then the angle is zero.
The other issue noted in the image you posed - is just the result of rounding.
So to clarify, these 2 results were intended?
I would suggest mentioning (2) in the method description if it was intended, e.g.
The image was just to show the discrepancy between what I thought would have been the return value (~98.59 as shown in the 3D viewport) and the actual return value (~81.41) and that the returned angle was a supplementary angle.
I understood that 81.41 would be the result of rounding ~81.408929 :D
This issue was referenced by blender/blender@282af08fe2
Changed status from 'Archived' to: 'Resolved'