Rolling circle gap bridging problem

The red curve is the input curve. I need to produce a curve offset inwards from the input curve by some amount (the black line), but with “fillets” across any gaps wherever a circle of a given radius could not fit through. The yellow lines are a hand-drawn approximation of the desired “fillets”. It is safe to assume that circle can always be placed at the centroid of the input curve without intersecting the curve (or the offset curve) (there will always be some “space in the middle”). The input curve is always planar and closed.

Another way to think of the problem is a coin rolling along the inside of the offset curve, where the desired curve is formed by the contact point of the coin with the curve and the gap-bridging perimeter of the coin whenever it bridges a gap.

How can I produce the desired curve? I’ve experimented with a few ideas, including Kangaroo2, but I’ve not got anywhere. In the real use case, the input curve will often be much longer and be very wiggly (thousands of control points), so the solution should scale reasonably in terms of performance.

Thanks!

RollingCircleGapBridgingProblem.gh (7.0 KB)

This, maybe?

Offset the offset inward by the circle radius to give the locus of the circle centre. Then offset that outward by the radius and using the round option to give the ‘filleted’ curve.

RollingCircleGapBridgingSolution.gh (20.2 KB)

HTH
Jeremy

3 Likes

Thanks @jeremy5 - that’s excellent. Simple yet effective, good to learn from. For my real-world use case there can be more than one resulting curve when a narrow-necked bulge is large enough - so I just added a suitable heuristic to select the desired curve, which in my case was to select only the curve containing the centroid of the original input curve.

1 Like