Chamfer acute angles only

Hey, I have a tree of planar closed polygons. I would like to chamfer acute angles that are smaller than a defined number (e.g. 50°) by a radius/distance of x. I came up with this definition but I think it can be optimized way more. Any ideas? Thanks in advance! (14.9 KB)

Chamfer Polyline Acute Angle V0 .gh (8.0 KB)
Plugin: Flexibility


Works perfectly. Thank you very much!