outer = Polygon([
(10, 0), (7.07, 7.07), (0, 10), (-7.07, 7.07), (-10, 0),
(-7.07, -7.07), (0, -10), (7.07, -7.07), (10, 0)
])
inner = Polygon([
(5, 0), (3.54, 3.54), (0, 5), (-3.54, 3.54), (-5, 0),
(-3.54, -3.54), (0, -5), (3.54, -3.54), (5, 0)
])
ring = Polygon(outer.exterior.coords, [inner.exterior.coords])
from centerline.geometry import Centerline
centerline = Centerline(ring)
for p in centerline.geometry.geoms:
plt.plot(*p.xy)
plt.plot(*ring.exterior.xy, color='r')
plt.plot(*ring.interiors[0].xy, color='r')

is there a way to get the inner circle only without post-processing (removing lines that are too close to the boundaries)
is there a way to get the inner circle only without post-processing (removing lines that are too close to the boundaries)