Problem

A given ring segment of a circle segment has to be drawn by a polygon with rounded edges. Bases on this ArchiTalk-Thread: Complex poly math question.

Known distances:
r1: Inner Radius of the segment
alpha: width of the ring in degrees
d: Distance of inner and outer arc
f: Radius of the rounding circles

Solution

There is a inner dependece between the tnagential connection points, the radius f and the segment itself. See:

Script

!»» environment calculations

r2 = r1 + d
L1 = sqr(r1) * sqr(2*f+r1) - R1
L2 = r2 - sqr(r2^2-2*f*r2)
u = atn(f/(r2-L2))
w = atn(f/(r1+L1))

!»» coordinate calculation

x1=r1+L1 : y1=0
x2=f/tan(u) : y2=0
x3=r2*cos(u) : y3=f*r2/(r2-f)
x4=r2*cos(alpha-u) : y4=r2*sin(alpha-u)
x5=(r2-L2)*cos(alpha) : y5=(r2-L2)*sin(alpha)
x6=(r1+L1)*cos(alpha) : y6=(r1+L1)*sin(alpha)
x7=r1*cos(alpha-w) : y7=r1*sin(alpha-w)
x8=r1*cos(w) : y8=f*r1/(r1+f)

!»» output in 2D

poly2_ 9,7,
 x1, y1, 1,
 x2, y2, 1,
 x3, y3, 1001,
 x4, y4, 1001,
 x5, y5, 1001,
 x6, y6, 1,
 x7, y7, 1001,
 x8, y8, 1001,
 x1, y1, 1001

Um unsere Webseite für Sie optimal zu gestalten und fortlaufend verbessern zu können, verwenden wir nur essenzielle Cookies.
Durch die weitere Nutzung der Webseite stimmen Sie der Verwendung von Cookies zu.
Weitere Informationen zu Cookies erhalten Sie in unserer Datenschutzerklärung