Circle tangent to two curves with fixed length goal?

@DanielPiker I’m hoping you might be able to point me the right direction here.

I have a variation on the circle packing problem, where I need to place a circle that is tangent to two curves that meets a fixed length requirement between the tangent points of the curves:

What I think I’m looking for is a Tangent goal combined with a length goal, but I’ve not found any examples.

Attached is an example file.

Cheers

DK
230523_Single circle packing goal.3dm (135.7 KB)

Hi,

I tried tangency to curve goals and also never found a way to do it.
Here is a CircleTanTanChord search using C#.
Haven’t tested on weird cases, it helps if the curves are connected and only convex.

CircleTanTanChord.gh (11.6 KB)

1 Like

Hi @kiteboardshaper

Here’s a solution to this using a Goal which keeps a line perpendicular to a given curve.
perp_toCurve_new.gh (20.1 KB)

7 Likes

@DanielPiker Thank you so much - that is exactly what I needed.

Honestly, I can’t believe that any of us on here have such access to both Kangaroo AND you to help with these weird requests, let alone getting solutions in overnight.

Cheers

DK

2 Likes

I understand now why I couldn’t do it with native K2 components :sweat_smile:
Thanks for this example.

1 Like

@DanielPiker

I have a quick question for you.

I’ve looked at moving the project this setup is used in to Rhino for Mac today.

On opening the GH file Rhino told me it could not find the KangarooSolver.dll - and reported back it was looking for it on a Windows type file path.

I’m don’t know my way around a Mac very well, so couldn’t find it either, so ended up putting a copy of the dll on the desktop and pointing Rhino/GH to that.

It worked, but I’m sure there is a better way?

Cheers

DK