I want to find two tangent lines to a given brep which pass through a specified point.
It is easy to draw these lines on rhino by command _line _Tangent.
I made a GH which can find the tangent lines (see the attached file). But any components (or plug in) can do the same thing?
private void RunScript(Curve curve, Point3d point, double seedParmameter, ref object A)
{
var c1 = (new Circle(point, 1.0)).ToNurbsCurve();
double t1;
c1.ClosestPoint(curve.PointAt(seedParmameter), out t1);
Line l;
Line.TryCreateBetweenCurves(curve, c1, ref seedParmameter, ref t1, false, true, out l);
A = curve.PointAt(seedParmameter);
}
hi, can you explain to me what is the “seed parameter” in that method? I tried to change the “seed parameter” from 0.0 to 1.0 and cannot see the difference. Thanks.
There might be some situations where there is more than one tangent line available. This function uses seed parameter to find the desired tangent point.