 # Curve Side relationship to points

Hi everyone!

I was just wondering if there was a method in Rhinocommon for C# that is the same or similar to (Curve Side) in Grasshopper. I’m trying to determine if a point is left or right of a curve.

Hi @ryan_johann,

Sorry no, this function is unique to Grasshopper.

– Dale

Hi,
you could do it like this:

``````

DataTree<Vector3d> dtProTree = new DataTree<Vector3d>();
DataTree<Point3d> CloPoTree = new DataTree<Point3d>();
DataTree<Vector3d> v2pTree = new DataTree<Vector3d>();
DataTree<Vector3d> tangentTree = new DataTree<Vector3d>();
DataTree<Vector3d> croPoTree = new DataTree<Vector3d>();

for (int i = 0; i < pt.Count; i++)
{

//closestPoint
double t; bool cV = crv[i].ClosestPoint(pt[i], out t);
Point3d cloPo = crv[i].PointAt(t);

//tangentVector
Vector3d T = crv[i].TangentAt(t);

//Vector2Point
Vector3d v2p = new Vector3d (pt[i] - cloPo);

//CrossProduct
Vector3d newVec = new Vector3d(cloPo.X, cloPo.Y, cloPo.Z);//vectorOutOfPoint
Vector3d crPo = Vector3d.CrossProduct(v2p, newVec);