I am trying to write a definition that finds and isolates tangent circles that fit in inside corners. The purpose is for creating remachining toolpaths for CNC (using a smaller radius tool only for the tight spots, in order to speed up cutting).
The end goal is to create the magenta curves shown here (these were created manually):
There are conditions where fillet components fail, like this one:
The short straight line prevents a 0.125 radius fillet where it’s needed. So I tried another method, using offset curves, their discontinuities, and some sorting. It kinda works. Here’s the definition:
remach profiles.gh (101.0 KB)
As you can see, it will place tangent circles even when short curves would have disrupted a fillet command.
However… Offset curve (in green) is also unreliable.
It also creates other issues, missing spots if the offset covers up a “bay” or “inlet” in a curve:
Broadly, does anyone have suggestions for how to do filleting like this more effectively? Am I using the right strategy or chasing a dead end?
Is there a method I can use to prevent offsets from failing like they do on the capital B?
Is there a method I can use to get offsets to produce more than one curve, so that the interior “bay” in a lowercase e or other situation produces a result along with the rest of the curve?
I think I’m 85-90% of the way there, but I’m stuck. Please help. Thanks!