RhinoScript - circle tangent to 3 curves

Hi,

Is it possible to RhinoScript a circle tangent to 3 curves.

thx

RhinoScript does not have such a function. Plus, CircleTTT is pretty darn interactive - not sure how a script method would look, as you’d have to provide more than just 3 curves as there might be more than one solution.

– Dale

Thanks Dale,

Perhaps there is another way to automate these circles -

circs.3dm (31.4 KB)

Any thoughts much appreciated,

@pascal, any tricks here?

Hmm- yeah, no scripting of the Rhino command as far as I can see, SelID is not good enough. I guess I’ll have to enlist some more brain cells and do it right…

-Pascal

Hi Keith, please try the script below which may work on cases similar as in your picture. There are some restriction though: You only need to pick 2 rail curves, the linear curve is built on the fly. The rail curves should not start (intersect) at the same point and they should be near parallel. It fails on polylines in my first tests, but adding small fillets seems to cure it. I´ve tried it too with some closed curves…

Please save before running this script: TangentCirclesBetweenCurves.py (3.6 KB)

c.

1 Like

Thanks Clement, really useful and lots for me to learn from.

Virtual beers, or real beers if you find yourself near London UK.

Kind regards,
Keith

thanks ! :beers:

c.

Can i get VBscript version pls

Hi Louis, the VBscript version of RhinoScript does not have a CircleTTT method. I guess there is no way to script that the same way as i did using python above, i´m afraid.

c.

Reminded me of path-per spacing model: http://www.dig.gallery/#!armadillo/c1mgi

If you are using Rhino 5 and Rhino.Python, then you could call in to RhinoCommon and use the Rhino.Geometry.Circle.TryFitCircleTTT function.