If you are dealing with a planar curve, then you can also find the normals using
1- The curve plane normal (v1),
2- The tangents to your curve at each divide point (v2, v3, etc.),
Then calculate the normals using the vector cross-product operation (v2xv1, v3xv1, etc.)
protected override Result RunCommand(RhinoDoc doc, RunMode mode)
{
ObjRef cRef;
Result res = RhinoGet.GetOneObject("Select BREP", false, ObjectType.Brep, out cRef);
if (res != Result.Success)
return res;
Brep b = cRef.Brep();
GetPoint gp = new GetPoint();
gp.SetCommandPrompt("Select point for normal");
while (true)
{
GetResult gr = gp.Get();
if (gr != GetResult.Point)
break;
Point3d pt = gp.Point();
Point3d closest;
ComponentIndex ci;
double s, t;
Vector3d normal;
if (b.ClosestPoint(pt, out closest, out ci, out s, out t, double.MaxValue, out normal))
{
doc.Objects.AddLine(closest, closest + normal);
doc.Views.Redraw();
RhinoApp.WriteLine("Normal is :"+normal);
}
}
return Result.Success;
}