Vector Normal to Curve/Line in GHPython


This might be a more obvious one.

I have curves which are not aligned to the standard planes (WorldXY, WorldYZ & World XZ). I am looking to move these curves along their normal vectors on the planes they lie on.

Is there a way to do so in grasshopper python? Thank you.

  1. Duplicate Curve
  2. Get perpedicular plane of the curve.
  3. Take the vector of that plane.
  4. Transform the curve.

You could get the plane of each curve with curve.TryGetPlane(). The z-axis of the returned plane then could be used to offset.