I am trying to fit a circle between 2 line and a defined point .
In Rhino there are 2 ways to achieve this
- Circle tangent to 3 curves and for the 3rd curve you can assign a point
- Arc Tangent, tangent, Radius ( can be assigned with points)
Is there anyway to do the same thing in grasshopper ?
You can have a look at
Circle Tantan component (under Curve > Primitive), just need to feed 2
curves and a
point as inputs.
that’s a centerpoint though…
instead of the requirement of using a point on the circle
Sorry, my bad. It’s a tricky one then.
Sounds like scripting could help, so I drafted up this Python example, but not sure how much would it be helpful:
circlePTT.gh (12.6 KB)
tA parameter is identical to picking the first point using
tB parameter is identical to picking the second point on the first curve.
tC is identical to picking the third point on the second curve, but it’s calculated in Python instead of being parameter because some values will produce invalid circles. When drawing the circle with Rhino command, the third point is actually also calculated because you’re only picking the curve, not the point, so it makes sense to calculate it in Python.
thanks alot for the script,
It works but with a simple trick, I had to move the Line_03 tangential to the ( center arc or defined point) and it works.
See the image below,
here is another solution based on exact calculation, however it fails if CircleTT fails:
TanTanPt.gh (10.1 KB)