Containment circle

I am trying to calculate the minimun circle that contains a given generic flat curve but the strategy 1 used is generating a circle that insersect the curve and its not tangent ( it creates more than 2 intersections )

i also tried to use k2 but i am not very good with K2 and apparently the curve collide is not working when the curve to collide ( passive curve ) is contained inside the colliding curves , or maybe i am arranging it wrong. Anyway the shrinking of the lines continue way beyond tangency and it becomes zero

CONTAINMENT CIRCLE - CIRCULAR BOUNDING BOX.gh (20.3 KB)

My goal is as said to find the minimum tangent circle that contains a given close crv
The strategy 1 is generating tons of lines and it looks very demanding especially when i have several curves to process.
I have the feeling that K2 is the way to go but i don’t know how to set it up.

any suggestion is appreciated

thanks

Hello
you have some examples here, but they work with points and so don’t use the tangent or curvature.

1 Like

Many thanks Laurent , you are always helpfull. i really appreciate !

@laurent_delrieu this is a good starting point , i will divide the curves in several points and i should have a good approxition, as i far as i can see on the sent thread this challenge is way more complicated than i expected …i wonder if K2 could be helpfull on solving this problem ?

There are co-circular and co-spherical goal options.

Not calling it a solution - 'can work, but it can also be probably prohibitively expensive (point density):
CONTAINMENT CIRCLE - CIRCULAR BOUNDING BOX.gh (11.9 KB)




1 Like

thanks a lot @René_Corella , you proposal seems to generate reliable results for high nr. of subdivision but you are right , quite dememding under a computational point view.

anyway thanks a lot for spending the time to look over it , I have learnt something new from your script :wink:

1 Like