Perpendicular frame could not be solved.gh (6.9 KB)
I am using R8 SR13 on Windows 11.
I baked the arc, moved the middle control point away and back and then it works. Weird.
Perpendicular_frame_script_cs.gh (9.7 KB)
Evaluating the curve with rhinocommon works…
the attached script does the job.
so maybe it is a bug ?
private void RunScript(Curve crv, double t, ref object a)
{
Point3d ptt = crv.PointAt(t);
Vector3d vt, vn, vy;
vt = crv.TangentAt(t);
vn = crv.CurvatureAt(t);
if (vn.IsTiny())
{
a = Plane.CreateFromNormal(ptt,vt);
} else
{
vt.Unitize();
vn.Unitize();
vy = Vector3d.CrossProduct(vt,vn);
a = new Plane(ptt,vn,vy);
}
}
maybe the gh component does handle some special cases - but does to much safety and fails ?
EDIT:
…also rotating the curve by 45 degree (but not 1 degree) will result in a correct perpendicular frames from the component…
Is this a bug?