I’d like to procedurally bevel an edge loop for a polygon object plugin that I am making. I am seeking help in coding an algorithm that does this using Python.
So far in my research, it appears to be a matter of mathematically generating a circle tangent to two points [V2, V3] based on their distance from a third angular point [V1] and a radius. With that circle, I would then get a section of the arc (Arc B) between the tangent points.
I have been able to find points A, B, & C from the above image with the following code:
r = 106 #radius V1 = Vector(50, 100, 0) V2 = Vector(100, 300, 0) V3 = Vector(350, 350, 0) a = V2-V1 b = V2-V3 a.Normalize() b.Normalize() halfang = math.acos((a.Dot(b)))/2 ab = (a+b)/2 ab.Normalize() A = V2 - r/math.tan(halfang)*a B = V2 - r/math.tan(halfang)*b C = V2 - r/math.sin(halfang)*ab
Can anyone provide guidance for generating the positions of a specified number of points for the arc labeled Arc B please? Thank you!